Subject: [bug#60941] [PATCH 2/2] gnu: diffoscope: Update to 232.

From: Vagrant Cascadian <[email-masked]>
Date: Wed, 18 Jan 2023 17:38:00 -0800

From 784d33dad1ff114e4f8043b7b766c785e7fef79f Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <[email-masked]>
Date: Wed, 18 Jan 2023 11:00:46 -0800
Subject: [PATCH 2/2] gnu: diffoscope: Update to 232.

* gnu/packages/diffoscope.scm (diffoscope): Update to 232.
  [native-inputs]: Add lzip and python-pdf, drop python-pypdf2.
  [phases]: Add lzip-external-tool and remove-mono-external-tool.
---
 gnu/packages/diffoscope.scm | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scm
index f730d976fe..59875c2e8e 100644
--- a/gnu/packages/diffoscope.scm
+++ b/gnu/packages/diffoscope.scm
@@ -75,7 +75,7 @@ (define-module (gnu packages diffoscope)
 (define-public diffoscope
   (package
     (name "diffoscope")
-    (version "224")
+    (version "232")
     (source
      (origin
        (method git-fetch)
@@ -84,7 +84,7 @@ (define-public diffoscope
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1qdivsf4yygg2az5018pw0q4169zas3hfqjydd0q3bhdrfpl0q4q"))
+        (base32 "0zix2m1rlgj7kyx8bkfjb9dnc5idblz6xhmxqq0w3jpnkxxjj8yq"))
        (patches
         (search-patches "diffoscope-fix-llvm-test.patch"))))
     (build-system python-build-system)
@@ -112,6 +112,21 @@ (define-public diffoscope
                          (string-append "[\"" (which "stat") "\","))
                         (("\\[\"getfacl\",")
                          (string-append "[\"" (which "getfacl") "\",")))))
+                  (add-after 'unpack 'lzip-external-tool
+                    ;; Fixed upstream, remove this phase when updating to
+                    ;; diffoscope 233
+                    (lambda _
+                      (substitute* "diffoscope/external_tools.py"
+                        ((".debian.: .lzip.")
+                         "\"debian\": \"lzip\", \"guix\": \"lzip\""))))
+                  (add-after 'unpack 'remove-mono-external-tool
+                    ;; Fixed upstream, remove this phase when updating to
+                    ;; diffoscope 233
+                    (lambda _
+                      (substitute* "diffoscope/external_tools.py"
+                        ;; "guix": "mono",
+                        ((".guix.: .mono.,")
+                         ""))))
                   (add-after 'build 'build-man-page
                     (lambda* (#:key (make-flags '()) #:allow-other-keys)
                       (apply invoke "make" "-C" "doc" make-flags)))
@@ -160,7 +175,7 @@ (define-public diffoscope
              python-pytest
              python-chardet
              python-h5py
-             python-pypdf2
+             python-pypdf
              python-progressbar33
 
              abootimg
@@ -195,6 +210,7 @@ (define-public diffoscope
              libarchive
              llvm-9
              lz4
+             lzip
              ocaml
              odt2txt
              openssh
-- 
2.39.0