aboutsummaryrefslogtreecommitdiff
path: root/guix/forge
diff options
context:
space:
mode:
authorArun Isaac2023-07-22 23:46:41 +0100
committerArun Isaac2023-07-25 19:21:39 +0100
commit02d72380017ae1f3744b4be6726dcab783b079bb (patch)
treec69ba9b12c1597a98944042e4d7d7a9975735b83 /guix/forge
parentcbff2b6e44a54ab8e62c4f86d98cd0f262cb2858 (diff)
downloadguix-forge-02d72380017ae1f3744b4be6726dcab783b079bb.tar.gz
guix-forge-02d72380017ae1f3744b4be6726dcab783b079bb.tar.lz
guix-forge-02d72380017ae1f3744b4be6726dcab783b079bb.zip
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.
Diffstat (limited to 'guix/forge')
-rw-r--r--guix/forge/klaus.scm52
1 files changed, 51 insertions, 1 deletions
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 @@
;;; <https://www.gnu.org/licenses/>.
(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)))