-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
52 lines (44 loc) · 1.34 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
{
description = "Efficient Python Nested Structure Library";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/21.05";
utils.url = "github:numtide/flake-utils";
utils.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, ... }@inputs: inputs.utils.lib.eachSystem [
"x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin"
] (system:
let pkgs = import nixpkgs {
inherit system;
};
in {
devShell = pkgs.mkShell rec {
name = "cnest-dev";
packages = with pkgs; [
poetry
];
shellHook = ''
export PS1="$(echo -e '\uf3e2') {\[$(tput sgr0)\]\[\033[38;5;228m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]} (${name}) \\$ \[$(tput sgr0)\]"
'';
};
packages = let
cnestTestEnv = pkgs.python3.withPackages (pyPkgs: with pyPkgs; let
cnest = pyPkgs.callPackage ./default.nix {};
in [
cnest
pytest
]);
in {
testShell = pkgs.mkShell rec {
name = "cnest-test-shell";
packages = with pkgs; [
cnestTestEnv
poetry
];
shellHook = ''
export PS1="$(echo -e '\uf3e2') {\[$(tput sgr0)\]\[\033[38;5;228m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]} (${name}) \\$ \[$(tput sgr0)\]"
'';
};
};
});
}