Skip to content

Commit 3b9be7f

Browse files
authored
python312Packages.result: refactor (NixOS#372913)
2 parents 0f19fd0 + 585cfbd commit 3b9be7f

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

pkgs/development/python-modules/result/default.nix

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22
lib,
33
buildPythonPackage,
44
fetchFromGitHub,
5-
pytestCheckHook,
65
pytest-asyncio,
7-
nix-update-script,
6+
pytest-cov-stub,
7+
pytestCheckHook,
8+
pythonOlder,
89
setuptools,
9-
wheel,
1010
}:
1111

1212
buildPythonPackage rec {
1313
pname = "result";
1414
version = "0.17.0";
1515
pyproject = true;
16-
build-system = [
17-
setuptools
18-
wheel
19-
];
16+
17+
disabled = pythonOlder "3.10";
2018

2119
src = fetchFromGitHub {
2220
owner = "rustedpy";
@@ -25,27 +23,20 @@ buildPythonPackage rec {
2523
hash = "sha256-o+7qKxGQCeMUnsmEReggvf+XwQWFHRCYArYk3DxCa50=";
2624
};
2725

28-
postPatch = ''
29-
substituteInPlace pyproject.toml \
30-
--replace '"--flake8",' "" \
31-
--replace '"--tb=short",' "" \
32-
--replace '"--cov=result",' "" \
33-
--replace '"--cov=tests",' "" \
34-
--replace '"--cov-report=term",' "" \
35-
--replace '"--cov-report=xml",' ""
36-
'';
26+
build-system = [ setuptools ];
3727

3828
nativeCheckInputs = [
39-
pytestCheckHook
4029
pytest-asyncio
30+
pytest-cov-stub
31+
pytestCheckHook
4132
];
4233

43-
passthru.updateScript = nix-update-script { };
4434
pythonImportsCheck = [ "result" ];
4535

4636
meta = with lib; {
47-
description = "A simple Result type for Python 3 inspired by Rust, fully type annotated";
37+
description = "A Rust-like result type for Python";
4838
homepage = "https://github.com/rustedpy/result";
39+
changelog = "https://github.com/rustedpy/result/blob/v${version}/CHANGELOG.md";
4940
license = licenses.mit;
5041
maintainers = with lib.maintainers; [ emattiza ];
5142
};

0 commit comments

Comments
 (0)