summary refs log tree commit diff
path: root/pkgs/tools/misc/diffoscope
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2015-08-04 06:04:12 +0300
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2015-08-04 09:27:33 +0300
commitba5402a32822193577219cef2682359c2e3587e1 (patch)
treeec39736ad445f937dba0b26fec2f34eea3cb566e /pkgs/tools/misc/diffoscope
parent24f76a55d26cfa42be7bc498ccaf01f4c2f3d5bd (diff)
downloadnixpkgs-ba5402a32822193577219cef2682359c2e3587e1.tar
nixpkgs-ba5402a32822193577219cef2682359c2e3587e1.tar.gz
nixpkgs-ba5402a32822193577219cef2682359c2e3587e1.tar.bz2
nixpkgs-ba5402a32822193577219cef2682359c2e3587e1.tar.lz
nixpkgs-ba5402a32822193577219cef2682359c2e3587e1.tar.xz
nixpkgs-ba5402a32822193577219cef2682359c2e3587e1.tar.zst
nixpkgs-ba5402a32822193577219cef2682359c2e3587e1.zip
debbindiff: Rename to 'diffoscope' and update 26 -> 29
Upstream has changed the project name to 'diffoscope' since "debbindiff
has grown way beyond a being just a tool to compare Debian packages."

Besides the rename, there are new dependencies on ssdeep, libarchive-c
and sqlite.
Diffstat (limited to 'pkgs/tools/misc/diffoscope')
-rw-r--r--pkgs/tools/misc/diffoscope/default.nix56
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix
new file mode 100644
index 00000000000..e6c672d8344
--- /dev/null
+++ b/pkgs/tools/misc/diffoscope/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, fetchgit, pythonPackages, docutils
+, acl, binutils, bzip2, cdrkit, cpio, diffutils, e2fsprogs, file, gettext
+, gnupg, gzip, pdftk, poppler_utils, rpm, sqlite, squashfsTools, unzip, vim, xz
+}:
+
+pythonPackages.buildPythonPackage rec {
+  name = "diffoscope-${version}";
+  version = "29";
+
+  namePrefix = "";
+
+  src = fetchgit {
+    url = "git://anonscm.debian.org/reproducible/diffoscope.git";
+    rev = "refs/tags/${version}";
+    sha256 = "0q7hx2wm9gvzl1f7iilr9pjwpv8i2anscqan7cgk80v90s2pakrf";
+  };
+
+  postPatch = ''
+    # Different pkg name in debian
+    sed -i setup.py -e "s@'magic'@'Magic-file-extensions'@"
+
+    # Upstream doesn't provide a PKG-INFO file
+    sed -i setup.py -e "/'rpm',/d"
+  '';
+
+  # Still missing these tools: ghc javap showttf sng
+  propagatedBuildInputs = (with pythonPackages; [ debian libarchive-c magic ssdeep ]) ++
+    [ acl binutils bzip2 cdrkit cpio diffutils e2fsprogs file gettext gnupg
+      gzip pdftk poppler_utils rpm sqlite squashfsTools unzip vim xz ];
+
+  doCheck = false; # Calls 'mknod' in squashfs tests, which needs root
+
+  postInstall = ''
+    mv $out/bin/diffoscope.py $out/bin/diffoscope
+    mkdir -p $out/share/man/man1
+    ${docutils}/bin/rst2man.py debian/diffoscope.1.rst $out/share/man/man1/diffoscope.1
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Perform in-depth comparison of files, archives, and directories";
+    longDescription = ''
+      diffoscope will try to get to the bottom of what makes files or directories
+      different. It will recursively unpack archives of many kinds and transform
+      various binary formats into more human readable form to compare them. It can
+      compare two tarballs, ISO images, or PDF just as easily. The differences can
+      be shown in a text or HTML report.
+
+      diffoscope is developed as part of the "reproducible builds" Debian
+      project and was formerly known as "debbindiff".
+    '';
+    homepage = https://wiki.debian.org/ReproducibleBuilds;
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.dezgeg ];
+    platforms = platforms.linux;
+  };
+}