aboutsummaryrefslogtreecommitdiff
path: root/guix/forge/klaus.scm
diff options
context:
space:
mode:
authorArun Isaac2024-06-09 20:10:48 +0100
committerArun Isaac2024-06-09 20:14:56 +0100
commit63e8da5660f75291528cdf0e8884021a98ae552c (patch)
tree47737516c4c28b6d3d47eae953bb371a33190491 /guix/forge/klaus.scm
parent0badcd455a143736e0528d04dd5dab47e678ad85 (diff)
downloadguix-forge-63e8da5660f75291528cdf0e8884021a98ae552c.tar.gz
guix-forge-63e8da5660f75291528cdf0e8884021a98ae552c.tar.lz
guix-forge-63e8da5660f75291528cdf0e8884021a98ae552c.zip
klaus: Move git package into its own file.
* guix/forge/git.scm: New file. * guix/forge/klaus.scm: Import git-without-safe-directory-check from (forge git). Do not import (gnu packages version-control) and (guix utils). (git-without-safe-directory-check): Move to (forge git). (python-klaus): Move comment about git-without-safe-directory-check.
Diffstat (limited to 'guix/forge/klaus.scm')
-rw-r--r--guix/forge/klaus.scm30
1 files changed, 6 insertions, 24 deletions
diff --git a/guix/forge/klaus.scm b/guix/forge/klaus.scm
index 5e5e3e0..cd9fa5f 100644
--- a/guix/forge/klaus.scm
+++ b/guix/forge/klaus.scm
@@ -19,6 +19,7 @@
(define-module (forge klaus)
#:use-module (forge environment)
+ #: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))
@@ -26,7 +27,6 @@
#: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 (gnu system file-systems)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
@@ -34,7 +34,6 @@
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
- #:use-module (guix utils)
#:export (klaus-gunicorn-app))
(define-public python-httpauth
@@ -55,28 +54,6 @@
routes using HTTP Digest Authentication.")
(license license:bsd-2)))
-;; 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
-(define-public git-without-safe-directory-check
- (package
- (inherit git-minimal)
- (name "git-without-safe-directory-check")
- (arguments
- (substitute-keyword-arguments (package-arguments git-minimal)
- ((#:phases phases #~%standard-phases)
- #~(modify-phases #$phases
- (add-after 'unpack 'disable-safe-directory-check
- (lambda _
- ;; Disable the safe directory check.
- (substitute* "setup.c"
- (("return data\\.is_safe;")
- "return 1;"))
- ;; Disable tests broken by this change.
- (setenv "GIT_SKIP_TESTS" "t0033 t0411 t9700")))))))))
-
(define-public python-klaus
(package
(name "python-klaus")
@@ -104,6 +81,11 @@ routes using HTTP Digest Authentication.")
"tests/test_contrib.py"
"tests/test_make_app.py")))))))
(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))