-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
45 lines (39 loc) · 1.05 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
{
description = "SNNCutoff's development environment";
inputs = {
utils.url = "github:numtide/flake-utils";
# TODO: CUDA should work without explicitly invoking a wrapper
nixglhost.url = "github:numtide/nix-gl-host";
};
outputs = {
self,
nixpkgs,
utils,
nixglhost,
...
}:
utils.lib.eachDefaultSystem (system: # TODO: deprecate flake-utils
let
pkgs = import nixpkgs {
inherit system;
};
pypkgs = pkgs.python3Packages;
in {
devShells.default = pkgs.mkShell {
venvDir = "./.venv";
buildInputs = [
pypkgs.python
pypkgs.venvShellHook # creates a venv in $venvDir
nixglhost.defaultPackage.${system}
];
postVenvCreation = ''
python -m pip install --upgrade pip
python -m pip install --editable .[dev]
'';
postShellHook = ''
'';
# Enable python libraries to discover libstdc++.so.6
LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [ stdenv.cc.cc ];
};
});
}