2022-03-18 22:50:59 +01:00
|
|
|
{ lib
|
|
|
|
, poetry-core
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, importlib-metadata
|
|
|
|
, packaging
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dunamai";
|
2022-04-05 20:07:58 +02:00
|
|
|
version = "1.11.1";
|
2022-03-18 22:50:59 +01:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mtkennerly";
|
|
|
|
repo = "dunamai";
|
|
|
|
rev = "v${version}";
|
2022-04-05 20:07:58 +02:00
|
|
|
sha256 = "sha256-nkE9QBziCQA/aN+Z0OuqJlf5FJ4fidE7u5Gt25zjX0c=";
|
2022-03-18 22:50:59 +01: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
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "dunamai" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Dynamic version generation";
|
|
|
|
homepage = "https://github.com/mtkennerly/dunamai";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jmgilman ];
|
|
|
|
};
|
|
|
|
}
|