mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +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.
69 lines
1.2 KiB
Nix
69 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, isPy27
|
|
, pythonAtLeast
|
|
, poetry-core
|
|
|
|
# propagates
|
|
, pylev
|
|
, pastel
|
|
|
|
# python36+
|
|
, crashtest
|
|
|
|
# python2
|
|
, typing
|
|
, enum34
|
|
|
|
# tests
|
|
, pytest-mock
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "clikit";
|
|
version = "0.6.2";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sdispater";
|
|
repo = pname;
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-xAsUNhVQBjtSFHyjjnicAKRC3+Tdn3AdGDUYhmOOIdA=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml --replace \
|
|
'crashtest = { version = "^0.3.0", python = "^3.6" }' \
|
|
'crashtest = { version = "*", python = "^3.6" }'
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
pylev
|
|
pastel
|
|
]
|
|
++ lib.optionals (pythonAtLeast "3.6") [ crashtest ]
|
|
++ lib.optionals isPy27 [ typing enum34 ];
|
|
|
|
nativeCheckInputs = [
|
|
pytest-mock
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"clikit"
|
|
];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/sdispater/clikit";
|
|
description = "A group of utilities to build beautiful and testable command line interfaces";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ jakewaksbaum ];
|
|
};
|
|
}
|