1{ lib, buildPythonPackage, fetchPypi, locale, pytest }:
2
3buildPythonPackage rec {
4 pname = "click";
5 version = "7.0";
6
7 src = fetchPypi {
8 pname = "Click";
9 inherit version;
10 sha256 = "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7";
11 };
12
13 postPatch = ''
14 substituteInPlace click/_unicodefun.py \
15 --replace "'locale'" "'${locale}/bin/locale'"
16 '';
17
18 buildInputs = [ pytest ];
19
20 checkPhase = ''
21 py.test tests
22 '';
23
24 # https://github.com/pallets/click/issues/823
25 doCheck = false;
26
27 meta = with lib; {
28 homepage = http://click.pocoo.org/;
29 description = "Create beautiful command line interfaces in Python";
30 longDescription = ''
31 A Python package for creating beautiful command line interfaces in a
32 composable way, with as little code as necessary.
33 '';
34 license = licenses.bsd3;
35 };
36}