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 flit-core,
16}:
17
18buildPythonPackage rec {
19 pname = "click";
20 version = "8.1.8";
21 pyproject = true;
22
23 disabled = pythonOlder "3.7";
24
25 src = fetchFromGitHub {
26 owner = "pallets";
27 repo = "click";
28 tag = version;
29 hash = "sha256-pAAqf8jZbDfVZUoltwIFpov/1ys6HSYMyw3WV2qcE/M=";
30 };
31
32 build-system = [ flit-core ];
33 dependencies = lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
34
35 nativeCheckInputs = [ pytestCheckHook ];
36
37 disabledTests = [
38 # test fails with filename normalization on zfs
39 "test_file_surrogates"
40 ];
41
42 passthru.tests = {
43 inherit
44 black
45 flask
46 magic-wormhole
47 mitmproxy
48 typer
49 ;
50 };
51
52 meta = with lib; {
53 homepage = "https://click.palletsprojects.com/";
54 description = "Create beautiful command line interfaces in Python";
55 longDescription = ''
56 A Python package for creating beautiful command line interfaces in a
57 composable way, with as little code as necessary.
58 '';
59 license = licenses.bsd3;
60 maintainers = with maintainers; [ nickcao ];
61 };
62}