-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
48 lines (45 loc) · 1.08 KB
/
flake.nix
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
45
46
47
48
{
description = "Python project using uv";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixgl.url = "github:nix-community/nixGL";
};
outputs = {
self,
nixpkgs,
nixgl,
}: let
supportedSystems = ["x86_64-linux" "aarch64-linux"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in {
devShells = forAllSystems (system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [nixgl.overlay];
cudaSupport = true;
};
# resolve dynamic library paths
LD_LIBRARY_PATH = "${(with pkgs;
lib.makeLibraryPath [
zlib
zstd
stdenv.cc.cc
curl
openssl
attr
libssh
bzip2
libxml2
acl
libsodium
util-linux
xz
systemd
glib.out
])}:${pkgs.libGL}/lib"; # libGL don't work for makeLibraryPath
in {
default = import ./shell.nix {inherit pkgs LD_LIBRARY_PATH;};
}); # end mkshell devshell
};
}