all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: "(" <paren@disroot.org>,
	Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: Arun Isaac <arunisaac@systemreboot.net>,
	65351@debbugs.gnu.org, jgart <jgart@dismail.de>
Subject: [bug#65351] [PATCH 4/7] gnu: cgit: Use G-expressions.
Date: Fri, 18 Aug 2023 10:03:16 +0100	[thread overview]
Message-ID: <fe494363a504e03759722317eaa6ab15f58fb625.1692348727.git.arunisaac@systemreboot.net> (raw)
In-Reply-To: <87v8dd8k08.fsf@disroot.org>

* gnu/packages/version-control.scm (cgit)[arguments]: Rewrite using
G-expressions.
---
 gnu/packages/version-control.scm | 120 +++++++++++++++----------------
 1 file changed, 60 insertions(+), 60 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 73c4d8f2df..e2afd92286 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1039,66 +1039,66 @@ (define-public cgit
                 "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:tests? #f ; XXX: fail to build the in-source git.
-       #:test-target "test"
-       #:make-flags '("CC=gcc" "SHELL_PATH=sh")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'unpack-git
-           (lambda* (#:key inputs #:allow-other-keys)
-             ;; Unpack the source of git into the 'git' directory.
-             (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
-                     (assoc-ref inputs "git-source"))))
-         (add-after 'unpack 'patch-absolute-file-names
-           (lambda* (#:key inputs #:allow-other-keys)
-             (define (quoted-file-name input path)
-               (string-append "\"" input path "\""))
-             (substitute* "ui-snapshot.c"
-               (("\"gzip\"")
-                (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
-               (("\"bzip2\"")
-                (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
-               (("\"xz\"")
-                (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
-
-             (substitute* "filters/about-formatting.sh"
-               (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
-                                                     "/lib/cgit/filters"))
-               (("\\| tr") (string-append "| " (which "tr"))))
-
-             (substitute* "filters/html-converters/txt2html"
-               (("sed") (which "sed")))
-
-             (substitute* "filters/html-converters/man2html"
-               (("groff") (which "groff")))
-
-             (substitute* "filters/html-converters/rst2html"
-               (("rst2html\\.py") (which "rst2html.py")))))
-         (delete 'configure) ; no configure script
-         (add-after 'build 'build-man
-           (lambda* (#:key make-flags #:allow-other-keys)
-             (apply invoke "make" "doc-man" make-flags)))
-         (replace 'install
-           (lambda* (#:key make-flags outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (apply invoke
-                      "make" "install" "install-man"
-                      (string-append "prefix=" out)
-                      (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
-                      make-flags)
-               ;; Move the platform-dependent 'cgit.cgi' into lib to get it
-               ;; stripped.
-               (rename-file (string-append out "/share/cgit/cgit.cgi")
-                            (string-append out "/lib/cgit/cgit.cgi")))))
-         (add-after 'install 'wrap-python-scripts
-           (lambda* (#:key outputs #:allow-other-keys)
-             (for-each
-              (lambda (file)
-                (wrap-program (string-append (assoc-ref outputs "out")
-                                             "/lib/cgit/filters/" file)
-                  `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
-              '("syntax-highlighting.py"
-                "html-converters/md2html")))))))
+     (list #:tests? #f ; XXX: fail to build the in-source git.
+           #:test-target "test"
+           #:make-flags #~(list "CC=gcc" "SHELL_PATH=sh")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'unpack-git
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   ;; Unpack the source of git into the 'git' directory.
+                   (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
+                           (assoc-ref inputs "git-source"))))
+               (add-after 'unpack 'patch-absolute-file-names
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (define (quoted-file-name input path)
+                     (string-append "\"" input path "\""))
+                   (substitute* "ui-snapshot.c"
+                     (("\"gzip\"")
+                      (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
+                     (("\"bzip2\"")
+                      (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
+                     (("\"xz\"")
+                      (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
+
+                   (substitute* "filters/about-formatting.sh"
+                     (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
+                                                           "/lib/cgit/filters"))
+                     (("\\| tr") (string-append "| " (which "tr"))))
+
+                   (substitute* "filters/html-converters/txt2html"
+                     (("sed") (which "sed")))
+
+                   (substitute* "filters/html-converters/man2html"
+                     (("groff") (which "groff")))
+
+                   (substitute* "filters/html-converters/rst2html"
+                     (("rst2html\\.py") (which "rst2html.py")))))
+               (delete 'configure) ; no configure script
+               (add-after 'build 'build-man
+                 (lambda* (#:key make-flags #:allow-other-keys)
+                   (apply invoke "make" "doc-man" make-flags)))
+               (replace 'install
+                 (lambda* (#:key make-flags outputs #:allow-other-keys)
+                   (let ((out (assoc-ref outputs "out")))
+                     (apply invoke
+                            "make" "install" "install-man"
+                            (string-append "prefix=" out)
+                            (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
+                            make-flags)
+                     ;; Move the platform-dependent 'cgit.cgi' into lib to get it
+                     ;; stripped.
+                     (rename-file (string-append out "/share/cgit/cgit.cgi")
+                                  (string-append out "/lib/cgit/cgit.cgi")))))
+               (add-after 'install 'wrap-python-scripts
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (for-each
+                    (lambda (file)
+                      (wrap-program (string-append (assoc-ref outputs "out")
+                                                   "/lib/cgit/filters/" file)
+                        `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
+                    '("syntax-highlighting.py"
+                      "html-converters/md2html")))))))
     (native-inputs
      `(;; Building cgit requires a Git source tree.
        ("git-source"
-- 
2.39.2





  parent reply	other threads:[~2023-08-18  9:04 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 13:51 [bug#65351] [PATCH] gnu: Add cgit-pink Arun Isaac
2023-08-17 19:00 ` Liliana Marie Prikler
2023-08-17 19:16   ` ( via Guix-patches via
2023-08-17 20:20     ` Liliana Marie Prikler
2023-08-17 20:53       ` ( via Guix-patches via
2023-08-18  9:03         ` [bug#65351] [PATCH 1/7] gnu: cgit: Make git-source a native input Arun Isaac
2023-08-18 17:03           ` Liliana Marie Prikler
2023-08-21 14:22             ` Arun Isaac
2023-08-18  9:03         ` [bug#65351] [PATCH 2/7] gnu: cgit: Make bzip2, gzip and xz inputs Arun Isaac
2023-08-18  9:03         ` [bug#65351] [PATCH 3/7] gnu: cgit: Do not return #t from custom phases Arun Isaac
2023-08-18  9:03         ` Arun Isaac [this message]
2023-08-18 17:04           ` [bug#65351] [PATCH 4/7] gnu: cgit: Use G-expressions Liliana Marie Prikler
2023-08-21 14:27             ` Arun Isaac
2023-08-18 17:06           ` Liliana Marie Prikler
2023-08-21 14:26             ` Arun Isaac
2023-08-21 17:07               ` Liliana Marie Prikler
2023-08-21 17:13               ` ( via Guix-patches via
2023-08-24 10:59                 ` Arun Isaac
2023-08-18  9:03         ` [bug#65351] [PATCH 5/7] gnu: cgit: Use cc-for-target Arun Isaac
2023-08-18  9:03         ` [bug#65351] [PATCH 6/7] gnu: cgit: Add bash-minimal to inputs Arun Isaac
2023-08-18  9:03         ` [bug#65351] [PATCH 7/7] gnu: Add cgit-pink Arun Isaac
2023-08-18  9:00   ` [bug#65351] [PATCH] " Arun Isaac
2023-09-04  9:02 ` [bug#65351] [PATCH v2 0/7] " Arun Isaac
2023-09-04  9:02   ` [bug#65351] [PATCH v2 1/7] gnu: cgit: Make git-source a native input Arun Isaac
2023-09-04 17:09     ` Liliana Marie Prikler
2023-09-28  7:12       ` Arun Isaac
2023-09-28 16:16         ` Liliana Marie Prikler
2023-10-03 23:27           ` Arun Isaac
2023-09-04  9:02   ` [bug#65351] [PATCH v2 2/7] gnu: cgit: Make bzip2, gzip and xz inputs Arun Isaac
2023-09-04  9:02   ` [bug#65351] [PATCH v2 3/7] gnu: cgit: Do not return #t from custom phases Arun Isaac
2023-09-04  9:02   ` [bug#65351] [PATCH v2 4/7] gnu: cgit: Use G-expressions Arun Isaac
2023-09-04  9:02   ` [bug#65351] [PATCH v2 5/7] gnu: cgit: Add bash-minimal to inputs Arun Isaac
2023-09-04  9:02   ` [bug#65351] [PATCH v2 6/7] gnu: cgit: Use cc-for-target Arun Isaac
2023-09-04  9:02   ` [bug#65351] [PATCH v2 7/7] gnu: Add cgit-pink Arun Isaac
2023-10-03 23:59 ` [bug#65351] [PATCH v3 1/3] gnu: cgit: Update package style Arun Isaac
2023-10-03 23:59   ` [bug#65351] [PATCH v3 2/3] gnu: cgit: Fix cross compilation Arun Isaac
2023-10-05 12:48     ` [bug#65351] [PATCH] gnu: Add cgit-pink Ludovic Courtès
2023-10-05 16:39       ` bug#65351: " Arun Isaac
2023-10-03 23:59   ` [bug#65351] [PATCH v3 3/3] " Arun Isaac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe494363a504e03759722317eaa6ab15f58fb625.1692348727.git.arunisaac@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=65351@debbugs.gnu.org \
    --cc=jgart@dismail.de \
    --cc=liliana.prikler@gmail.com \
    --cc=paren@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.