nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchPypi
4
5# propagtes
6, sigtools
7, six
8, attrs
9, od
10, docutils
11
12# extras: datetime
13, python-dateutil
14
15# tests
16, pygments
17, unittest2
18, pytestCheckHook
19}:
20
21buildPythonPackage rec {
22 pname = "clize";
23 version = "4.2.1";
24
25 src = fetchPypi {
26 inherit pname version;
27 sha256 = "3177a028e4169d8865c79af82bdd441b24311d4bd9c0ae8803641882d340a51d";
28 };
29
30 postPatch = ''
31 substituteInPlace setup.py \
32 --replace "docutils ~= 0.17.0" "docutils"
33 '';
34
35 propagatedBuildInputs = [
36 attrs
37 docutils
38 od
39 sigtools
40 six
41 ];
42
43 passthru.optional-dependencies = {
44 datetime = [
45 python-dateutil
46 ];
47 };
48
49 # repeated_test no longer exists in nixpkgs
50 # also see: https://github.com/epsy/clize/issues/74
51 doCheck = false;
52 checkInputs = [
53 pytestCheckHook
54 python-dateutil
55 pygments
56 unittest2
57 ];
58
59 pythonImportsCheck = [ "clize" ];
60
61 meta = with lib; {
62 description = "Command-line argument parsing for Python";
63 homepage = "https://github.com/epsy/clize";
64 license = licenses.mit;
65 maintainers = with maintainers; [ ];
66 };
67}