depot/third_party/nixpkgs/pkgs/development/python-modules/dunamai/default.nix
Default email 5083ee08a2 Project import generated by Copybara.
GitOrigin-RevId: 10ecda252ce1b3b1d6403caeadbcc8f30d5ab796
2022-09-30 06:47:45 -05:00

54 lines
1,017 B
Nix

{ lib
, poetry-core
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, importlib-metadata
, packaging
, pytestCheckHook
, setuptools
}:
buildPythonPackage rec {
pname = "dunamai";
version = "1.13.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mtkennerly";
repo = "dunamai";
rev = "refs/tags/v${version}";
sha256 = "sha256-UoqVfRdwOgxNLY17+dPgYO1GIPw3ZUwE/tiVzHjBxcY=";
};
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
setuptools
];
pythonImportsCheck = [ "dunamai" ];
meta = with lib; {
description = "Dynamic version generation";
homepage = "https://github.com/mtkennerly/dunamai";
license = licenses.mit;
maintainers = with maintainers; [ jmgilman ];
};
}