-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdefault.nix
More file actions
49 lines (40 loc) · 910 Bytes
/
default.nix
File metadata and controls
49 lines (40 loc) · 910 Bytes
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
{
nixpkgs ? import (builtins.fetchGit {
url = "https://siriobalmelli@github.com/siriobalmelli-foss/nixpkgs.git";
ref = "master";
}) { }
}:
with nixpkgs;
with python3Packages;
if lib.inNixShell then
mkShell {
buildInputs = [
# no system dependencies
] ++ [
# use venv to handle all Python deps for sane development
# make SURE nix-shell is run with --pure to avoid seeing system python things
python
venvShellHook
];
venvDir = "venv";
postShellHook = ''
export SOURCE_DATE_EPOCH=315532800 # fix ZIP does not support timestamps before 1980
alias pip="python -m pip"
'';
}
else
buildPythonApplication rec {
name = "replacement";
src = ./.;
propagatedBuildInputs = [
ruamel_yaml
];
checkInputs = [
pytest
sh
];
doCheck = true;
checkPhase = ''
pytest
'';
}