aboutsummaryrefslogtreecommitdiff
path: root/guix/forge/guile-git.scm
blob: f582b7d95e109931681c39f43f5e9c2c8699f331 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
;;; guix-forge --- Guix software forge meta-service
;;; Copyright © 2023 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 guile-git)
  #:use-module ((gnu packages guile) #:select (guile-git) #:prefix guix:)
  #:use-module ((gnu packages version-control) #:select (libgit2-1.3) #:prefix guix:)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (guix utils))

;; Use a patched libgit2 until there is a way to disable repository
;; ownership validation using the API. See
;; https://issues.guix.gnu.org/55399
(define libgit2-1.3
  (package
    (inherit guix:libgit2-1.3)
    (name "libgit2")
    (arguments
     (substitute-keyword-arguments (package-arguments guix:libgit2-1.3)
       ((#:phases phases #~%standard-phases)
        #~(modify-phases #$phases
            (add-after 'unpack 'disable-ownership-validation
              (lambda _
                (substitute* "src/repository.c"
                  (("git_repository__validate_ownership = true")
                   "git_repository__validate_ownership = false"))))))))))

(define-public guile-git
  (package
    (inherit guix:guile-git)
    (inputs
     (modify-inputs (package-inputs guix:guile-git)
       (replace "libgit2" libgit2-1.3)))))