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