-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
/
default.nix
71 lines (62 loc) · 1.42 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{ lib
, stdenv
, buildPythonPackage
, fetchpatch
, fetchPypi
, click
, pytestCheckHook
, shellingham
, pytest-xdist
, pytest-sugar
, coverage
, mypy
, black
, isort
, pythonOlder
}:
buildPythonPackage rec {
pname = "typer";
version = "0.4.0";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "1pgm0zsylbmz1r96q4n3rfi0h3pn4jss2yfs83z0yxa90nmsxhv3";
};
patches = [
(fetchpatch {
# use get_terminal_size from shutil; click 8.1.0 compat
# https://github.com/tiangolo/typer/pull/375
name = "typer-click-8.1-compat.patch";
url = "https://github.com/tiangolo/typer/commit/b6efa2f8f40291fd80cf146b617e0ba305f6af3c.patch";
hash = "sha256-m0EWpBUt5njoPsn043b30WdAQELYNn2ycHXBxZCYXZE=";
})
];
propagatedBuildInputs = [
click
];
checkInputs = [
pytestCheckHook
pytest-xdist
pytest-sugar
shellingham
coverage
mypy
black
isort
];
preCheck = ''
export HOME=$(mktemp -d);
'';
disabledTests = lib.optionals stdenv.isDarwin [
# likely related to https://github.com/sarugaku/shellingham/issues/35
"test_show_completion"
"test_install_completion"
];
pythonImportsCheck = [ "typer" ];
meta = with lib; {
description = "Python library for building CLI applications";
homepage = "https://typer.tiangolo.com/";
license = licenses.mit;
maintainers = with maintainers; [ winpat ];
};
}