-
Notifications
You must be signed in to change notification settings - Fork 47
/
shell.nix
50 lines (43 loc) · 1.33 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
let
nixpkgs = builtins.fetchTarball {
# https://github.com/NixOS/nixpkgs/tree/nixos-23.11 on 2024-03-07
url = "https://github.com/nixos/nixpkgs/archive/f945939fd679284d736112d3d5410eb867f3b31c.tar.gz";
sha256 = "06da1wf4w752spsm16kkckfhxx5m09lwcs8931gwh76yvclq7257";
};
poetry2nixsrc = builtins.fetchTarball {
# https://github.com/nix-community/poetry2nix/commits/master on 2024-03-07
url = "https://github.com/nix-community/poetry2nix/archive/3c92540611f42d3fb2d0d084a6c694cd6544b609.tar.gz";
sha256 = "1jfrangw0xb5b8sdkimc550p3m98zhpb1fayahnr7crg74as4qyq";
};
pkgs = import nixpkgs { };
poetry2nix = import poetry2nixsrc {
inherit pkgs;
# inherit (pkgs) poetry;
};
commonPoetryArgs = {
projectDir = ./.;
preferWheels = true;
editablePackageSources = {
pyramid_openapi3 = ./.;
};
overrides = poetry2nix.overrides.withDefaults (self: super: { });
};
devEnv_312 = poetry2nix.mkPoetryEnv (commonPoetryArgs // {
python = pkgs.python312;
});
devEnv_310 = poetry2nix.mkPoetryEnv (commonPoetryArgs // {
python = pkgs.python310;
pyproject = ./py310/pyproject.toml;
poetrylock = ./py310/poetry.lock;
});
in
pkgs.mkShell {
name = "dev-shell";
buildInputs = with pkgs; [
devEnv_312
devEnv_310
poetry
gitAndTools.pre-commit
nixpkgs-fmt
];
}