8a45d4525b
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
52 lines
979 B
Nix
52 lines
979 B
Nix
{ lib
|
|
, poetry-core
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pythonOlder
|
|
, importlib-metadata
|
|
, packaging
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "dunamai";
|
|
version = "1.10.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mtkennerly";
|
|
repo = "dunamai";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-Sp0yfNkFwNc2qR9aSPteBqZcqRokM9whOVmduXVK3CI=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|