diff --git a/pkgs/servers/web-apps/klaus/default.nix b/pkgs/servers/web-apps/klaus/default.nix new file mode 100644 index 000000000000..bb953ecc03ab --- /dev/null +++ b/pkgs/servers/web-apps/klaus/default.nix @@ -0,0 +1,40 @@ +{ lib, python, fetchFromGitHub }: + +python.pkgs.buildPythonApplication 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; [ matthiasbeyer ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e8e6b9008295..15276ebe51a5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1276,6 +1276,8 @@ with pkgs; kisslicer = callPackage ../tools/misc/kisslicer { }; + klaus = callPackage ../servers/web-apps/klaus { }; + lcdproc = callPackage ../servers/monitoring/lcdproc { }; languagetool = callPackage ../tools/text/languagetool { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6ee0aa377f22..75f88517d67f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8944,27 +8944,6 @@ in { keyutils = callPackage ../development/python-modules/keyutils { }; - klaus = buildPythonPackage rec { - version = "0.9.1"; - name = "klaus-${version}"; - - src = pkgs.fetchurl { - url = "https://github.com/jonashaag/klaus/archive/${version}.tar.gz"; - sha256 = "0k3v3p56hq8alm083grrp98znxkz1zqx0pczm2lah8qddbyrdkgm"; - }; - - propagatedBuildInputs = with self; - [ humanize httpauth dulwich pygments flask six ]; - - meta = { - description = "The first Git web viewer that Just Works"; - homepage = "https://github.com/jonashaag/klaus"; - #license = licenses.mit; # I'm not sure about the license - maintainers = with maintainers; [ matthiasbeyer ]; - platforms = platforms.linux; # Can only test linux - }; - }; - klein = buildPythonPackage rec { name = "klein-15.3.1"; src = pkgs.fetchurl {