-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
22 lines (22 loc) · 680 Bytes
/
shell.nix
File metadata and controls
22 lines (22 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
let
pkgs = import <nixpkgs> {};
pythonEnv = pkgs.python312.withPackages(ps: with pkgs; [
python312Packages.lxml
python312Packages.elementpath
python312Packages.networkx
python312Packages.matplotlib
python312Packages.pytest
]);
in pkgs.mkShell {
packages = [
pythonEnv
];
shellHook = ''
# Tells pip to put packages into $PIP_PREFIX instead of the usual locations.
# See https://pip.pypa.io/en/stable/user_guide/#environment-variables.
export PIP_PREFIX=$(pwd)/_build/pip_packages
export PYTHONPATH="$PIP_PREFIX/${pkgs.python3.sitePackages}:$PYTHONPATH"
export PATH="$PIP_PREFIX/bin:$PATH"
unset SOURCE_DATE_EPOCH
'';
}