at master 2.7 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonApplication, 5 gitUpdater, 6 pythonOlder, 7 aiohttp, 8 appdirs, 9 beautifulsoup4, 10 defusedxml, 11 devpi-common, 12 execnet, 13 itsdangerous, 14 nginx, 15 packaging, 16 passlib, 17 platformdirs, 18 pluggy, 19 py, 20 httpx, 21 pyramid, 22 pytest-asyncio, 23 pytestCheckHook, 24 repoze-lru, 25 setuptools, 26 strictyaml, 27 waitress, 28 webtest, 29 testers, 30 devpi-server, 31 nixosTests, 32}: 33 34buildPythonApplication rec { 35 pname = "devpi-server"; 36 version = "6.15.0"; 37 pyproject = true; 38 39 disabled = pythonOlder "3.7"; 40 41 src = fetchFromGitHub { 42 owner = "devpi"; 43 repo = "devpi"; 44 rev = "server-${version}"; 45 hash = "sha256-tKR1xZju5bDbFu8t3SunTM8FlaXodSm/OjJ3Jfl7Dzk="; 46 }; 47 48 sourceRoot = "${src.name}/server"; 49 50 postPatch = '' 51 substituteInPlace tox.ini \ 52 --replace "--flake8" "" 53 ''; 54 55 nativeBuildInputs = [ 56 setuptools 57 ]; 58 59 propagatedBuildInputs = [ 60 aiohttp 61 appdirs 62 defusedxml 63 devpi-common 64 execnet 65 itsdangerous 66 packaging 67 passlib 68 platformdirs 69 pluggy 70 pyramid 71 repoze-lru 72 setuptools 73 strictyaml 74 waitress 75 py 76 httpx 77 ] 78 ++ passlib.optional-dependencies.argon2; 79 80 nativeCheckInputs = [ 81 beautifulsoup4 82 nginx 83 py 84 pytest-asyncio 85 pytestCheckHook 86 webtest 87 ]; 88 89 # root_passwd_hash tries to write to store 90 # TestMirrorIndexThings tries to write to /var through ngnix 91 # nginx tests try to write to /var 92 preCheck = '' 93 export PATH=$PATH:$out/bin 94 export HOME=$TMPDIR 95 ''; 96 pytestFlags = [ 97 "-rfsxX" 98 ]; 99 enabledTestPaths = [ 100 "./test_devpi_server" 101 ]; 102 disabledTestPaths = [ 103 "test_devpi_server/test_nginx_replica.py" 104 "test_devpi_server/test_streaming_nginx.py" 105 "test_devpi_server/test_streaming_replica_nginx.py" 106 ]; 107 disabledTests = [ 108 "root_passwd_hash_option" 109 "TestMirrorIndexThings" 110 "test_auth_mirror_url_no_hash" 111 "test_auth_mirror_url_with_hash" 112 "test_auth_mirror_url_hidden_in_logs" 113 "test_simplelinks_timeout" 114 ]; 115 116 __darwinAllowLocalNetworking = true; 117 118 pythonImportsCheck = [ 119 "devpi_server" 120 ]; 121 122 passthru.tests = { 123 devpi-server = nixosTests.devpi-server; 124 version = testers.testVersion { 125 package = devpi-server; 126 }; 127 }; 128 129 # devpi uses a monorepo for server,common,client and web 130 passthru.updateScript = gitUpdater { 131 rev-prefix = "server-"; 132 }; 133 134 meta = with lib; { 135 homepage = "http://doc.devpi.net"; 136 description = "Github-style pypi index server and packaging meta tool"; 137 changelog = "https://github.com/devpi/devpi/blob/${src.rev}/server/CHANGELOG"; 138 license = licenses.mit; 139 maintainers = with maintainers; [ makefu ]; 140 }; 141}