1{ lib, python, fetchFromGitHub }:
2
3python.pkgs.buildPythonPackage rec {
4 pname = "klaus";
5 version = "1.4.0";
6
7 src = fetchFromGitHub {
8 owner = "jonashaag";
9 repo = pname;
10 rev = version;
11 sha256 = "041l5dpymi9h0yyr55r6m0skp0m2ags3miay0s1bgfcp469k0l20";
12 };
13
14 prePatch = ''
15 substituteInPlace runtests.sh \
16 --replace "mkdir -p \$builddir" "mkdir -p \$builddir && pwd"
17 '';
18
19 propagatedBuildInputs = with python.pkgs; [
20 six flask pygments dulwich httpauth humanize
21 ];
22
23 checkInputs = with python.pkgs; [
24 pytest requests python-ctags3
25 ] ++ lib.optional (!isPy3k) mock;
26
27 checkPhase = ''
28 ./runtests.sh
29 '';
30
31 # Needs to set up some git repos
32 doCheck = false;
33
34 meta = with lib; {
35 description = "The first Git web viewer that Just Works";
36 homepage = https://github.com/jonashaag/klaus;
37 license = licenses.isc;
38 maintainers = with maintainers; [ pSub ];
39 };
40}