From 93d506ee823b376913422c6ac4c8829bf2e88925 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 6 Jul 2023 10:31:27 +0100 Subject: Make repository a guix channel. * .guix-authorizations, .guix-channel: New files. * guix.scm: Convert to a symlink pointing to .guix/tissue-package.scm. Move original there. * .guix/tissue-package.scm: Convert into a module with public packages. --- .guix-authorizations | 4 +++ .guix-channel | 3 +++ .guix/tissue-package.scm | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ guix.scm | 67 +-------------------------------------------- 4 files changed, 78 insertions(+), 66 deletions(-) create mode 100644 .guix-authorizations create mode 100644 .guix-channel create mode 100644 .guix/tissue-package.scm mode change 100644 => 120000 guix.scm diff --git a/.guix-authorizations b/.guix-authorizations new file mode 100644 index 0000000..a8ef8be --- /dev/null +++ b/.guix-authorizations @@ -0,0 +1,4 @@ +(authorizations + (version 0) + (("7F73 0343 F2F0 9F3C 77BF 79D3 2E25 EE8B 6180 2BB3" + (name "arunisaac")))) diff --git a/.guix-channel b/.guix-channel new file mode 100644 index 0000000..35e181f --- /dev/null +++ b/.guix-channel @@ -0,0 +1,3 @@ +(channel + (version 0) + (directory ".guix")) diff --git a/.guix/tissue-package.scm b/.guix/tissue-package.scm new file mode 100644 index 0000000..305b501 --- /dev/null +++ b/.guix/tissue-package.scm @@ -0,0 +1,70 @@ +;;; tissue --- Text based issue tracker +;;; Copyright © 2022, 2023 Arun Isaac +;;; +;;; 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 . + +(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 (let ((source-directory (dirname (current-source-directory)))) + (local-file source-directory + "tissue-checkout" + #:recursive? #t + #:select? (git-predicate source-directory)))) + (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 diff --git a/guix.scm b/guix.scm deleted file mode 100644 index 08847da..0000000 --- a/guix.scm +++ /dev/null @@ -1,66 +0,0 @@ -;;; tissue --- Text based issue tracker -;;; Copyright © 2022, 2023 Arun Isaac -;;; -;;; 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 . - -(use-modules ((gnu packages fonts) #:select (font-ibm-plex)) - ((gnu packages guile) #:select (guile-git) #:prefix guix:) - ((gnu packages version-control) #:select (libgit2-1.3) #:prefix guix:) - ((gnu packages web) #:select (tissue) #:prefix guix:) - (guix gexp) - (guix git-download) - (guix packages) - (guix utils)) - -(define %source-dir (dirname (current-filename))) - -;; 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-public 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-public guile-git - (package - (inherit guix:guile-git) - (inputs - (modify-inputs (package-inputs guix:guile-git) - (replace "libgit2" libgit2))))) - -(package - (inherit guix:tissue) - (source (local-file %source-dir - #:recursive? #t - #:select? (git-predicate %source-dir))) - (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)))) diff --git a/guix.scm b/guix.scm new file mode 120000 index 0000000..2bd185f --- /dev/null +++ b/guix.scm @@ -0,0 +1 @@ +.guix/tissue-package.scm \ No newline at end of file -- cgit v1.2.3