depot/third_party/nixpkgs/pkgs/development/python-modules/klaus/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

40 lines
988 B
Nix

{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, flask, pygments, dulwich, httpauth, humanize, pytest, requests, python-ctags3, mock }:
buildPythonPackage rec {
pname = "klaus";
version = "2.0.3";
src = fetchFromGitHub {
owner = "jonashaag";
repo = pname;
rev = version;
hash = "sha256-VAwIdmwdo/Rim2sVlR605Wo5/zkNOMiGkh40qLrENmU=";
};
prePatch = ''
substituteInPlace runtests.sh \
--replace "mkdir -p \$builddir" "mkdir -p \$builddir && pwd"
'';
propagatedBuildInputs = [
flask pygments dulwich httpauth humanize
];
nativeCheckInputs = [
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; [ pSub ];
};
}