blob: d2d77f67fc255b6de6a1811046b549e198474539 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
{ 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 ];
};
}
|