mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +01:00
gnu: cgit: Fix included scripts.
Fix the about-formatting.sh, syntax-highlighting.py and html-converters files. * gnu/packages/version-control.scm (cgit)[arguments]: Include about-formatting.sh and the html-converters in the patch-absolute-file-names phase and add a wrap-python-scripts phase to wrap syntax-highlighting.py and the md2html converter. [inputs]: Add groff, python, python-docutils, python-markdown and python-pygments.
This commit is contained in:
parent
ab3950d809
commit
57c5aa7c7d
1 changed files with 32 additions and 1 deletions
|
@ -19,6 +19,7 @@
|
||||||
;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
|
;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
|
||||||
;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
|
;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
|
||||||
;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
|
;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
|
||||||
|
;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -551,6 +552,21 @@ collaboration using typical untrusted file hosts or services.")
|
||||||
(quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
|
(quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2"))
|
||||||
(("\"xz\"")
|
(("\"xz\"")
|
||||||
(quoted-file-name (assoc-ref inputs "xz") "/bin/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")))
|
||||||
|
|
||||||
#t))
|
#t))
|
||||||
(delete 'configure) ; no configure script
|
(delete 'configure) ; no configure script
|
||||||
(add-after 'build 'build-man
|
(add-after 'build 'build-man
|
||||||
|
@ -569,7 +585,17 @@ collaboration using typical untrusted file hosts or services.")
|
||||||
;; to get it stripped.
|
;; to get it 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"))
|
||||||
#t)))))))
|
#t))))
|
||||||
|
(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)
|
||||||
|
`("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
|
||||||
|
'("syntax-highlighting.py"
|
||||||
|
"html-converters/md2html"))
|
||||||
|
#t)))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
;; For building manpage.
|
;; For building manpage.
|
||||||
`(("asciidoc" ,asciidoc)
|
`(("asciidoc" ,asciidoc)
|
||||||
|
@ -588,6 +614,11 @@ collaboration using typical untrusted file hosts or services.")
|
||||||
(base32
|
(base32
|
||||||
"1r2aa19gnrvm2y4fqcvpw1g9l72n48axqmpgv18s6d0y2p72vhzj"))))
|
"1r2aa19gnrvm2y4fqcvpw1g9l72n48axqmpgv18s6d0y2p72vhzj"))))
|
||||||
("openssl" ,openssl)
|
("openssl" ,openssl)
|
||||||
|
("groff" ,groff)
|
||||||
|
("python" ,python)
|
||||||
|
("python-docutils" ,python-docutils)
|
||||||
|
("python-markdown" ,python-markdown)
|
||||||
|
("python-pygments" ,python-pygments)
|
||||||
("zlib" ,zlib)))
|
("zlib" ,zlib)))
|
||||||
(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")
|
||||||
|
|
Loading…
Reference in a new issue