841d9c7fc1
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
39 lines
802 B
Nix
39 lines
802 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, requests
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "awesomeversion";
|
|
version = "21.6.0";
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ludeeus";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-TODlLaj3bcNVHrly614oKe2OkhmowsJojpR7apUIojc=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|