From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBoN5-0007b7-MG for guix-patches@gnu.org; Thu, 26 Apr 2018 17:24:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBoN1-00077I-KZ for guix-patches@gnu.org; Thu, 26 Apr 2018 17:24:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:32858) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fBoN1-00077E-HR for guix-patches@gnu.org; Thu, 26 Apr 2018 17:24:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fBoN1-0001Vq-AT for guix-patches@gnu.org; Thu, 26 Apr 2018 17:24:03 -0400 Subject: [bug#31277] [PATCH 1/3] gnu: cgit: Fix included scripts. References: <87efj1wu0c.fsf@cbaines.net> In-Reply-To: <87efj1wu0c.fsf@cbaines.net> Resent-Message-ID: From: Christopher Baines Date: Thu, 26 Apr 2018 22:23:07 +0100 Message-Id: <20180426212309.10809-1-mail@cbaines.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31277@debbugs.gnu.org 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. --- gnu/packages/version-control.scm | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index b82abaf9e..f75900d28 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -551,6 +551,21 @@ collaboration using typical untrusted file hosts or services.") (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"))) + #t)) (delete 'configure) ; no configure script (add-after 'build 'build-man @@ -569,7 +584,17 @@ collaboration using typical untrusted file hosts or services.") ;; to get it stripped. (rename-file (string-append out "/share/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 ;; For building manpage. `(("asciidoc" ,asciidoc) @@ -588,6 +613,11 @@ collaboration using typical untrusted file hosts or services.") (base32 "1r2aa19gnrvm2y4fqcvpw1g9l72n48axqmpgv18s6d0y2p72vhzj")))) ("openssl" ,openssl) + ("groff" ,groff) + ("python" ,python) + ("python-docutils" ,python-docutils) + ("python-markdown" ,python-markdown) + ("python-pygments" ,python-pygments) ("zlib" ,zlib))) (home-page "https://git.zx2c4.com/cgit/") (synopsis "Web frontend for git repositories") -- 2.17.0