at 18.09-beta 74 lines 3.2 kB view raw
1{ lib, stdenv, fetchgit, python3Packages, docutils, help2man 2, acl, apktool, binutils-unwrapped, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, db, diffutils, dtc 3, e2fsprogs, file, findutils, fontforge-fonttools, fpc, gettext, ghc, ghostscriptX, giflib, gnumeric, gnupg1, gnutar 4, gzip, imagemagick, jdk, libarchive, libcaca, llvm, lz4, mono, openssh, pdftk, pgpdump, poppler_utils, sng, sqlite 5, squashfsTools, tcpdump, unoconv, unzip, xxd, xz 6, enableBloat ? false 7}: 8 9# Note: when upgrading this package, please run the list-missing-tools.sh script as described below! 10python3Packages.buildPythonApplication rec { 11 name = "diffoscope-${version}"; 12 version = "99"; 13 14 src = fetchgit { 15 url = "https://anonscm.debian.org/git/reproducible/diffoscope.git"; 16 rev = "refs/tags/${version}"; 17 sha256 = "04a2sqv43g002b7s0crk9gnpdvf90j8j8p01b6shinxh6an8prs2"; 18 }; 19 20 patches = [ 21 ./ignore_links.patch 22 ]; 23 24 postPatch = '' 25 # Upstream doesn't provide a PKG-INFO file 26 sed -i setup.py -e "/'rpm-python',/d" 27 28 # When generating manpage, use the installed version 29 substituteInPlace doc/Makefile --replace "../bin" "$out/bin" 30 ''; 31 32 nativeBuildInputs = [ docutils help2man ]; 33 34 # Most of the non-Python dependencies here are optional command-line tools for various file-format parsers. 35 # To help figuring out what's missing from the list, run: ./pkgs/tools/misc/diffoscope/list-missing-tools.sh 36 # 37 # Still missing these tools: abootimg docx2txt dumpxsb enjarify js-beautify lipo oggDump otool procyon-decompiler Rscript 38 # Also these libraries: python3-guestfs 39 pythonPath = with python3Packages; [ debian libarchive-c python_magic tlsh rpm ] ++ [ 40 acl binutils-unwrapped bzip2 cdrkit colordiff coreutils cpio db diffutils 41 dtc e2fsprogs file findutils fontforge-fonttools gettext gnutar gzip 42 libarchive libcaca lz4 pgpdump progressbar33 sng sqlite squashfsTools unzip xxd xz 43 ] ++ lib.optionals enableBloat [ 44 apktool cbfstool colord fpc ghc ghostscriptX giflib gnupg1 gnumeric imagemagick 45 llvm jdk mono openssh pdftk poppler_utils tcpdump unoconv 46 ]; 47 48 doCheck = false; # Calls 'mknod' in squashfs tests, which needs root 49 checkInputs = with python3Packages; [ pytest ]; 50 51 postInstall = '' 52 make -C doc 53 mkdir -p $out/share/man/man1 54 cp doc/diffoscope.1 $out/share/man/man1/diffoscope.1 55 ''; 56 57 meta = with stdenv.lib; { 58 description = "Perform in-depth comparison of files, archives, and directories"; 59 longDescription = '' 60 diffoscope will try to get to the bottom of what makes files or directories 61 different. It will recursively unpack archives of many kinds and transform 62 various binary formats into more human readable form to compare them. It can 63 compare two tarballs, ISO images, or PDF just as easily. The differences can 64 be shown in a text or HTML report. 65 66 diffoscope is developed as part of the "reproducible builds" Debian 67 project and was formerly known as "debbindiff". 68 ''; 69 homepage = https://wiki.debian.org/ReproducibleBuilds; 70 license = licenses.gpl3Plus; 71 maintainers = with maintainers; [ dezgeg ]; 72 platforms = platforms.linux; 73 }; 74}