about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/diffoscope/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-09-08 17:57:14 +0000
committerAlyssa Ross <hi@alyssa.is>2021-09-13 11:31:47 +0000
commitee7984efa14902a2ddd820c937457667a4f40c6a (patch)
treec9c1d046733cefe5e21fdd8a52104175d47b2443 /nixpkgs/pkgs/tools/misc/diffoscope/default.nix
parentffc9d4ba381da62fd08b361bacd1e71e2a3d934d (diff)
parentb3c692172e5b5241b028a98e1977f9fb12eeaf42 (diff)
downloadnixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.gz
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.bz2
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.lz
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.xz
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.tar.zst
nixlib-ee7984efa14902a2ddd820c937457667a4f40c6a.zip
Merge commit 'b3c692172e5b5241b028a98e1977f9fb12eeaf42'
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/diffoscope/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/diffoscope/default.nix38
1 files changed, 24 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/tools/misc/diffoscope/default.nix b/nixpkgs/pkgs/tools/misc/diffoscope/default.nix
index 88a9846e8352..09f27a0c22cb 100644
--- a/nixpkgs/pkgs/tools/misc/diffoscope/default.nix
+++ b/nixpkgs/pkgs/tools/misc/diffoscope/default.nix
@@ -1,5 +1,5 @@
-{ lib, stdenv, fetchurl, runCommand, makeWrapper, python3Packages, docutils, help2man, installShellFiles
-, abootimg, acl, apktool, binutils-unwrapped, build-tools, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, db, diffutils, dtc
+{ lib, stdenv, fetchurl, python3Packages, docutils, help2man, installShellFiles
+, abootimg, acl, apksigner, apktool, binutils-unwrapped, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, db, diffutils, dtc
 , e2fsprogs, file, findutils, fontforge-fonttools, ffmpeg, fpc, gettext, ghc, ghostscriptX, giflib, gnumeric, gnupg, gnutar
 , gzip, hdf5, imagemagick, jdk, libarchive, libcaca, llvm, lz4, mono, openssh, openssl, pdftk, pgpdump, poppler_utils, qemu, R
 , radare2, sng, sqlite, squashfsTools, tcpdump, odt2txt, unzip, wabt, xxd, xz, zip, zstd
@@ -7,20 +7,13 @@
 }:
 
 # Note: when upgrading this package, please run the list-missing-tools.sh script as described below!
-let
-  apksigner = runCommand "apksigner" { nativeBuildInputs = [ makeWrapper ]; } ''
-    mkdir -p $out/bin
-    makeWrapper "${jdk}/bin/java" "$out/bin/apksigner" \
-      --add-flags "-jar ${builtins.head build-tools}/libexec/android-sdk/build-tools/28.0.3/lib/apksigner.jar"
-  '';
-in
 python3Packages.buildPythonApplication rec {
   pname = "diffoscope";
-  version = "178";
+  version = "182";
 
   src = fetchurl {
     url = "https://diffoscope.org/archive/diffoscope-${version}.tar.bz2";
-    sha256 = "sha256-uJbTQshf7vRd6EyaaV0itJVrMc/6o+pPXhtUgrjFnzM=";
+    sha256 = "sha256-atWyVMewm+I/SDdE9+z1JYLLVOFDsgps2BL9WgZLlVA=";
   };
 
   outputs = [ "out" "man" ];
@@ -42,10 +35,10 @@ python3Packages.buildPythonApplication rec {
   # Most of the non-Python dependencies here are optional command-line tools for various file-format parsers.
   # To help figuring out what's missing from the list, run: ./pkgs/tools/misc/diffoscope/list-missing-tools.sh
   #
-  # Still missing these tools: docx2txt dumppdf dumpxsb enjarify lipo ocamlobjinfo oggDump otool procyon
+  # Still missing these tools: docx2txt dumpimage dumppdf dumpxsb enjarify lipo ocamlobjinfo oggDump otool procyon
   pythonPath = [
       binutils-unwrapped bzip2 colordiff coreutils cpio db diffutils
-      dtc e2fsprogs file findutils fontforge-fonttools gettext gnutar gzip
+      e2fsprogs file findutils fontforge-fonttools gettext gnutar gzip
       libarchive libcaca lz4 openssl pgpdump sng sqlite squashfsTools unzip xxd
       xz zip zstd
     ]
@@ -53,7 +46,7 @@ python3Packages.buildPythonApplication rec {
       argcomplete debian defusedxml jsondiff jsbeautifier libarchive-c
       python_magic progressbar33 pypdf2 rpm tlsh
     ])
-    ++ lib.optionals stdenv.isLinux [ python3Packages.pyxattr acl cdrkit ]
+    ++ lib.optionals stdenv.isLinux [ python3Packages.pyxattr acl cdrkit dtc ]
     ++ lib.optionals enableBloat ([
       abootimg apksigner apktool cbfstool colord ffmpeg fpc ghc ghostscriptX giflib gnupg gnumeric
       hdf5 imagemagick llvm jdk mono odt2txt openssh pdftk poppler_utils qemu R tcpdump wabt radare2
@@ -73,6 +66,23 @@ python3Packages.buildPythonApplication rec {
     "test_diff_meta"
     "test_diff_meta2"
     "test_obj_no_differences"
+
+    # Failing because of file-v5.40 has a slightly different output.
+    # Upstream issue: https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/271
+    "test_text_proper_indentation"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Disable flaky tests on Darwin
+    "test_non_unicode_filename"
+    "test_listing"
+  ];
+
+  # flaky tests on Darwin
+  disabledTestPaths = lib.optionals stdenv.isDarwin [
+    "tests/comparators/test_git.py"
+    "tests/comparators/test_java.py"
+    "tests/comparators/test_uimage.py"
+    "tests/comparators/test_device.py"
+    "tests/comparators/test_macho.py"
   ];
 
   meta = with lib; {