-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
91 lines (87 loc) · 2.36 KB
/
Copy pathflake.nix
File metadata and controls
91 lines (87 loc) · 2.36 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
systems.url = "github:nix-systems/default/main";
flake-utils.url = "github:numtide/flake-utils/main";
flake-utils.inputs.systems.follows = "systems";
poetry2nix.url = "github:nix-community/poetry2nix";
poetry2nix.inputs.nixpkgs.follows = "nixpkgs";
poetry2nix.inputs.systems.follows = "systems";
poetry2nix.inputs.flake-utils.follows = "flake-utils";
};
outputs = {nixpkgs, poetry2nix, ...}: let
overlays = [
poetry2nix.overlays.default
(import ./.nix/overlay.nix)
];
forAllSystems = f:
nixpkgs.lib.genAttrs [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
] (
system:
f (let
pkgs = import nixpkgs {
inherit overlays system;
config = {
allowUnfree = false;
};
};
projectPython = pkgs.python3;
projectPythonEnv = pkgs.poetry2nix.mkPoetryEnv {
python = projectPython;
projectDir = ./.nix/poetry;
overrides = pkgs.poetry2nix.defaultPoetryOverrides.extend (
import ./.nix/poetry/overrides.nix {inherit pkgs projectPython;}
);
};
in {
inherit pkgs;
inherit projectPython;
inherit projectPythonEnv;
})
);
in {
inherit overlays;
devShells = forAllSystems (
{
pkgs,
projectPython,
projectPythonEnv,
...
}: {
default = with pkgs;
mkShell {
packages = [
bashInteractive
coreutils
findutils
gnused
gnugrep
perl
which
just
dtrx
projectPythonEnv
poetry
projectPython.pkgs.poetry-dynamic-versioning
projectPython.pkgs.poetry-core
projectPython.pkgs.hatchling
projectPython.pkgs.hatch-vcs
projectPython.pkgs.flit-core
projectPython.pkgs.pkginfo
projectPython.pkgs.pip
gnutar
gzip
jq
yq
];
shellHook = ''
'';
};
}
);
};
}