nixpkgs/pkgs/development/tools/devpi-client/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

84 lines
1.5 KiB
Nix

{ lib
, devpi-server
, git
, glibcLocales
, python3
, fetchPypi
}:
python3.pkgs.buildPythonApplication rec {
pname = "devpi-client";
version = "7.0.2";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-oOX5Z8WXgNJYsgXqHE2CsXdDnA3XmDF6axD1D318bPQ=";
};
postPatch = ''
substituteInPlace tox.ini \
--replace "--flake8" ""
'';
nativeBuildInputs = with python3.pkgs; [
setuptools
setuptools-changelog-shortener
wheel
];
buildInputs = [
glibcLocales
];
propagatedBuildInputs = with python3.pkgs; [
build
check-manifest
devpi-common
iniconfig
pkginfo
pluggy
platformdirs
];
nativeCheckInputs = [
devpi-server
git
] ++ (with python3.pkgs; [
mercurial
mock
pypitoken
pytestCheckHook
sphinx
virtualenv
webtest
wheel
]);
preCheck = ''
export HOME=$(mktemp -d);
'';
pytestFlagsArray = [
# --fast skips tests which try to start a devpi-server improperly
"--fast"
];
LC_ALL = "en_US.UTF-8";
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [
"devpi"
];
meta = with lib; {
description = "Client for devpi, a pypi index server and packaging meta tool";
mainProgram = "devpi";
homepage = "http://doc.devpi.net";
changelog = "https://github.com/devpi/devpi/blob/client-${version}/client/CHANGELOG";
license = licenses.mit;
maintainers = with maintainers; [ lewo makefu ];
};
}