summaryrefslogtreecommitdiff
path: root/.guix/tissue-package.scm
blob: 23590bfbd9b466b06f699f3184e471b4cbd239c7 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
;;; tissue --- Text based issue tracker
;;; Copyright © 2022, 2023 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of tissue.
;;;
;;; tissue 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.
;;;
;;; tissue 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 tissue.  If not, see <https://www.gnu.org/licenses/>.

(define-module (tissue-package)
  #:use-module ((gnu packages fonts) #:select (font-ibm-plex))
  #:use-module ((gnu packages guile) #:select (guile-git) #:prefix guix:)
  #:use-module ((gnu packages version-control) #:select (libgit2-1.3) #:prefix guix:)
  #:use-module ((gnu packages web) #:select (tissue) #:prefix guix:)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (guix utils))

;; Run this version of libgit2 for guile-git until guile-git is
;; updated upstream and https://github.com/libgit2/libgit2/issues/6536
;; is fixed.
(define libgit2
  (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
            ;; Disable ownership validation until
            ;; https://github.com/libgit2/libgit2/issues/6536 is fixed.
            (add-after 'unpack 'disable-ownership-validation
              (lambda _
                (substitute* "src/repository.c"
                  (("git_repository__validate_ownership = true")
                   "git_repository__validate_ownership = false"))))))))))

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

(define-public tissue
  (package
    (inherit guix:tissue)
    (source (local-file ".."
                        "tissue-checkout"
                        #:recursive? #t
                        #:select? (or (git-predicate (dirname (current-source-directory)))
                                      (const #t))))
    (inputs
     (modify-inputs (package-inputs guix:tissue)
       (replace "guile-git" guile-git)))
    (native-inputs
     (modify-inputs (package-native-inputs guix:tissue)
       (prepend font-ibm-plex)))))

tissue