nixpkgs/pkgs/development/tools/devpi-server/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

101 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 = "source/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 ];
};
}