-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathflake.nix
33 lines (31 loc) · 826 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
28
29
30
31
32
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs:
inputs.flake-utils.lib.eachDefaultSystem (system:
let
pkgs = inputs.nixpkgs.legacyPackages.${system};
my-python = pkgs.python3;
python-with-my-packages = my-python.withPackages (p: with p; [
wheel
requests
# other python packages you want
]);
in
{
devShell =
pkgs.mkShell
{
buildInputs = [
python-with-my-packages
];
shellHook = ''
PYTHONPATH=${python-with-my-packages}/${python-with-my-packages.sitePackages}
# maybe set more env-vars
'';
};
}
);
}