1{ lib, fetchFromGitHub, buildPythonApplication
2, pythonOlder
3, aiohttp
4, appdirs
5, beautifulsoup4
6, defusedxml
7, devpi-common
8, execnet
9, itsdangerous
10, nginx
11, packaging
12, passlib
13, platformdirs
14, pluggy
15, py
16, pyramid
17, pytestCheckHook
18, repoze_lru
19, setuptools
20, strictyaml
21, waitress
22, webtest
23}:
24
25
26buildPythonApplication rec {
27 pname = "devpi-server";
28 version = "6.9.2";
29 pyproject = true;
30
31 disabled = pythonOlder "3.7";
32
33 src = fetchFromGitHub {
34 owner = "devpi";
35 repo = "devpi";
36 rev = "server-${version}";
37 hash = "sha256-HnxWLxOK+6B8O/7lpNjuSUQ0Z7NOmV2n01WFyjow6oU=";
38 };
39
40 sourceRoot = "${src.name}/server";
41
42 postPatch = ''
43 substituteInPlace tox.ini \
44 --replace "--flake8" ""
45 '';
46
47 nativeBuildInputs = [
48 setuptools
49 ];
50
51 propagatedBuildInputs = [
52 aiohttp
53 appdirs
54 defusedxml
55 devpi-common
56 execnet
57 itsdangerous
58 packaging
59 passlib
60 platformdirs
61 pluggy
62 pyramid
63 repoze_lru
64 setuptools
65 strictyaml
66 waitress
67 ] ++ passlib.optional-dependencies.argon2;
68
69 nativeCheckInputs = [
70 beautifulsoup4
71 nginx
72 py
73 pytestCheckHook
74 webtest
75 ];
76
77 # root_passwd_hash tries to write to store
78 # TestMirrorIndexThings tries to write to /var through ngnix
79 # nginx tests try to write to /var
80 preCheck = ''
81 export PATH=$PATH:$out/bin
82 export HOME=$TMPDIR
83 '';
84 pytestFlagsArray = [
85 "./test_devpi_server"
86 "--slow"
87 "-rfsxX"
88 "--ignore=test_devpi_server/test_nginx_replica.py"
89 "--ignore=test_devpi_server/test_streaming_nginx.py"
90 "--ignore=test_devpi_server/test_streaming_replica_nginx.py"
91 ];
92 disabledTests = [
93 "root_passwd_hash_option"
94 "TestMirrorIndexThings"
95 "test_auth_mirror_url_no_hash"
96 "test_auth_mirror_url_with_hash"
97 "test_auth_mirror_url_hidden_in_logs"
98 ];
99
100 __darwinAllowLocalNetworking = true;
101
102 pythonImportsCheck = [
103 "devpi_server"
104 ];
105
106 meta = with lib;{
107 homepage = "http://doc.devpi.net";
108 description = "Github-style pypi index server and packaging meta tool";
109 changelog = "https://github.com/devpi/devpi/blob/${src.rev}/server/CHANGELOG";
110 license = licenses.mit;
111 maintainers = with maintainers; [ makefu ];
112 };
113}