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