c7f94ff3ce
GitOrigin-RevId: b85ed9dcbf187b909ef7964774f8847d554fab3b
48 lines
1,019 B
Nix
48 lines
1,019 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, poetry-core
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "awesomeversion";
|
|
version = "23.8.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ludeeus";
|
|
repo = pname;
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-7JJNO25UfzLs1jEO7XpqFFuEqpY4UecUk25hpONRjrI=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
# Upstream doesn't set a version
|
|
substituteInPlace pyproject.toml \
|
|
--replace 'version = "0"' 'version = "${version}"'
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"awesomeversion"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python module to deal with versions";
|
|
homepage = "https://github.com/ludeeus/awesomeversion";
|
|
changelog = "https://github.com/ludeeus/awesomeversion/releases/tag/${version}";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|