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";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "22.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;
|
|
|
|
rev = version;
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-peSGe9ycxVD2ve8tFpmznQZr3Hrc1KimeVlThmd0NFo=";
|
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
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|