-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
47 lines (43 loc) · 1.17 KB
/
flake.nix
File metadata and controls
47 lines (43 loc) · 1.17 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
45
46
47
{
description = "Nix Development Flake the QSVM optimiser";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/master";
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
python = pkgs.python312Full;
pythonPackages = python.pkgs;
in
{
devShells.default = pkgs.mkShell {
name = "your_package";
nativeBuildInputs = [ pkgs.bashInteractive ];
buildInputs = with pythonPackages; [
# tensorflow
setuptools
wheel
venvShellHook
pkgs.jupyter
];
venvDir = ".venv";
src = null;
postVenv = ''
unset SOURCE_DATE_EPOCH
'';
postShellHook = ''
unset SOURCE_DATE_EPOCH
unset LD_PRELOAD
PYTHONPATH=$PWD/$venvDir/${python.sitePackages}:$PYTHONPATH
# fixes libstdc++ issues and libgl.so issues
LD_LIBRARY_PATH=${pkgs.libz}/lib/:${pkgs.stdenv.cc.cc.lib}/lib/:/run/opengl-driver/lib/
'';
};
}
);
}