depot/third_party/nixpkgs/pkgs/development/tools/devpi-server/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

100 lines
1.9 KiB
Nix

{ lib, fetchFromGitHub, buildPythonApplication, isPy27
, aiohttp
, appdirs
, beautifulsoup4
, defusedxml
, devpi-common
, execnet
, itsdangerous
, nginx
, packaging
, passlib
, platformdirs
, pluggy
, py
, pyramid
, pytestCheckHook
, repoze_lru
, setuptools
, strictyaml
, waitress
, webtest
}:
buildPythonApplication rec {
pname = "devpi-server";
version = "6.7.0";
format = "setuptools";
disabled = isPy27;
src = fetchFromGitHub {
owner = "devpi";
repo = "devpi";
rev = "server-${version}";
hash = "sha256-tevQ/Ocusz2PythGnedP6r4xARgetVosAc8uTD49H3M=";
};
sourceRoot = "${src.name}/server";
postPatch = ''
substituteInPlace tox.ini \
--replace "--flake8" ""
'';
propagatedBuildInputs = [
aiohttp
appdirs
defusedxml
devpi-common
execnet
itsdangerous
packaging
passlib
platformdirs
pluggy
pyramid
repoze_lru
setuptools
strictyaml
waitress
] ++ passlib.optional-dependencies.argon2;
nativeCheckInputs = [
beautifulsoup4
nginx
py
pytestCheckHook
webtest
];
# root_passwd_hash tries to write to store
# TestMirrorIndexThings tries to write to /var through ngnix
# nginx tests try to write to /var
preCheck = ''
export PATH=$PATH:$out/bin
export HOME=$TMPDIR
'';
pytestFlagsArray = [
"./test_devpi_server"
"--slow"
"-rfsxX"
"--ignore=test_devpi_server/test_nginx_replica.py"
"--ignore=test_devpi_server/test_streaming_nginx.py"
"--ignore=test_devpi_server/test_streaming_replica_nginx.py"
];
disabledTests = [
"root_passwd_hash_option"
"TestMirrorIndexThings"
];
__darwinAllowLocalNetworking = true;
meta = with lib;{
homepage = "http://doc.devpi.net";
description = "Github-style pypi index server and packaging meta tool";
license = licenses.mit;
maintainers = with maintainers; [ makefu ];
};
}