My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/dunamai/default.nix

52 lines
989 B

{ lib
, poetry-core
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, importlib-metadata
, packaging
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "dunamai";
version = "1.12.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mtkennerly";
repo = "dunamai";
rev = "refs/tags/v${version}";
sha256 = "sha256-SyHml8TIcqU7KQE4IuTZbp+Jktao7ReJHQyHV8wKeWg=";
};
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 ];
};
}