fcc03dbfc5
GitOrigin-RevId: ff96a0fa5635770390b184ae74debea75c3fd534
39 lines
803 B
Nix
39 lines
803 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, requests
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "awesomeversion";
|
|
version = "21.2.2";
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ludeeus";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "1yl09csypa64nhsw7dc6kj8iybm1wkhfzylyfyq8b7jpwdx7ql31";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|