gnu: cgit: Update to 1.2.3-793c420.
* gnu/packages/version-control.scm (cgit): Update to 793c420897e18eb3474c751d54cf4e0983f85433. [inputs]: Update git to 2.43.0. Change-Id: I3441e9e2837d22ae208f5cccc53d815cc3e0f042 Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
This commit is contained in:
parent
7b58443bc5
commit
0c75999d19
1 changed files with 107 additions and 104 deletions
|
@ -1072,115 +1072,118 @@ collaboration using typical untrusted file hosts or services.")
|
||||||
(license license:gpl3+)))
|
(license license:gpl3+)))
|
||||||
|
|
||||||
(define-public cgit
|
(define-public cgit
|
||||||
(package
|
(let ((commit "793c420897e18eb3474c751d54cf4e0983f85433")
|
||||||
(name "cgit")
|
(rev "1"))
|
||||||
;; Update the ‘git-source’ input as well.
|
(package
|
||||||
(version "1.2.3")
|
(name "cgit")
|
||||||
(source (origin
|
;; Update the ‘git-source’ input as well.
|
||||||
(method url-fetch)
|
(version (git-version "1.2.3" rev commit))
|
||||||
(uri (string-append
|
(source (origin
|
||||||
"https://git.zx2c4.com/cgit/snapshot/cgit-"
|
(method git-fetch)
|
||||||
version ".tar.xz"))
|
(uri (git-reference
|
||||||
(sha256
|
(url "https://git.zx2c4.com/cgit")
|
||||||
(base32
|
(commit commit)))
|
||||||
"193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"))))
|
(sha256
|
||||||
(build-system gnu-build-system)
|
(base32
|
||||||
(arguments
|
"1mhrm14wpqvralf9j33ih5ai6naiq3g2jg2z91gnw9dhh8f9ilwz"))
|
||||||
(list
|
(file-name (git-file-name name version))))
|
||||||
#:tests? #f ; XXX: fail to build the in-source git.
|
(build-system gnu-build-system)
|
||||||
#:test-target "test"
|
(arguments
|
||||||
#:make-flags #~(list (string-append "CC=" #$(cc-for-target))
|
(list
|
||||||
"SHELL_PATH=sh")
|
#:tests? #f ; XXX: fail to build the in-source git.
|
||||||
#:phases
|
#:test-target "test"
|
||||||
#~(modify-phases %standard-phases
|
#:make-flags #~(list (string-append "CC=" #$(cc-for-target))
|
||||||
(add-after 'unpack 'unpack-git
|
"SHELL_PATH=sh")
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
#:phases
|
||||||
;; Unpack the source of git into the 'git' directory.
|
#~(modify-phases %standard-phases
|
||||||
(invoke "tar" "--strip-components=1" "-C" "git" "-xf"
|
(add-after 'unpack 'unpack-git
|
||||||
(assoc-ref inputs "git-source"))))
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(add-after 'unpack 'patch-absolute-file-names
|
;; Unpack the source of git into the 'git' directory.
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(invoke "tar" "--strip-components=1" "-C" "git" "-xf"
|
||||||
(define (quoted-file-name input path)
|
(assoc-ref inputs "git-source"))))
|
||||||
(string-append "\"" input path "\""))
|
(add-after 'unpack 'patch-absolute-file-names
|
||||||
(substitute* "ui-snapshot.c"
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(("\"gzip\"")
|
(define (quoted-file-name input path)
|
||||||
(quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
|
(string-append "\"" input path "\""))
|
||||||
(("\"bzip2\"")
|
(substitute* "ui-snapshot.c"
|
||||||
(quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
|
(("\"gzip\"")
|
||||||
(("\"xz\"")
|
(quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip"))
|
||||||
(quoted-file-name (assoc-ref inputs "xz") "/bin/xz")))
|
(("\"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"
|
(substitute* "filters/about-formatting.sh"
|
||||||
(("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
|
(("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out")
|
||||||
"/lib/cgit/filters"))
|
"/lib/cgit/filters"))
|
||||||
(("\\| tr") (string-append "| " (which "tr"))))
|
(("\\| tr") (string-append "| " (which "tr"))))
|
||||||
|
|
||||||
(substitute* "filters/html-converters/txt2html"
|
(substitute* "filters/html-converters/txt2html"
|
||||||
(("sed") (which "sed")))
|
(("sed") (which "sed")))
|
||||||
|
|
||||||
(substitute* "filters/html-converters/man2html"
|
(substitute* "filters/html-converters/man2html"
|
||||||
(("groff") (which "groff")))
|
(("groff") (which "groff")))
|
||||||
|
|
||||||
(substitute* "filters/html-converters/rst2html"
|
(substitute* "filters/html-converters/rst2html"
|
||||||
(("rst2html\\.py") (which "rst2html.py")))))
|
(("rst2html\\.py") (which "rst2html.py")))))
|
||||||
(delete 'configure) ; no configure script
|
(delete 'configure) ; no configure script
|
||||||
(add-after 'build 'build-man
|
(add-after 'build 'build-man
|
||||||
(lambda* (#:key make-flags #:allow-other-keys)
|
(lambda* (#:key make-flags #:allow-other-keys)
|
||||||
(apply invoke "make" "doc-man" make-flags)))
|
(apply invoke "make" "doc-man" make-flags)))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key make-flags outputs #:allow-other-keys)
|
(lambda* (#:key make-flags outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(apply invoke
|
(apply invoke
|
||||||
"make" "install" "install-man"
|
"make" "install" "install-man"
|
||||||
(string-append "prefix=" out)
|
(string-append "prefix=" out)
|
||||||
(string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
|
(string-append "CGIT_SCRIPT_PATH=" out "/share/cgit")
|
||||||
make-flags)
|
make-flags)
|
||||||
;; Move the platform-dependent 'cgit.cgi' into lib to get it
|
;; Move the platform-dependent 'cgit.cgi' into lib to get it
|
||||||
;; stripped.
|
;; stripped.
|
||||||
(rename-file (string-append out "/share/cgit/cgit.cgi")
|
(rename-file (string-append out "/share/cgit/cgit.cgi")
|
||||||
(string-append out "/lib/cgit/cgit.cgi")))))
|
(string-append out "/lib/cgit/cgit.cgi")))))
|
||||||
(add-after 'install 'wrap-python-scripts
|
(add-after 'install 'wrap-python-scripts
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (file)
|
(lambda (file)
|
||||||
(wrap-program (string-append (assoc-ref outputs "out")
|
(wrap-program (string-append (assoc-ref outputs "out")
|
||||||
"/lib/cgit/filters/" file)
|
"/lib/cgit/filters/" file)
|
||||||
`("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
|
`("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
|
||||||
'("syntax-highlighting.py"
|
'("syntax-highlighting.py"
|
||||||
"html-converters/md2html")))))))
|
"html-converters/md2html")))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
;; For building manpage.
|
;; For building manpage.
|
||||||
(list asciidoc))
|
(list asciidoc))
|
||||||
(inputs
|
(inputs
|
||||||
`(;; Building cgit requires a Git source tree.
|
`( ;; Building cgit requires a Git source tree.
|
||||||
("git-source"
|
("git-source"
|
||||||
,(origin
|
,(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
;; cgit is tightly bound to git. Use GIT_VER from the Makefile,
|
;; cgit is tightly bound to git. Use GIT_VER from the Makefile,
|
||||||
;; which may not match the current (package-version git).
|
;; which may not match the current (package-version git).
|
||||||
(uri "mirror://kernel.org/software/scm/git/git-2.25.4.tar.xz")
|
(uri "mirror://kernel.org/software/scm/git/git-2.43.0.tar.xz")
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "11am6s46wmn1yll5614smjhzlghbqq6gysgcs64igjr9y5wzpdxq"))))
|
(base32 "1v3nkfm3gw8wr7595qy86qla8xyjvi85fmly4lfph4frfcz60ijl"))))
|
||||||
("bash-minimal" ,bash-minimal)
|
("bash-minimal" ,bash-minimal)
|
||||||
("openssl" ,openssl)
|
("openssl" ,openssl)
|
||||||
("python" ,python)
|
("python" ,python)
|
||||||
("python-docutils" ,python-docutils)
|
("python-docutils" ,python-docutils)
|
||||||
("python-markdown" ,python-markdown)
|
("python-markdown" ,python-markdown)
|
||||||
("python-pygments" ,python-pygments)
|
("python-pygments" ,python-pygments)
|
||||||
("zlib" ,zlib)
|
("zlib" ,zlib)
|
||||||
;; bzip2, groff, gzip and xz are inputs (not native inputs)
|
;; bzip2, groff, gzip and xz are inputs (not native inputs)
|
||||||
;; since they are actually substituted into cgit source and
|
;; since they are actually substituted into cgit source and
|
||||||
;; referenced by the built package output.
|
;; referenced by the built package output.
|
||||||
("bzip2" ,bzip2)
|
("bzip2" ,bzip2)
|
||||||
("groff" ,groff)
|
("groff" ,groff)
|
||||||
("gzip" ,gzip)
|
("gzip" ,gzip)
|
||||||
("xz" ,xz)))
|
("xz" ,xz)))
|
||||||
(home-page "https://git.zx2c4.com/cgit/")
|
(home-page "https://git.zx2c4.com/cgit/")
|
||||||
(synopsis "Web frontend for git repositories")
|
(synopsis "Web frontend for git repositories")
|
||||||
(description
|
(description
|
||||||
"CGit is an attempt to create a fast web interface for the Git SCM, using
|
"CGit is an attempt to create a fast web interface for the Git SCM, using
|
||||||
a built-in cache to decrease server I/O pressure.")
|
a built-in cache to decrease server I/O pressure.")
|
||||||
(license license:gpl2)))
|
(license license:gpl2))))
|
||||||
|
|
||||||
(define-public cgit-pink
|
(define-public cgit-pink
|
||||||
(package
|
(package
|
||||||
|
|
Reference in a new issue