-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathflake.nix
More file actions
44 lines (39 loc) · 1.32 KB
/
Copy pathflake.nix
File metadata and controls
44 lines (39 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
description = "xarray-sql development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
# Shared libraries that manylinux wheels (pyarrow, duckdb, polars,
# numpy, ...) expect to find via the dynamic linker at runtime.
# NixOS doesn't put these on a standard FHS path, so we point
# LD_LIBRARY_PATH at the nix store paths that provide them.
runtimeLibs = with pkgs; [
stdenv.cc.cc
zlib
openssl
];
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
uv
python312
rustc
cargo
pkg-config
];
# Use the Nix-provided interpreter above instead of having uv
# download its own Python build.
UV_PYTHON_PREFERENCE = "only-system";
shellHook = ''
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath runtimeLibs}''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
echo "xarray-sql dev shell: $(python3 --version), $(rustc --version)"
'';
};
});
}