aboutsummaryrefslogtreecommitdiff
path: root/guix/forge/git.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/git.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/git.scm')
-rw-r--r--guix/forge/git.scm43
1 files changed, 43 insertions, 0 deletions
diff --git a/guix/forge/git.scm b/guix/forge/git.scm
new file mode 100644
index 0000000..cd6fedc
--- /dev/null
+++ b/guix/forge/git.scm
@@ -0,0 +1,43 @@
+;;; guix-forge --- Guix software forge meta-service
+;;; Copyright © 2024 Arun Isaac <arunisaac@systemreboot.net>
+;;;
+;;; This file is part of guix-forge.
+;;;
+;;; guix-forge is free software: you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published
+;;; by the Free Software Foundation, either version 3 of the License,
+;;; or (at your option) any later version.
+;;;
+;;; guix-forge is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with guix-forge. If not, see
+;;; <https://www.gnu.org/licenses/>.
+
+(define-module (forge git)
+ #:use-module ((gnu packages version-control) #:select (git-minimal))
+ #:use-module (guix gexp)
+ #:use-module (guix packages)
+ #:use-module (guix utils))
+
+;; We serve shared repositories. But, git's safe directory check does
+;; not permit us to use shared repositories. Disable it.
+(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")))))))))