5c370c0b2a
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
64 lines
1.2 KiB
Nix
64 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, pythonOlder
|
|
, fetchFromGitHub
|
|
|
|
# propagates
|
|
, importlib-metadata
|
|
|
|
# tests
|
|
, editables
|
|
, git
|
|
, mercurial
|
|
, pytestCheckHook
|
|
, setuptools
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pdm-backend";
|
|
version = "2.3.0";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pdm-project";
|
|
repo = "pdm-backend";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-V+NESf7NavR6L6ko4Oh4KhAR2iIN5GiHZPELwvkpr4c=";
|
|
};
|
|
|
|
env.PDM_BUILD_SCM_VERSION = version;
|
|
|
|
dependencies = lib.optionals (pythonOlder "3.10") [
|
|
importlib-metadata
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"pdm.backend"
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
editables
|
|
git
|
|
mercurial
|
|
pytestCheckHook
|
|
setuptools
|
|
];
|
|
|
|
preCheck = ''
|
|
unset PDM_BUILD_SCM_VERSION
|
|
|
|
# tests require a configured git identity
|
|
export HOME=$TMPDIR
|
|
git config --global user.email nixbld@localhost
|
|
'';
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/pdm-project/pdm-backend";
|
|
changelog = "https://github.com/pdm-project/pdm-backend/releases/tag/${version}";
|
|
description = "Yet another PEP 517 backend.";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ hexa ];
|
|
};
|
|
}
|