bug#34449: [PATCH] gnu: Add trydiffoscope.

Message ID 20190213235805.GA24134@jasmine.lan
State Accepted
Headers show
Series bug#34449: [PATCH] gnu: Add trydiffoscope. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Leo Famulari Feb. 13, 2019, 11:58 p.m. UTC
On Wed, Feb 13, 2019 at 01:43:13PM -0800, Vagrant Cascadian wrote:
> I couldn't really think of a straightforward way to mention the
> diffoscope package, but the attached patch updates the synopsis and
> description to address the other mentioned issues.

Okay, sometimes these non-code parts are actually the hardest! :)

I pushed as commit 706460a35754a47bf832a40de4f22271e7088226 with the
changes below.

I found that the software didn't work without the requests module, and
that the man page was being installed to a location that is not
idiomatic for Guix.

`trydiffoscope --webbrowser foo bar` is super nice!

Comments

Vagrant Cascadian Feb. 14, 2019, 12:26 a.m. UTC | #1
On 2019-02-13, Leo Famulari wrote:
> On Wed, Feb 13, 2019 at 01:43:13PM -0800, Vagrant Cascadian wrote:
>> I couldn't really think of a straightforward way to mention the
>> diffoscope package, but the attached patch updates the synopsis and
>> description to address the other mentioned issues.
>
> Okay, sometimes these non-code parts are actually the hardest! :)

Indeed.


> I pushed as commit 706460a35754a47bf832a40de4f22271e7088226 with the
> changes below.

Thanks!


> I found that the software didn't work without the requests module, and

I was surpised it worked without it for me (I had seen that it used
requests); could my user profile have somehow leaked python-requests
from some other package?


> that the man page was being installed to a location that is not
> idiomatic for Guix.

I wondered why it wasn't showing up in MANPATH... now I know, thanks!
/usr/share is a hard habit to break. :)


live well,
  vagrant
Leo Famulari Feb. 14, 2019, 12:32 a.m. UTC | #2
On Wed, Feb 13, 2019 at 04:26:49PM -0800, Vagrant Cascadian wrote:
> I was surpised it worked without it for me (I had seen that it used
> requests); could my user profile have somehow leaked python-requests
> from some other package?

I actually don't know how Python looks up module dependencies so... not
sure :) Depending on how you tested the package, it could be that the
requests module was propagated (installed into your profile) by another
package and that trydiffoscope found it there.

> I wondered why it wasn't showing up in MANPATH... now I know, thanks!
> /usr/share is a hard habit to break. :)

:)

Patch

diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 51d6698ee0..eff8d5c3fd 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -10,6 +10,7 @@ 
 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2019 Vagrant Cascadian <vagrant@reproducible-builds.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -625,24 +626,25 @@  compare two tarballs, ISO images, or PDFs just as easily.")
        (modify-phases %standard-phases
          (add-after 'install 'install-doc
            (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((share (string-append (assoc-ref outputs "out") "/usr/share/")))
+             (let* ((share (string-append (assoc-ref outputs "out") "/share/")))
                (mkdir-p (string-append share "/man/man1/" ))
                (invoke "rst2man.py"
                        "trydiffoscope.1.rst"
                        (string-append share "/man/man1/trydiffoscope.1"))
                (mkdir-p (string-append share "/doc/" ,name "-" ,version))
                (install-file "./README.rst"
-                          (string-append share "/doc/" ,name "-" ,version))))))))
+                          (string-append share "/doc/" ,name "-" ,version)))
+             #t)))))
+    (propagated-inputs
+     `(("python-requests" ,python-requests)))
     (native-inputs
      `(("gzip" ,gzip)
        ("python-docutils" ,python-docutils)))
     (build-system python-build-system)
     (home-page "https://try.diffoscope.org")
-    (synopsis "Client for remote service to compare files and archives in depth")
-    (description
-     "This is a client for the remote diffoscope service located at:
-
-https://try.diffoscope.org
+    (synopsis "Client for remote diffoscope service")
+    (description "This is a client for the @url{https://try.diffoscope.org,
+remote diffoscope service}.
 
 Diffoscope tries to get to the bottom of what makes files or directories
 different.  It recursively unpacks archives of many kinds and transforms
@@ -650,7 +652,7 @@  various binary formats into more human readable forms to compare them.  It can
 compare two tarballs, ISO images, or PDFs just as easily.
 
 Results are displayed by default, stored as local text or html files, or made
-available via a URL on https://try.diffoscope.org. Results stored on the
+available via a URL on @url{https://try.diffoscope.org}.  Results stored on the
 server are purged after 30 days.")
     (license license:gpl3+)))