forked from tweag/FawltyDeps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
35 lines (34 loc) · 1.14 KB
/
shell.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
{
pkgsWith37 ? import (builtins.fetchTarball {
# Branch: nixos-22.11
url = "https://github.com/NixOS/nixpkgs/archive/96e18717904dfedcd884541e5a92bf9ff632cf39.tar.gz";
sha256 = "0zw1851mia86xqxdf8jgy1c6fm5lqw4rncv7v2lwxar3vhpn6c78";
}) {},
python37_overlay ? self: super: { python37 = pkgsWith37.python37; },
pkgs ? import (builtins.fetchTarball {
# Branch: nixos-23.05
url = "https://github.com/NixOS/nixpkgs/archive/9790f3242da2152d5aa1976e3e4b8b414f4dd206.tar.gz";
sha256 = "1y6zipys4803ckvnamfljb8raglgkbz1fz1fg03cxp4jqiiva5s1";
}) { overlays = [ python37_overlay ]; }
}:
pkgs.mkShell {
name = "fawltydeps-env";
buildInputs = with pkgs; [
python37
python38
python39
python310
python311
poetry
];
shellHook = ''
# This is needed to keep python3.7 working while in the same nix-shell
# as a later python (see https://github.com/NixOS/nixpkgs/issues/88711
# for more details):
unset _PYTHON_HOST_PLATFORM
unset _PYTHON_SYSCONFIGDATA_NAME
poetry env use "${pkgs.python311}/bin/python"
poetry install --sync --with=dev
source "$(poetry env info --path)/bin/activate"
'';
}