2c76a4cb41
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
58 lines
1.1 KiB
Nix
58 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, pythonOlder
|
|
, fetchFromGitHub
|
|
|
|
# propagates
|
|
, importlib-metadata
|
|
|
|
# tests
|
|
, editables
|
|
, git
|
|
, pytestCheckHook
|
|
, setuptools
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pdm-backend";
|
|
version = "2.1.6";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pdm-project";
|
|
repo = "pdm-backend";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-ZEci8VeKYuORs9iAzaEqrtVBh9fMWHlLsFH1e5PRLwA=";
|
|
};
|
|
|
|
env.PDM_BUILD_SCM_VERSION = version;
|
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [
|
|
importlib-metadata
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"pdm.backend"
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
editables
|
|
git
|
|
pytestCheckHook
|
|
setuptools
|
|
];
|
|
|
|
preCheck = ''
|
|
unset PDM_BUILD_SCM_VERSION
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|