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