summary refs log tree commit diff
path: root/pkgs/tools/misc/diffoscope/default.nix
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-02-11 18:08:19 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2021-02-11 18:08:19 +0100
commit363b42dcc5c649c0d73cacc6f01cd837fbf300f2 (patch)
tree2b67ec43744b0fe4824bdee5b5f02876a8931831 /pkgs/tools/misc/diffoscope/default.nix
parentec34c6f7bc11e015adb5bc71bd6a4ad885337c97 (diff)
downloadnixpkgs-363b42dcc5c649c0d73cacc6f01cd837fbf300f2.tar
nixpkgs-363b42dcc5c649c0d73cacc6f01cd837fbf300f2.tar.gz
nixpkgs-363b42dcc5c649c0d73cacc6f01cd837fbf300f2.tar.bz2
nixpkgs-363b42dcc5c649c0d73cacc6f01cd837fbf300f2.tar.lz
nixpkgs-363b42dcc5c649c0d73cacc6f01cd837fbf300f2.tar.xz
nixpkgs-363b42dcc5c649c0d73cacc6f01cd837fbf300f2.tar.zst
nixpkgs-363b42dcc5c649c0d73cacc6f01cd837fbf300f2.zip
diffoscope: switch to pytestCheckHook and use installManPage
Diffstat (limited to 'pkgs/tools/misc/diffoscope/default.nix')
-rw-r--r--pkgs/tools/misc/diffoscope/default.nix24
1 files changed, 14 insertions, 10 deletions
diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix
index 5060af531ca..9437ef12f4b 100644
--- a/pkgs/tools/misc/diffoscope/default.nix
+++ b/pkgs/tools/misc/diffoscope/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, runCommand, makeWrapper, python3Packages, docutils, help2man
+{ 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
 , 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
@@ -19,7 +19,7 @@ python3Packages.buildPythonApplication rec {
   version = "166";
 
   src = fetchurl {
-    url    = "https://diffoscope.org/archive/diffoscope-${version}.tar.bz2";
+    url = "https://diffoscope.org/archive/diffoscope-${version}.tar.bz2";
     sha256 = "sha256-6VhHG3MxmIczolOYqU4D1m00h8w2n0ku4dy/dFEYqk0=";
   };
 
@@ -27,7 +27,6 @@ python3Packages.buildPythonApplication rec {
 
   patches = [
     ./ignore_links.patch
-    ./skip-failing-test.patch
   ];
 
   postPatch = ''
@@ -38,7 +37,7 @@ python3Packages.buildPythonApplication rec {
     substituteInPlace doc/Makefile --replace "../bin" "$out/bin"
   '';
 
-  nativeBuildInputs = [ docutils help2man ];
+  nativeBuildInputs = [ docutils help2man installShellFiles ];
 
   # 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
@@ -60,14 +59,19 @@ python3Packages.buildPythonApplication rec {
       hdf5 imagemagick llvm jdk mono odt2txt openssh pdftk poppler_utils qemu R tcpdump wabt
     ] ++ (with python3Packages; [ binwalk guestfs h5py ]));
 
-  checkInputs = with python3Packages; [ pytest ] ++ pythonPath;
+  checkInputs = with python3Packages; [ pytestCheckHook ] ++ pythonPath;
 
   postInstall = ''
     make -C doc
-    mkdir -p $out/share/man/man1
-    cp doc/diffoscope.1 $out/share/man/man1/diffoscope.1
+    installManPage doc/diffoscope.1
   '';
 
+  # Disable flaky test and a failing one
+  disabledTests = [
+    "test_android_manifest"
+    "test_sbin_added_to_path"
+  ];
+
   meta = with lib; {
     description = "Perform in-depth comparison of files, archives, and directories";
     longDescription = ''
@@ -80,9 +84,9 @@ python3Packages.buildPythonApplication rec {
       diffoscope is developed as part of the "reproducible builds" Debian
       project and was formerly known as "debbindiff".
     '';
-    homepage    = "https://diffoscope.org/";
-    license     = licenses.gpl3Plus;
+    homepage = "https://diffoscope.org/";
+    license = licenses.gpl3Plus;
     maintainers = with maintainers; [ dezgeg ma27 danielfullmer ];
-    platforms   = platforms.unix;
+    platforms = platforms.unix;
   };
 }