-
Notifications
You must be signed in to change notification settings - Fork 39
/
flake.nix
44 lines (44 loc) · 1.38 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
nixpkgs22.url = "github:nixos/nixpkgs/22.11";
nixpkgsUnstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flakeUtils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, nixpkgs22, nixpkgsUnstable, flakeUtils }:
flakeUtils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs22 = nixpkgs22.legacyPackages.${system};
pkgsUnstable = nixpkgsUnstable.legacyPackages.${system};
in {
packages = flakeUtils.lib.flattenTree {
python312 = pkgs.python312;
python311 = pkgs.python311;
python310 = pkgs.python310;
python39 = pkgs.python39;
python38 = pkgs22.python38;
python37 = pkgs22.python37;
go-task = pkgsUnstable.go-task;
};
devShell = pkgs.mkShell {
buildInputs = with self.packages.${system}; [
python312
python311
python310
python39
python38
python37
go-task
];
shellHook = ''
[[ ! -d .venv ]] && \
echo "Creating virtualenv ..." && \
${pkgs.python310}/bin/python -m \
venv --copies --upgrade-deps .venv > /dev/null
source .venv/bin/activate
'';
};
}
);
}