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