-
Notifications
You must be signed in to change notification settings - Fork 0
/
derivation.nix
95 lines (74 loc) · 1.71 KB
/
derivation.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
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
92
93
94
{ pkgs }:
let
aggregate6 = pkgs.python3Packages.buildPythonPackage rec {
pname = "aggregate6";
version = "1.0.12";
format = "pyproject";
src = pkgs.fetchFromGitHub {
owner = "job";
repo = pname;
rev = version;
hash = "sha256-tBo9LSmEu/0KPSeg17dlh7ngUvP9GyW6b01qqpr5Bx0=";
};
postPatch = ''
substituteInPlace setup.py --replace-fail 'py-radix==0.10.0' 'py-radix-sr'
'';
nativeBuildInputs = with pkgs.python3Packages; [
setuptools
];
nativeCheckInputs = with pkgs.python3Packages; [
pytest
mock
coverage
nose
];
propagatedBuildInputs = with pkgs.python3Packages; [
py-radix-sr
];
checkPhase = ''
runHook preCheck
pytest -vs -x tests
runHook postCheck
'';
doCheck = true;
};
in
pkgs.python3Packages.buildPythonPackage rec {
pname = "arouteserver";
version = "1.23.1";
format = "pyproject";
src = pkgs.fetchFromGitHub {
owner = "pierky";
repo = pname;
rev = "v${version}";
hash = "sha256-EZOBMDBsxbuVzzjQWU8V4n3gcLkRQxCq2eVK/Tyko4E=";
};
nativeBuildInputs = with pkgs.python3Packages; [
setuptools
];
buildInputs = with pkgs; [
bgpq4
];
nativeCheckInputs = with pkgs.python3Packages;[
pytest
];
checkInputs = with pkgs.python3Packages; [
requests-mock
];
propagatedBuildInputs = with pkgs.python3Packages; [
aggregate6
jinja2
pyyaml
requests
packaging
urllib3
# WHAT??? -> https://github.com/search?q=repo%3Apierky%2Farouteserver%20pkg_resources&type=code
setuptools
];
checkPhase = ''
runHook preCheck
pytest -vs -x tests/static/
runHook postCheck
'';
doCheck = true;
}