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