Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 75 lines 3.3 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 = "110"; 13 14 src = fetchgit { 15 url = "https://anonscm.debian.org/git/reproducible/diffoscope.git"; 16 rev = "refs/tags/${version}"; 17 sha256 = "0rhjxigwxbqbqk7xv7n4m4rh693rg3cbp4x565jv68iy423mf2fb"; 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 python3Packages.guestfs 47 ]; 48 49 doCheck = false; # Calls 'mknod' in squashfs tests, which needs root 50 checkInputs = with python3Packages; [ pytest ]; 51 52 postInstall = '' 53 make -C doc 54 mkdir -p $out/share/man/man1 55 cp doc/diffoscope.1 $out/share/man/man1/diffoscope.1 56 ''; 57 58 meta = with stdenv.lib; { 59 description = "Perform in-depth comparison of files, archives, and directories"; 60 longDescription = '' 61 diffoscope will try to get to the bottom of what makes files or directories 62 different. It will recursively unpack archives of many kinds and transform 63 various binary formats into more human readable form to compare them. It can 64 compare two tarballs, ISO images, or PDF just as easily. The differences can 65 be shown in a text or HTML report. 66 67 diffoscope is developed as part of the "reproducible builds" Debian 68 project and was formerly known as "debbindiff". 69 ''; 70 homepage = https://wiki.debian.org/ReproducibleBuilds; 71 license = licenses.gpl3Plus; 72 maintainers = with maintainers; [ dezgeg ]; 73 platforms = platforms.linux; 74 }; 75}