2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, poetry-core
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, importlib-metadata
|
|
|
|
, packaging
|
|
|
|
, pytestCheckHook
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dunamai";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "1.13.1";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mtkennerly";
|
|
|
|
repo = "dunamai";
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-09-30 11:47:45 +00:00
|
|
|
sha256 = "sha256-UoqVfRdwOgxNLY17+dPgYO1GIPw3ZUwE/tiVzHjBxcY=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
packaging
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
|
|
|
# needs to be able to run dunami from PATH
|
|
|
|
preCheck = ''
|
|
|
|
export PATH=$PATH:$out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2022-09-30 11:47:45 +00:00
|
|
|
setuptools
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "dunamai" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Dynamic version generation";
|
|
|
|
homepage = "https://github.com/mtkennerly/dunamai";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jmgilman ];
|
|
|
|
};
|
|
|
|
}
|