diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/awesomeversion/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/awesomeversion/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/awesomeversion/default.nix b/nixpkgs/pkgs/development/python-modules/awesomeversion/default.nix new file mode 100644 index 000000000000..2c00baf39a8b --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/awesomeversion/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "awesomeversion"; + version = "21.1.3"; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "ludeeus"; + repo = pname; + rev = version; + sha256 = "sha256-D31wmBrYFCArHddAINWjfTPow4K2TD+wGfmRUuIaBdA="; + }; + + postPatch = '' + substituteInPlace setup.py --replace "main" ${version} + ''; + + propagatedBuildInputs = [ requests ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "awesomeversion" ]; + + meta = with lib; { + description = "Python module to deal with versions"; + homepage = "https://github.com/ludeeus/awesomeversion"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |