2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-02-21 08:47:16 +00:00
|
|
|
, poetry-core
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "awesomeversion";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "23.8.0";
|
2022-02-21 08:47:16 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ludeeus";
|
|
|
|
repo = pname;
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-7JJNO25UfzLs1jEO7XpqFFuEqpY4UecUk25hpONRjrI=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
|
2022-02-21 08:47:16 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-15 22:18:51 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-02-21 08:47:16 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Upstream doesn't set a version
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'version = "0"' 'version = "${version}"'
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"awesomeversion"
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to deal with versions";
|
|
|
|
homepage = "https://github.com/ludeeus/awesomeversion";
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://github.com/ludeeus/awesomeversion/releases/tag/${version}";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|