From f7020dfe2a4932bbeccdf7cc930e791c9e7f34bf Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 19 Jul 2021 04:20:00 +0000 Subject: [PATCH] diffoscope: fix build on darwin --- pkgs/tools/misc/diffoscope/default.nix | 17 +++++++++++++++-- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix index 069343b8a478..82c6bbebe774 100644 --- a/pkgs/tools/misc/diffoscope/default.nix +++ b/pkgs/tools/misc/diffoscope/default.nix @@ -38,7 +38,7 @@ python3Packages.buildPythonApplication rec { # 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 ] @@ -46,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 @@ -70,6 +70,19 @@ python3Packages.buildPythonApplication rec { # 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; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5389225a2f3f..4318a57a3cb6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4256,7 +4256,7 @@ with pkgs; }; diffoscope = diffoscopeMinimal.override { - enableBloat = true; + enableBloat = !stdenv.isDarwin; }; diffr = callPackage ../tools/text/diffr {