mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 17:43:42 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
61 lines
1.1 KiB
Nix
61 lines
1.1 KiB
Nix
{ lib
|
|
, poetry-core
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pythonOlder
|
|
, importlib-metadata
|
|
, packaging
|
|
, pytestCheckHook
|
|
, setuptools
|
|
, git
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "dunamai";
|
|
version = "1.15.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mtkennerly";
|
|
repo = "dunamai";
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "sha256-dqMI51UHbkyfkxAPojRlS6qew2Ob4LbUkYua6zmcQgc=";
|
|
};
|
|
|
|
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
|
|
export HOME=$(mktemp -d)
|
|
|
|
git config --global user.email "nobody@example.com"
|
|
git config --global user.name "Nobody"
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
git
|
|
pytestCheckHook
|
|
setuptools
|
|
];
|
|
|
|
pythonImportsCheck = [ "dunamai" ];
|
|
|
|
meta = with lib; {
|
|
description = "Dynamic version generation";
|
|
homepage = "https://github.com/mtkennerly/dunamai";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ jmgilman ];
|
|
};
|
|
}
|