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