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-10-09 01:59:36 +01:00
|
|
|
version = "8.0.2";
|
2018-03-31 17:30:40 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2020-03-31 15:43:05 +01:00
|
|
|
inherit pname version;
|
2021-10-09 01:59:36 +01:00
|
|
|
sha256 = "7027bc7bbafaab8b2c2816861d8eb372429ee3c02e193fc2f93d6c4ab9de49c5";
|
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 \
|
2019-03-21 10:43:26 +00:00
|
|
|
--replace "'locale'" "'${locale}/bin/locale'"
|
|
|
|
'';
|
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;
|
|
|
|
};
|
|
|
|
}
|