1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, packaging
5, poetry-core
6, pytestCheckHook
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "newversion";
12 version = "2.0.0";
13 format = "pyproject";
14
15 disabled = pythonOlder "3.8";
16
17 src = fetchFromGitHub {
18 owner = "vemel";
19 repo = "newversion";
20 rev = "refs/tags/${version}";
21 hash = "sha256-v9hfk2/hBkWtOobQdaYXNOZTTcEqnMV6JYqtjjoidOs=";
22 };
23
24 nativeBuildInputs = [
25 poetry-core
26 ];
27
28 propagatedBuildInputs = [
29 packaging
30 ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 ];
35
36 pythonImportsCheck = [
37 "newversion"
38 ];
39
40 meta = with lib; {
41 description = "PEP 440 version manager";
42 homepage = "https://github.com/vemel/newversion";
43 changelog = "https://github.com/vemel/newversion/releases/tag/${version}";
44 license = with licenses; [ mit ];
45 maintainers = with maintainers; [ fab ];
46 };
47}