klaus: make available as a python package

This makes it usable via WSGI.
This commit is contained in:
Aneesh Agrawal
2018-06-03 17:57:14 -07:00
parent c2ab820d6a
commit 4bba2bd98e
3 changed files with 4 additions and 2 deletions

View File

@@ -0,0 +1,40 @@
{ lib, python, fetchFromGitHub }:
python.pkgs.buildPythonPackage rec {
pname = "klaus";
version = "1.2.2";
src = fetchFromGitHub {
owner = "jonashaag";
repo = pname;
rev = version;
sha256 = "0hkl1ycyd5ccijmknr3yfp3ga43y01m7390xnibqqgaisfvcm9wp";
};
prePatch = ''
substituteInPlace runtests.sh \
--replace "mkdir -p \$builddir" "mkdir -p \$builddir && pwd"
'';
propagatedBuildInputs = with python.pkgs; [
six flask pygments dulwich httpauth humanize
];
checkInputs = with python.pkgs; [
pytest requests python-ctags3
] ++ lib.optional (!isPy3k) mock;
checkPhase = ''
./runtests.sh
'';
# Needs to set up some git repos
doCheck = false;
meta = with lib; {
description = "The first Git web viewer that Just Works";
homepage = https://github.com/jonashaag/klaus;
license = licenses.isc;
maintainers = with maintainers; [ ];
};
}