about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--guix/forge/klaus.scm71
1 files changed, 10 insertions, 61 deletions
diff --git a/guix/forge/klaus.scm b/guix/forge/klaus.scm
index 8e0a8c3..7a0bff6 100644
--- a/guix/forge/klaus.scm
+++ b/guix/forge/klaus.scm
@@ -23,74 +23,23 @@
   #:use-module ((forge git) #:select (git-without-safe-directory-check))
   #:use-module (forge gunicorn)
   #:use-module (forge socket)
-  #:use-module ((gnu packages check) #:select (python-nose python-pytest))
-  #:use-module ((gnu packages python-build)
-                #:select (python-setuptools python-wheel))
-  #:use-module ((gnu packages python-web)
-                #:select (python-flask python-httpauth python-werkzeug))
-  #:use-module ((gnu packages python-xyz)
-                #:select (python-dulwich python-humanize python-pygments))
+  #:use-module ((gnu packages version-control)
+                #:select (python-klaus)
+                #:prefix guix:)
   #:use-module (gnu system file-systems)
-  #:use-module (guix build-system pyproject)
-  #:use-module (guix build-system python)
-  #:use-module (guix download)
-  #:use-module (guix gexp)
-  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:export (klaus-gunicorn-app))
 
 (define-public python-klaus
   (package
-    (name "python-klaus")
-    (version "3.0.1")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "klaus" version))
-              (sha256
-               (base32
-                "1w6sl15llnkcg7kmnpn64awdiis061q2gijnhdx0ng7z4p1glapl"))))
-    (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")))))))
+    (inherit guix:python-klaus)
     (inputs
-     ;; We use klaus to serve shared repositories. But, git's safe
-     ;; directory check does not permit us to use shared
-     ;; repositories. Disable it. The more long term solution is to rewrite
-     ;; klaus to not use the git CLI at all. See
-     ;; https://github.com/jonashaag/klaus/issues/322
-     (list git-without-safe-directory-check))
-    (native-inputs
-     (list python-pytest
-           python-setuptools
-           python-wheel))
-    (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)))
+     ;; We use klaus to serve shared repositories. But, git's safe directory
+     ;; check does not permit us to use shared repositories. Disable it. The
+     ;; more long term solution is to rewrite klaus to not use the git CLI at
+     ;; all. See https://github.com/jonashaag/klaus/issues/322
+     (modify-inputs (package-inputs guix:python-klaus)
+       (replace "git" git-without-safe-directory-check)))))
 
 (define* (klaus-gunicorn-app repository-directory
                              #:key