-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathflake.nix
57 lines (53 loc) · 1.51 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
45
46
47
48
49
50
51
52
53
54
55
56
57
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs_master.url = "github:NixOS/nixpkgs/master";
systems.url = "github:nix-systems/default";
flake-utils.url = "github:numtide/flake-utils";
flake-utils.inputs.systems.follows = "systems";
};
outputs = {
self,
nixpkgs,
flake-utils,
systems,
...
} @ inputs:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
system = system;
config.allowUnfree = true;
};
in
with pkgs; rec {
callPackage = lib.callPackageWith (pkgs // packages // python3Packages);
packages = {
centrosome = callPackage ./nix/centrosome.nix {};
};
devShells = {
default = let
python_with_pkgs = (pkgs.python3.withPackages(pp: [
packages.centrosome
]));
in
mkShell {
packages = [
python_with_pkgs
];
venvDir = "./.venv";
postVenvCreation = ''
unset SOURCE_DATE_EPOCH
'';
postShellHook = ''
unset SOURCE_DATE_EPOCH
'';
shellHook = ''
runHook venvShellHook
export PYTHONPATH=${python_with_pkgs}/${python_with_pkgs.sitePackages}:$PYTHONPATH
'';
};
};
}
);
}