diff mbox series

[bug#65351,7/7] gnu: Add cgit-pink.

Message ID 2f479e801734ba8be42d771ace533863de085041.1692348727.git.arunisaac@systemreboot.net
State New
Headers show
Series [bug#65351,1/7] gnu: cgit: Make git-source a native input. | expand

Commit Message

Arun Isaac Aug. 18, 2023, 9:03 a.m. UTC
* gnu/packages/version-control.scm (cgit-pink): New variable.
---
 gnu/packages/version-control.scm | 43 ++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index bc2b06c0d5..00b2f66f5a 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1123,6 +1123,49 @@  (define-public cgit
 a built-in cache to decrease server I/O pressure.")
     (license license:gpl2)))
 
+(define-public cgit-pink
+  (package
+    (inherit cgit)
+    (name "cgit-pink")
+    (version "1.4.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://git.causal.agency/cgit-pink")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0yp6rm60pz8pj8wrm1aglix51hhy00al86mm94ag2bifc92q23ar"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments cgit)
+       ((#:tests? _ #f)
+        (not (%current-target-system)))
+       ((#:make-flags make-flags '())
+        #~(list (string-append "CC=" #$(cc-for-target))
+                (string-append "PERL_PATH="
+                               (search-input-file %build-inputs "/bin/perl"))
+                ;; It is important to set an absolute path in SHELL_PATH
+                ;; because it is used as the shebang of generated scripts.
+                (string-append "SHELL_PATH="
+                               (search-input-file %build-inputs "/bin/sh"))))))
+    (native-inputs
+     (modify-inputs (package-native-inputs cgit)
+       (replace "git-source"
+         ;; cgit-pink is tightly bound to git. Use GIT_VER from the Makefile,
+         ;; which may not match the current (package-version git).
+         (origin
+           (method url-fetch)
+           (uri "mirror://kernel.org/software/scm/git/git-2.36.1.tar.xz")
+           (sha256
+            (base32
+             "0w43a35mhc2qf2gjkxjlnkf2lq8g0snf34iy5gqx2678yq7llpa0"))))
+       (append gnu-gettext perl)))
+    (home-page "https://git.causal.agency/cgit-pink/about/")
+    (description "cgit-pink is a fast web interface for the Git SCM, using a
+built-in cache to decrease server I/O pressure.  cgit-pink is a fork of
+cgit.")))
+
 (define-public python-git-multimail
   (package
     (name "python-git-multimail")