From 02d72380017ae1f3744b4be6726dcab783b079bb Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 22 Jul 2023 23:46:41 +0100 Subject: klaus: Add python-klaus. * guix/forge/klaus.scm: Import python-pytest from (gnu packages check); python-flask and python-werkzeug from (gnu packages python-web); python-dulwich, python-humanize and python-pygments from (gnu packages python-xyz). (python-klaus): New variable. --- guix/forge/klaus.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) (limited to 'guix/forge') diff --git a/guix/forge/klaus.scm b/guix/forge/klaus.scm index 099b42f..ba963ee 100644 --- a/guix/forge/klaus.scm +++ b/guix/forge/klaus.scm @@ -18,7 +18,11 @@ ;;; . (define-module (forge klaus) - #:use-module ((gnu packages check) #:select (python-nose)) + #:use-module ((gnu packages check) #:select (python-nose python-pytest)) + #:use-module ((gnu packages python-web) + #:select (python-flask python-werkzeug)) + #:use-module ((gnu packages python-xyz) + #:select (python-dulwich python-humanize python-pygments)) #:use-module ((gnu packages version-control) #:select (git-minimal)) #:use-module (guix build-system pyproject) #:use-module (guix build-system python) @@ -67,3 +71,49 @@ routes using HTTP Digest Authentication.") "return 1;")) ;; Disable tests broken by this change. (setenv "GIT_SKIP_TESTS" "t0033 t9700"))))))))) + +(define-public python-klaus + (package + (name "python-klaus") + (version "2.0.3") + (source (origin + (method url-fetch) + (uri (pypi-uri "klaus" version)) + (sha256 + (base32 + "1y06xnynfah5d4zif2fc0n83zdr0d1vkh0rwcinsi6wjxalvnhjw")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f ; tests fail + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'configure-git + (lambda* (#:key inputs #:allow-other-keys) + (for-each (lambda (file) + (substitute* file + (("\"git\"") + (string-append "\"" (search-input-file inputs "/bin/git") "\"")))) + (list "klaus/ctagsutils.py" + "klaus/repo.py" + "klaus/utils.py" + "tests/test_contrib.py" + "tests/test_make_app.py"))))))) + (inputs + (list git-without-safe-directory-check)) + (native-inputs + (list python-pytest)) + (propagated-inputs + (list python-dulwich python-flask python-httpauth + python-humanize python-pygments python-werkzeug)) + (home-page "https://github.com/jonashaag/klaus") + (synopsis "Simple git web viewer") + (description "klaus is a simple, easy-to-set-up git web viewer. It features + +@itemize +@item Super easy to set up -- no configuration required +@item Syntax highlighting +@item Markdown + RestructuredText rendering support +@item Pull + push support (Git Smart HTTP) +@item Code navigation using Exuberant ctags +@end itemize") + (license license:isc))) -- cgit v1.2.3