1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchPypi
5, importlib-metadata
6, locale
7, pytestCheckHook
8}:
9
10buildPythonPackage rec {
11 pname = "click";
12 version = "8.0.3";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "sha256-QQ6TKwUPXu13PEzalN51lxyJzbMVWnKggxE5p55ey1s=";
17 };
18
19 postPatch = ''
20 substituteInPlace src/click/_unicodefun.py \
21 --replace '"locale"' "'${locale}/bin/locale'"
22 '';
23
24 propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
25 importlib-metadata
26 ];
27
28 checkInputs = [
29 pytestCheckHook
30 ];
31
32 meta = with lib; {
33 homepage = "https://click.palletsprojects.com/";
34 description = "Create beautiful command line interfaces in Python";
35 longDescription = ''
36 A Python package for creating beautiful command line interfaces in a
37 composable way, with as little code as necessary.
38 '';
39 license = licenses.bsd3;
40 };
41}