2021-06-02 20:14:33 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
|
|
|
, importlib-metadata
|
|
|
|
, locale
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2018-03-31 17:30:40 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "click";
|
2021-11-04 08:13:44 +00:00
|
|
|
version = "8.0.3";
|
2018-03-31 17:30:40 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2020-03-31 15:43:05 +01:00
|
|
|
inherit pname version;
|
2021-11-04 08:13:44 +00:00
|
|
|
sha256 = "sha256-QQ6TKwUPXu13PEzalN51lxyJzbMVWnKggxE5p55ey1s=";
|
2018-03-31 17:30:40 +01:00
|
|
|
};
|
|
|
|
|
2019-03-21 10:43:26 +00:00
|
|
|
postPatch = ''
|
2020-03-31 15:43:05 +01:00
|
|
|
substituteInPlace src/click/_unicodefun.py \
|
2021-11-04 08:13:44 +00:00
|
|
|
--replace '"locale"' "'${locale}/bin/locale'"
|
2019-03-21 10:43:26 +00:00
|
|
|
'';
|
2018-06-11 15:45:25 +01:00
|
|
|
|
2021-06-02 20:14:33 +01:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2018-03-31 17:30:40 +01:00
|
|
|
|
2019-03-21 10:43:26 +00:00
|
|
|
meta = with lib; {
|
2020-03-31 15:43:05 +01:00
|
|
|
homepage = "https://click.palletsprojects.com/";
|
2018-03-31 17:30:40 +01:00
|
|
|
description = "Create beautiful command line interfaces in Python";
|
|
|
|
longDescription = ''
|
|
|
|
A Python package for creating beautiful command line interfaces in a
|
|
|
|
composable way, with as little code as necessary.
|
|
|
|
'';
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|