4f0dadbf38
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
135 lines
2.6 KiB
Nix
135 lines
2.6 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
buildPythonApplication,
|
|
gitUpdater,
|
|
pythonOlder,
|
|
aiohttp,
|
|
appdirs,
|
|
beautifulsoup4,
|
|
defusedxml,
|
|
devpi-common,
|
|
execnet,
|
|
itsdangerous,
|
|
nginx,
|
|
packaging,
|
|
passlib,
|
|
platformdirs,
|
|
pluggy,
|
|
py,
|
|
httpx,
|
|
pyramid,
|
|
pytestCheckHook,
|
|
repoze-lru,
|
|
setuptools,
|
|
strictyaml,
|
|
waitress,
|
|
webtest,
|
|
testers,
|
|
devpi-server,
|
|
nixosTests,
|
|
}:
|
|
|
|
buildPythonApplication rec {
|
|
pname = "devpi-server";
|
|
version = "6.14.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "devpi";
|
|
repo = "devpi";
|
|
rev = "server-${version}";
|
|
hash = "sha256-j8iILbptUw8DUE9lFpjDp/VYzdJzmOYqM/RCnkpWdcA=";
|
|
};
|
|
|
|
sourceRoot = "${src.name}/server";
|
|
|
|
postPatch = ''
|
|
substituteInPlace tox.ini \
|
|
--replace "--flake8" ""
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
appdirs
|
|
defusedxml
|
|
devpi-common
|
|
execnet
|
|
itsdangerous
|
|
packaging
|
|
passlib
|
|
platformdirs
|
|
pluggy
|
|
pyramid
|
|
repoze-lru
|
|
setuptools
|
|
strictyaml
|
|
waitress
|
|
py
|
|
httpx
|
|
] ++ 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"
|
|
"-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"
|
|
"test_auth_mirror_url_no_hash"
|
|
"test_auth_mirror_url_with_hash"
|
|
"test_auth_mirror_url_hidden_in_logs"
|
|
"test_simplelinks_timeout"
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
pythonImportsCheck = [
|
|
"devpi_server"
|
|
];
|
|
|
|
passthru.tests = {
|
|
devpi-server = nixosTests.devpi-server;
|
|
version = testers.testVersion {
|
|
package = devpi-server;
|
|
};
|
|
};
|
|
|
|
# devpi uses a monorepo for server,common,client and web
|
|
passthru.updateScript = gitUpdater {
|
|
rev-prefix = "server-";
|
|
};
|
|
|
|
meta = with lib; {
|
|
homepage = "http://doc.devpi.net";
|
|
description = "Github-style pypi index server and packaging meta tool";
|
|
changelog = "https://github.com/devpi/devpi/blob/${src.rev}/server/CHANGELOG";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ makefu ];
|
|
};
|
|
}
|