unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 31277@debbugs.gnu.org
Subject: [bug#31277] [PATCH 1/3] gnu: cgit: Fix included scripts.
Date: Thu, 26 Apr 2018 22:23:07 +0100	[thread overview]
Message-ID: <20180426212309.10809-1-mail@cbaines.net> (raw)
In-Reply-To: <87efj1wu0c.fsf@cbaines.net>

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

  reply	other threads:[~2018-04-26 21:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 21:13 [bug#31277] [PATCH] cgit changes Christopher Baines
2018-04-26 21:23 ` Christopher Baines [this message]
2018-04-26 21:23   ` [bug#31277] [PATCH 2/3] services: cgit: Improve handling of extra-options Christopher Baines
2018-04-28 11:19     ` Clément Lassieur
2018-05-18 10:56       ` Christopher Baines
2018-04-26 21:23   ` [bug#31277] [PATCH 3/3] services: cgit: Make project-list permit a string Christopher Baines
2018-04-28 10:57     ` Clément Lassieur
2018-05-18 10:57       ` Christopher Baines
2018-04-28 11:30   ` [bug#31277] [PATCH 1/3] gnu: cgit: Fix included scripts Clément Lassieur
2018-05-18 10:55     ` Christopher Baines
2018-05-18 15:49       ` Clément Lassieur
2018-05-18 18:13         ` bug#31277: " Christopher Baines
2018-04-28 11:39 ` [bug#31277] [PATCH] cgit changes Clément Lassieur
2018-05-18 10:23 ` [bug#31277] [PATCH 1/3] gnu: cgit: Fix included scripts Christopher Baines
2018-05-18 10:23   ` [bug#31277] [PATCH 2/3] services: cgit: Improve handling of extra-options Christopher Baines
2018-05-18 10:23   ` [bug#31277] [PATCH 3/3] services: cgit: Make project-list permit a file-object Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180426212309.10809-1-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=31277@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).