2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-09-19 14:19:46 +00:00
|
|
|
fetchpatch,
|
2024-06-05 15:53:02 +00:00
|
|
|
isPy3k,
|
|
|
|
flask,
|
|
|
|
pygments,
|
|
|
|
dulwich,
|
|
|
|
httpauth,
|
|
|
|
humanize,
|
|
|
|
pytest,
|
|
|
|
requests,
|
|
|
|
python-ctags3,
|
|
|
|
mock,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "klaus";
|
2024-06-24 18:47:55 +00:00
|
|
|
version = "3.0.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jonashaag";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-06-24 18:47:55 +00:00
|
|
|
hash = "sha256-GflSDhBmMsQ34o3ApraEJ6GmlXXP2kK6WW3lsfr6b7g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace runtests.sh \
|
|
|
|
--replace "mkdir -p \$builddir" "mkdir -p \$builddir && pwd"
|
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
# TODO: remove in next version
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "distutils.patch";
|
|
|
|
url = "https://github.com/jonashaag/klaus/commit/d50d2aab97fd86c11f3b5a4c1ecbcf1e085f395f.patch";
|
|
|
|
hash = "sha256-gJ/ksm96VRNgqIBp+PX/ljzdfQJYbwTBmZaF2Ctu7Fc=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2024-06-05 15:53:02 +00:00
|
|
|
flask
|
|
|
|
pygments
|
|
|
|
dulwich
|
|
|
|
httpauth
|
|
|
|
humanize
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-06-05 15:53:02 +00:00
|
|
|
pytest
|
|
|
|
requests
|
|
|
|
python-ctags3
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ lib.optional (!isPy3k) mock;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
./runtests.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Needs to set up some git repos
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "First Git web viewer that Just Works";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "klaus";
|
2024-06-05 15:53:02 +00:00
|
|
|
homepage = "https://github.com/jonashaag/klaus";
|
|
|
|
license = licenses.isc;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
};
|
|
|
|
}
|