1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, importlib-metadata
6, pytestCheckHook
7
8 # large-rebuild downstream dependencies and applications
9, flask
10, black
11, magic-wormhole
12, mitmproxy
13, typer
14}:
15
16buildPythonPackage rec {
17 pname = "click";
18 version = "8.1.7";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "pallets";
25 repo = "click";
26 rev = "refs/tags/${version}";
27 hash = "sha256-8YqIKRyw5MegnRwAO7YTCZateEFQFTH2PHpE8gTPTow=";
28 };
29
30 propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
31 importlib-metadata
32 ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 ];
37
38 passthru.tests = {
39 inherit black flask magic-wormhole mitmproxy typer;
40 };
41
42 meta = with lib; {
43 homepage = "https://click.palletsprojects.com/";
44 description = "Create beautiful command line interfaces in Python";
45 longDescription = ''
46 A Python package for creating beautiful command line interfaces in a
47 composable way, with as little code as necessary.
48 '';
49 license = licenses.bsd3;
50 maintainers = with maintainers; [ nickcao ];
51 };
52}