summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAshish SHUKLA <ashish.is@lostca.se>2026-02-25 21:54:20 +0000
committerjgart <jgart@dismail.de>2026-02-25 18:10:41 -0500
commita88f947b24212612d6f9991e9be62eca96460be3 (patch)
tree31e1306fb165a5fa83280b1f205e04bbed2b13e1 /gnu
parent89d424ac5d57c6f97b51d2fd2c9562f66c31491b (diff)
gnu: cgit: Update to 1.3
* gnu/packages/version-control.scm (cgit): Update to 1.3. [inputs](git-source.tar.xz): Update to 2.53.0. Change-Id: I37c5656b1a908a62f58f802da7094b6edf7f1959 Signed-off-by: jgart <jgart@dismail.de>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/version-control.scm223
1 files changed, 110 insertions, 113 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index cdbac488911..b54e296bcc3 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1647,120 +1647,117 @@ supports AGit-Flow and lifts the requirement to use a manifest file.")
1647 (license license:asl2.0))) 1647 (license license:asl2.0)))
1648 1648
1649(define-public cgit 1649(define-public cgit
1650 ;; Use the latest commit, as the latest tagged release is 5 years old. 1650 (package
1651 (let ((commit "76abc4068222fe4242a952498e252a670615c362") 1651 (name "cgit")
1652 (rev "11")) 1652 ;; Update the ‘git-source’ input as well.
1653 (package 1653 (version "1.3")
1654 (name "cgit") 1654 (source (origin
1655 ;; Update the ‘git-source’ input as well. 1655 (method git-fetch)
1656 (version (git-version "1.2.3" rev commit)) 1656 (uri (git-reference
1657 (source (origin 1657 (url "https://git.zx2c4.com/cgit")
1658 (method git-fetch) 1658 (commit (string-append "v" version))))
1659 (uri (git-reference 1659 (sha256
1660 (url "https://git.zx2c4.com/cgit") 1660 (base32
1661 (commit commit))) 1661 "1miwjvh4maxx6b5345wjnndzw58907lh9vif5ajqwwda6sicsnmj"))
1662 (sha256 1662 (file-name (git-file-name name version))))
1663 (base32 1663 (build-system gnu-build-system)
1664 "0f4d65g9n1xq6jp6x54v0492v0hvm0vz45kmr973jjdpyki3jps1")) 1664 (arguments
1665 (file-name (git-file-name name version)))) 1665 (list
1666 (build-system gnu-build-system) 1666 #:tests? #f ; XXX: fail to build the in-source git.
1667 (arguments 1667 #:test-target "test"
1668 (list 1668 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
1669 #:tests? #f ; XXX: fail to build the in-source git. 1669 "SHELL_PATH=sh")
1670 #:test-target "test" 1670 #:phases
1671 #:make-flags #~(list (string-append "CC=" #$(cc-for-target)) 1671 #~(modify-phases %standard-phases
1672 "SHELL_PATH=sh") 1672 (add-after 'unpack 'unpack-git
1673 #:phases 1673 (lambda* (#:key inputs #:allow-other-keys)
1674 #~(modify-phases %standard-phases 1674 ;; Unpack the source of git into the 'git' directory.
1675 (add-after 'unpack 'unpack-git 1675 (invoke "tar" "--strip-components=1" "-C" "git" "-xf"
1676 (lambda* (#:key inputs #:allow-other-keys) 1676 #$(this-package-input "git-source.tar.xz"))))
1677 ;; Unpack the source of git into the 'git' directory. 1677 (add-after 'unpack 'patch-absolute-file-names
1678 (invoke "tar" "--strip-components=1" "-C" "git" "-xf" 1678 (lambda* (#:key inputs outputs #:allow-other-keys)
1679 #$(this-package-input "git-source.tar.xz")))) 1679 (define (quoted-file-name input path)
1680 (add-after 'unpack 'patch-absolute-file-names 1680 (string-append "\"" input path "\""))
1681 (lambda* (#:key inputs outputs #:allow-other-keys) 1681 (substitute* "ui-snapshot.c"
1682 (define (quoted-file-name input path) 1682 (("\"gzip\"")
1683 (string-append "\"" input path "\"")) 1683 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
1684 (substitute* "ui-snapshot.c" 1684 (("\"bzip2\"")
1685 (("\"gzip\"") 1685 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
1686 (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip")) 1686 (("\"xz\"")
1687 (("\"bzip2\"") 1687 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
1688 (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2")) 1688
1689 (("\"xz\"") 1689 (substitute* "filters/about-formatting.sh"
1690 (quoted-file-name (assoc-ref inputs "xz") "/bin/xz"))) 1690 (("\\$\\(dirname \\$0\\)") (string-append (assoc-ref outputs "out")
1691 1691 "/lib/cgit/filters"))
1692 (substitute* "filters/about-formatting.sh" 1692 (("\\| tr") (string-append "| " (which "tr"))))
1693 (("\\$\\(dirname \\$0\\)") (string-append (assoc-ref outputs "out") 1693
1694 "/lib/cgit/filters")) 1694 (substitute* "filters/html-converters/txt2html"
1695 (("\\| tr") (string-append "| " (which "tr")))) 1695 (("sed") (which "sed")))
1696 1696
1697 (substitute* "filters/html-converters/txt2html" 1697 (substitute* "filters/html-converters/man2html"
1698 (("sed") (which "sed"))) 1698 (("groff") (which "groff")))
1699 1699
1700 (substitute* "filters/html-converters/man2html" 1700 (substitute* "filters/html-converters/rst2html"
1701 (("groff") (which "groff"))) 1701 (("rst2html\\.py") (which "rst2html.py")))))
1702 1702 (delete 'configure) ; no configure script
1703 (substitute* "filters/html-converters/rst2html" 1703 (add-after 'build 'build-man
1704 (("rst2html\\.py") (which "rst2html.py"))))) 1704 (lambda* (#:key make-flags #:allow-other-keys)
1705 (delete 'configure) ; no configure script 1705 (apply invoke "make" "doc-man" make-flags)))
1706 (add-after 'build 'build-man 1706 (replace 'install
1707 (lambda* (#:key make-flags #:allow-other-keys) 1707 (lambda* (#:key make-flags outputs #:allow-other-keys)
1708 (apply invoke "make" "doc-man" make-flags))) 1708 (let ((out (assoc-ref outputs "out")))
1709 (replace 'install 1709 (apply invoke
1710 (lambda* (#:key make-flags outputs #:allow-other-keys) 1710 "make" "install" "install-man"
1711 (let ((out (assoc-ref outputs "out"))) 1711 (string-append "prefix=" out)
1712 (apply invoke 1712 (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
1713 "make" "install" "install-man" 1713 make-flags)
1714 (string-append "prefix=" out) 1714 ;; Move the platform-dependent 'cgit.cgi' into lib to get it
1715 (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit") 1715 ;; stripped.
1716 make-flags) 1716 (rename-file (string-append out "/share/cgit/cgit.cgi")
1717 ;; Move the platform-dependent 'cgit.cgi' into lib to get it 1717 (string-append out "/lib/cgit/cgit.cgi")))))
1718 ;; stripped. 1718 (add-after 'install 'wrap-python-scripts
1719 (rename-file (string-append out "/share/cgit/cgit.cgi") 1719 (lambda* (#:key outputs #:allow-other-keys)
1720 (string-append out "/lib/cgit/cgit.cgi"))))) 1720 (for-each
1721 (add-after 'install 'wrap-python-scripts 1721 (lambda (file)
1722 (lambda* (#:key outputs #:allow-other-keys) 1722 (wrap-program (string-append (assoc-ref outputs "out")
1723 (for-each 1723 "/lib/cgit/filters/" file)
1724 (lambda (file) 1724 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
1725 (wrap-program (string-append (assoc-ref outputs "out") 1725 '("syntax-highlighting.py"
1726 "/lib/cgit/filters/" file) 1726 "html-converters/md2html")))))))
1727 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))) 1727 (native-inputs
1728 '("syntax-highlighting.py" 1728 ;; For building manpage.
1729 "html-converters/md2html"))))))) 1729 (list asciidoc))
1730 (native-inputs 1730 (inputs
1731 ;; For building manpage. 1731 (list (origin
1732 (list asciidoc)) 1732 (method url-fetch)
1733 (inputs 1733 ;; Building cgit requires a Git source tree.
1734 (list (origin 1734 ;; cgit is tightly bound to git. Use GIT_VER from the Makefile,
1735 (method url-fetch) 1735 ;; which may not match the current (package-version git).
1736 ;; Building cgit requires a Git source tree. 1736 (uri "mirror://kernel.org/software/scm/git/git-2.53.0.tar.xz")
1737 ;; cgit is tightly bound to git. Use GIT_VER from the Makefile, 1737 (sha256
1738 ;; which may not match the current (package-version git). 1738 (base32
1739 (uri "mirror://kernel.org/software/scm/git/git-2.52.0.tar.xz") 1739 "0ly6335f4qd5qkzk3xwib6h1i26w17b37968zsyvnqdhh1yvs62q"))
1740 (sha256 1740 (file-name "git-source.tar.xz"))
1741 (base32 1741 bash-minimal
1742 "1ifpkrr64g8b0vv13155gz876s2f4vcqrvhgc75lkab9dzlgxn1w")) 1742 openssl
1743 (file-name "git-source.tar.xz")) 1743 python
1744 bash-minimal 1744 python-docutils-0.19
1745 openssl 1745 python-markdown
1746 python 1746 python-pygments
1747 python-docutils-0.19 1747 zlib
1748 python-markdown 1748 ;; bzip2, groff, gzip and xz are inputs (not native inputs)
1749 python-pygments 1749 ;; since they are actually substituted into cgit source and
1750 zlib 1750 ;; referenced by the built package output.
1751 ;; bzip2, groff, gzip and xz are inputs (not native inputs) 1751 bzip2
1752 ;; since they are actually substituted into cgit source and 1752 groff
1753 ;; referenced by the built package output. 1753 gzip
1754 bzip2 1754 xz))
1755 groff 1755 (home-page "https://git.zx2c4.com/cgit/")
1756 gzip 1756 (synopsis "Web frontend for git repositories")
1757 xz)) 1757 (description
1758 (home-page "https://git.zx2c4.com/cgit/") 1758 "CGit is an attempt to create a fast web interface for the Git SCM, using
1759 (synopsis "Web frontend for git repositories")
1760 (description
1761 "CGit is an attempt to create a fast web interface for the Git SCM, using
1762a built-in cache to decrease server I/O pressure.") 1759a built-in cache to decrease server I/O pressure.")
1763 (license license:gpl2)))) 1760 (license license:gpl2)))
1764 1761
1765(define-public cgit-pink 1762(define-public cgit-pink
1766 (package 1763 (package