stripe-cli: 1.23.3 -> 1.23.5 (#375724)
[NixPkgs.git] / pkgs / development / python-modules / klaus / default.nix
blobc120217683c6ae957e63ebaab4663b34681730b6
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch,
6   isPy3k,
7   flask,
8   pygments,
9   dulwich,
10   httpauth,
11   humanize,
12   pytest,
13   requests,
14   python-ctags3,
15   mock,
18 buildPythonPackage rec {
19   pname = "klaus";
20   version = "3.0.1";
21   format = "setuptools";
23   src = fetchFromGitHub {
24     owner = "jonashaag";
25     repo = pname;
26     rev = version;
27     hash = "sha256-GflSDhBmMsQ34o3ApraEJ6GmlXXP2kK6WW3lsfr6b7g=";
28   };
30   prePatch = ''
31     substituteInPlace runtests.sh \
32       --replace "mkdir -p \$builddir" "mkdir -p \$builddir && pwd"
33   '';
35   # TODO: remove in next version
36   patches = [
37     (fetchpatch {
38       name = "distutils.patch";
39       url = "https://github.com/jonashaag/klaus/commit/d50d2aab97fd86c11f3b5a4c1ecbcf1e085f395f.patch";
40       hash = "sha256-gJ/ksm96VRNgqIBp+PX/ljzdfQJYbwTBmZaF2Ctu7Fc=";
41     })
42   ];
44   propagatedBuildInputs = [
45     flask
46     pygments
47     dulwich
48     httpauth
49     humanize
50   ];
52   nativeCheckInputs = [
53     pytest
54     requests
55     python-ctags3
56   ] ++ lib.optional (!isPy3k) mock;
58   checkPhase = ''
59     ./runtests.sh
60   '';
62   # Needs to set up some git repos
63   doCheck = false;
65   meta = with lib; {
66     description = "First Git web viewer that Just Works";
67     mainProgram = "klaus";
68     homepage = "https://github.com/jonashaag/klaus";
69     license = licenses.isc;
70     maintainers = with maintainers; [ pSub ];
71   };