-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
27 lines (26 loc) · 868 Bytes
/
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
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
py = pkgs.python39.withPackages (ps: with ps; [
click flask jinja2 ldap
]);
in {
devShell = pkgs.mkShell {
buildInputs = [
py
];
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.python39.sitePackages}:$(pwd):$PYTHONPATH"
export PATH="$PIP_PREFIX/bin:$PATH"
unset SOURCE_DATE_EPOCH
'';
};
});
}