git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #142612 from SuperSandro2000/diffoscope

diffoscope: enable all available tools

commitd448615f5ea2b136e9497ac749b5670b71bb1da0 authorMaximilian Bosch <maximilian@mbosch.me> dateSat 23 Oct 2021, 22:43 (5 years ago) parent879a68d3da71c4
8 files changed+162−8
pkgs/development/python-modules/pdfminer_six/default.nix+6−1 pkgs/tools/misc/diffoscope/default.nix+7−7 pkgs/tools/misc/enjarify/default.nix+35 pkgs/tools/misc/oggvideotools/default.nix+26 pkgs/tools/misc/oggvideotools/fix-compile.patch+10 pkgs/tools/misc/procyon/default.nix+31 pkgs/tools/misc/xmlbeans/default.nix+39 pkgs/top-level/all-packages.nix+8
pkgs/development/python-modules/pdfminer_six/default.nix+6−1
@@ -6,7 +6,6 @@ buildPythonPackage rec {
66
77 disabled = !isPy3k;
88
9− # No tests in PyPi Tarball
109 src = fetchFromGitHub {
1110 owner = "pdfminer";
1211 repo = "pdfminer.six";
@@ -16,6 +15,12 @@ buildPythonPackage rec {
1615
1716 propagatedBuildInputs = [ chardet cryptography sortedcontainers ];
1817
18+ postInstall = ''
19+ for file in $out/bin/*.py; do
20+ ln $file ''${file//.py/}
21+ done
22+ '';
23+
1924 checkInputs = [ nose ];
2025 checkPhase = ''
2126 nosetests
pkgs/tools/misc/diffoscope/default.nix+7−7
@@ -1,8 +1,8 @@
11{ lib, stdenv, fetchurl, python3Packages, docutils, help2man, installShellFiles
22, abootimg, acl, apksigner, apktool, binutils-unwrapped, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, db, diffutils, dtc
3−, e2fsprogs, file, findutils, fontforge-fonttools, ffmpeg, fpc, gettext, ghc, ghostscriptX, giflib, gnumeric, gnupg, gnutar
4−, gzip, hdf5, imagemagick, jdk, libarchive, libcaca, llvm, lz4, mono, openssh, openssl, pdftk, pgpdump, poppler_utils, qemu, R
5−, radare2, sng, sqlite, squashfsTools, tcpdump, odt2txt, unzip, wabt, xxd, xz, zip, zstd
3+, e2fsprogs, enjarify, file, findutils, fontforge-fonttools, ffmpeg, fpc, gettext, ghc, ghostscriptX, giflib, gnumeric, gnupg, gnutar
4+, gzip, hdf5, imagemagick, jdk, libarchive, libcaca, llvm, lz4, mono, ocaml, oggvideotools, openssh, openssl, pdftk, pgpdump, poppler_utils, procyon, qemu, R
5+, radare2, sng, sqlite, squashfsTools, tcpdump, ubootTools, odt2txt, unzip, wabt, xmlbeans, xxd, xz, zip, zstd
66, enableBloat ? false
77}:
88
@@ -40,7 +40,7 @@ python3Packages.buildPythonApplication rec {
4040 # Most of the non-Python dependencies here are optional command-line tools for various file-format parsers.
4141 # To help figuring out what's missing from the list, run: ./pkgs/tools/misc/diffoscope/list-missing-tools.sh
4242 #
43− # Still missing these tools: docx2txt dumpimage dumppdf dumpxsb enjarify lipo ocamlobjinfo oggDump otool procyon
43+ # Still missing these tools: docx2txt lipo otool r2pipe
4444 pythonPath = [
4545 binutils-unwrapped bzip2 colordiff coreutils cpio db diffutils
4646 e2fsprogs file findutils fontforge-fonttools gettext gnutar gzip
@@ -53,9 +53,9 @@ python3Packages.buildPythonApplication rec {
5353 ])
5454 ++ lib.optionals stdenv.isLinux [ python3Packages.pyxattr acl cdrkit dtc ]
5555 ++ lib.optionals enableBloat ([
56− abootimg apksigner apktool cbfstool colord ffmpeg fpc ghc ghostscriptX giflib gnupg gnumeric
57− hdf5 imagemagick llvm jdk mono odt2txt openssh pdftk poppler_utils qemu R tcpdump wabt radare2
58− ] ++ (with python3Packages; [ binwalk guestfs h5py ]));
56+ abootimg apksigner apktool cbfstool colord enjarify ffmpeg fpc ghc ghostscriptX giflib gnupg gnumeric
57+ hdf5 imagemagick llvm jdk mono ocaml odt2txt oggvideotools openssh pdftk poppler_utils procyon qemu R tcpdump ubootTools wabt radare2 xmlbeans
58+ ] ++ (with python3Packages; [ androguard binwalk guestfs h5py pdfminer ]));
5959
6060 checkInputs = with python3Packages; [ pytestCheckHook ] ++ pythonPath;
6161
pkgs/tools/misc/enjarify/default.nixnew file+35
@@ -0,0 +1,35 @@
1+{ lib, stdenv, fetchFromGitHub, python3, runtimeShell }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "enjarify";
5+ version = "1.0.3";
6+
7+ src = fetchFromGitHub {
8+ owner = "google";
9+ repo = pname;
10+ rev = version;
11+ sha256 = "sha256-VDBC5n2jWLNJsilX+PV1smL5JeBDj23jYFRwdObXwYs=";
12+ };
13+
14+ installPhase = ''
15+ pypath="$out/${python3.sitePackages}"
16+ mkdir -p $out/bin $pypath
17+ mv enjarify $pypath
18+
19+ cat << EOF > $out/bin/enjarify
20+ #!${runtimeShell}
21+ export PYTHONPATH=$pypath
22+ exec ${python3.interpreter} -O -m enjarify.main "\$@"
23+ EOF
24+ chmod +x $out/bin/enjarify
25+ '';
26+
27+ buildInputs = [ ];
28+
29+ meta = with lib; {
30+ description = "Tool for translating Dalvik bytecode to equivalent Java bytecode";
31+ homepage = "https://github.com/google/enjarify/";
32+ license = licenses.asl20;
33+ maintainers = with maintainers; [ SuperSandro2000 ];
34+ };
35+}
pkgs/tools/misc/oggvideotools/default.nixnew file+26
@@ -0,0 +1,26 @@
1+{ lib, stdenv, fetchurl, cmake, pkg-config, boost, gd, libogg, libtheora, libvorbis }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "oggvideotools";
5+ version = "0.9.1";
6+
7+ src = fetchurl {
8+ url = "mirror://sourceforge/oggvideotools/oggvideotools/oggvideotools-${version}/oggvideotools-${version}.tar.bz2";
9+ sha256 = "sha256-2dv3iXt86phhIgnYC5EnRzyX1u5ssNzPwrOP4+jilSM=";
10+ };
11+
12+ patches = [
13+ ./fix-compile.patch
14+ ];
15+
16+ nativeBuildInputs = [ cmake pkg-config ];
17+
18+ buildInputs = [ boost gd libogg libtheora libvorbis ];
19+
20+ meta = with lib; {
21+ description = "Toolbox for manipulating and creating Ogg video files";
22+ homepage = "http://www.streamnik.de/oggvideotools.html";
23+ license = licenses.gpl2Only;
24+ maintainers = with maintainers; [ SuperSandro2000 ];
25+ };
26+}
pkgs/tools/misc/oggvideotools/fix-compile.patchnew file+10
@@ -0,0 +1,10 @@
1+--- oggvideotools-0.9.1/src/base/test/decoderTest.cpp 2016-09-05 10:35:14.000000000 +0200
2++++ oggvideotools-0.9.1/src/base/test/decoderTest.cpp 2021-10-22 22:42:48.980473419 +0200
3+@@ -5,6 +5,7 @@
4+ #include "oggDecoder.h"
5+ #include <vector>
6+ #include <iostream>
7++#include <cstring>
8+
9+ int main(int argc, char* argv[])
10+ {
pkgs/tools/misc/procyon/default.nixnew file+31
@@ -0,0 +1,31 @@
1+{ lib, stdenv, fetchurl, runtimeShell, jre_headless }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "procyon";
5+ version = "0.6-prerelease";
6+
7+ src = fetchurl {
8+ url = "https://github.com/mstrobel/procyon/releases/download/${version}/procyon-decompiler-${version}.jar";
9+ sha256 = "sha256-eBVWKCo8ccAT/T9HgjxUCNFzGyzofc9Mbyp0ldUmrdk=";
10+ };
11+
12+ dontUnpack = true;
13+
14+ installPhase = ''
15+ mkdir -p $out/bin $out/share/procyon
16+ cp $src $out/share/procyon/procyon-decompiler.jar
17+
18+ cat << EOF > $out/bin/procyon
19+ #!${runtimeShell}
20+ exec ${jre_headless}/bin/java -jar $out/share/procyon/procyon-decompiler.jar "\$@"
21+ EOF
22+ chmod +x $out/bin/procyon
23+ '';
24+
25+ meta = with lib; {
26+ description = "Procyon is a suite of Java metaprogramming tools including a Java decompiler";
27+ homepage = "https://github.com/mstrobel/procyon/";
28+ license = licenses.asl20;
29+ maintainers = with maintainers; [ SuperSandro2000 ];
30+ };
31+}
pkgs/tools/misc/xmlbeans/default.nixnew file+39
@@ -0,0 +1,39 @@
1+{ lib, stdenv, fetchzip, jre_headless }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "xmlbeans";
5+ version = "5.0.2-20211014";
6+
7+ src = fetchzip {
8+ url = "https://dlcdn.apache.org/poi/xmlbeans/release/bin/xmlbeans-bin-${version}.zip";
9+ sha256 = "sha256-1o0kfBMhka/Midtg+GzpVDDygixL6mrfxtY5WrjLN+0=";
10+ };
11+
12+ postPatch = ''
13+ rm bin/*.cmd
14+ substituteInPlace bin/dumpxsb \
15+ --replace 'echo `dirname $0`' ""
16+
17+ substituteInPlace bin/_setlib \
18+ --replace 'echo XMLBEANS_LIB=$XMLBEANS_LIB' ""
19+
20+ for file in bin/*; do
21+ substituteInPlace $file \
22+ --replace "java " "${jre_headless}/bin/java "
23+ done
24+ '';
25+
26+ installPhase = ''
27+ mkdir -p $out
28+ chmod +x bin/*
29+ cp -r bin/ lib/ $out/
30+ '';
31+
32+ meta = with lib; {
33+ description = "Java library for accessing XML by binding it to Java types";
34+ homepage = "https://xmlbeans.apache.org/";
35+ downloadPage = "https://dlcdn.apache.org/poi/xmlbeans/release/bin/";
36+ license = licenses.asl20;
37+ maintainers = with maintainers; [ SuperSandro2000 ];
38+ };
39+}
pkgs/top-level/all-packages.nix+8
@@ -1271,6 +1271,8 @@ with pkgs;
12711271
12721272 artyFX = callPackage ../applications/audio/artyFX {};
12731273
1274+ oggvideotools = callPackage ../tools/misc/oggvideotools { };
1275+
12741276 owl-lisp = callPackage ../development/compilers/owl-lisp {};
12751277
12761278 ascii = callPackage ../tools/text/ascii { };
@@ -1626,6 +1628,8 @@ with pkgs;
16261628
16271629 enchive = callPackage ../tools/security/enchive { };
16281630
1631+ enjarify = callPackage ../tools/misc/enjarify { };
1632+
16291633 enpass = callPackage ../tools/security/enpass { };
16301634
16311635 esbuild = callPackage ../development/tools/esbuild { };
@@ -3418,6 +3422,8 @@ with pkgs;
34183422 inherit (darwin) libiconv;
34193423 };
34203424
3425+ procyon = callPackage ../tools/misc/procyon { };
3426+
34213427 profetch = callPackage ../tools/misc/profetch { };
34223428
34233429 psrecord = python3Packages.callPackage ../tools/misc/psrecord {};
@@ -3569,6 +3575,8 @@ with pkgs;
35693575 libmaxminddb = null;
35703576 };
35713577
3578+ xmlbeans = callPackage ../tools/misc/xmlbeans { };
3579+
35723580 xmlsort = perlPackages.XMLFilterSort;
35733581
35743582 xmousepasteblock = callPackage ../tools/X11/xmousepasteblock { };