Merge pull request #9113 from dezgeg/pr-diffoscope

debbindiff: Rename to 'diffoscope' and update 26 -> 29 (plus some Python deps)

lethalman 203e32e8 a0f50b48

Changed files
+87 -48
pkgs
tools
misc
debbindiff
diffoscope
top-level
-46
pkgs/tools/misc/debbindiff/default.nix
···
-
{ stdenv, fetchgit, pythonPackages, docutils
-
, acl, binutils, bzip2, cdrkit, cpio, diffutils, e2fsprogs, file, gettext
-
, gnupg, gzip, pdftk, poppler_utils, rpm, squashfsTools, unzip, vim, xz
-
}:
-
-
pythonPackages.buildPythonPackage rec {
-
name = "debbindiff-${version}";
-
version = "26";
-
-
namePrefix = "";
-
-
src = fetchgit {
-
url = "git://anonscm.debian.org/reproducible/debbindiff.git";
-
rev = "refs/tags/${version}";
-
sha256 = "18637gc7c92mwcpx3dvh6xild0sb9bwsgfcrjplmh7s8frvlvkv6";
-
};
-
-
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 magic ]) ++
-
[ acl binutils bzip2 cdrkit cpio diffutils e2fsprogs file gettext gnupg
-
gzip pdftk poppler_utils rpm squashfsTools unzip vim xz ];
-
-
doCheck = false; # Calls 'mknod' in squashfs tests, which needs root
-
-
postInstall = ''
-
mv $out/bin/debbindiff.py $out/bin/debbindiff
-
mkdir -p $out/share/man/man1
-
${docutils}/bin/rst2man.py debian/debbindiff.1.rst $out/share/man/man1/debbindiff.1
-
'';
-
-
meta = with stdenv.lib; {
-
description = "Highlight differences between two builds of Debian packages, and even other kind of files";
-
homepage = https://wiki.debian.org/ReproducibleBuilds;
-
license = licenses.gpl3Plus;
-
maintainers = [ maintainers.dezgeg ];
-
platforms = platforms.linux;
-
};
-
}
+56
pkgs/tools/misc/diffoscope/default.nix
···
+
{ 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;
+
};
+
}
+2 -2
pkgs/top-level/all-packages.nix
···
dcfldd = callPackage ../tools/system/dcfldd { };
-
debbindiff = callPackage ../tools/misc/debbindiff { };
-
debian_devscripts = callPackage ../tools/misc/debian-devscripts {
inherit (perlPackages) CryptSSLeay LWP TimeDate DBFile FileDesktopEntry;
};
···
dhcpcd = callPackage ../tools/networking/dhcpcd { };
di = callPackage ../tools/system/di { };
+
+
diffoscope = callPackage ../tools/misc/diffoscope { };
diffstat = callPackage ../tools/text/diffstat { };
+29
pkgs/top-level/python-packages.nix
···
};
+
ssdeep = buildPythonPackage rec {
+
name = "ssdeep-3.1.1";
+
+
src = pkgs.fetchurl {
+
url = "http://pypi.python.org/packages/source/s/ssdeep/${name}.tar.gz";
+
sha256 = "1p9dpykmnfb73cszdiic5wbz5bmbbmkiih08pb4dah5mwq4n7im6";
+
};
+
+
buildInputs = with pkgs; [ ssdeep ];
+
propagatedBuildInputs = with self; [ cffi six ];
+
};
+
+
statsd = buildPythonPackage rec {
name = "statsd-2.0.2";
···
propagatedBuildInputs = with self; [ pkgs.libarchive ];
+
};
+
+
libarchive-c = buildPythonPackage rec {
+
name = "libarchive-c-2.1";
+
+
src = pkgs.fetchurl {
+
url = "https://pypi.python.org/packages/source/l/libarchive-c/${name}.tar.gz";
+
sha256 = "089lrz6xyrfnk55v35vis6jyqyyl77w093057djyspnd2744wi2n";
+
};
+
+
patchPhase = ''
+
substituteInPlace libarchive/ffi.py --replace \
+
"find_library('archive')" "'${pkgs.libarchive}/lib/libarchive.so'"
+
'';
+
+
buildInputs = [ pkgs.libarchive ];
pybrowserid = buildPythonPackage rec {