1{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, flask, pygments, dulwich, httpauth, humanize, pytest, requests, python-ctags3, mock }:
2
3buildPythonPackage rec {
4 pname = "klaus";
5 version = "2.0.3";
6
7 src = fetchFromGitHub {
8 owner = "jonashaag";
9 repo = pname;
10 rev = version;
11 hash = "sha256-VAwIdmwdo/Rim2sVlR605Wo5/zkNOMiGkh40qLrENmU=";
12 };
13
14 prePatch = ''
15 substituteInPlace runtests.sh \
16 --replace "mkdir -p \$builddir" "mkdir -p \$builddir && pwd"
17 '';
18
19 propagatedBuildInputs = [
20 flask pygments dulwich httpauth humanize
21 ];
22
23 nativeCheckInputs = [
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}