From 2070d83f07e77278ddf8da3b90fc5c6f471df273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 23 Oct 2021 00:14:20 +0200 Subject: [PATCH 1/6] python39Packages.pdfminer: add symlinks without .py extension required for diffoscope --- pkgs/development/python-modules/pdfminer_six/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pdfminer_six/default.nix b/pkgs/development/python-modules/pdfminer_six/default.nix index 96ba66869055..725fb9ab9f93 100644 --- a/pkgs/development/python-modules/pdfminer_six/default.nix +++ b/pkgs/development/python-modules/pdfminer_six/default.nix @@ -6,7 +6,6 @@ buildPythonPackage rec { disabled = !isPy3k; - # No tests in PyPi Tarball src = fetchFromGitHub { owner = "pdfminer"; repo = "pdfminer.six"; @@ -16,6 +15,12 @@ buildPythonPackage rec { propagatedBuildInputs = [ chardet cryptography sortedcontainers ]; + postInstall = '' + for file in $out/bin/*.py; do + ln $file ''${file//.py/} + done + ''; + checkInputs = [ nose ]; checkPhase = '' nosetests From 6fdc3e6a7c04865b59f7c3e28d4eb16818cb7da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 23 Oct 2021 00:17:48 +0200 Subject: [PATCH 2/6] oggvideotools: init at 0.9.1 --- pkgs/tools/misc/oggvideotools/default.nix | 26 +++++++++++++++++++ .../misc/oggvideotools/fix-compile.patch | 10 +++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 38 insertions(+) create mode 100644 pkgs/tools/misc/oggvideotools/default.nix create mode 100644 pkgs/tools/misc/oggvideotools/fix-compile.patch diff --git a/pkgs/tools/misc/oggvideotools/default.nix b/pkgs/tools/misc/oggvideotools/default.nix new file mode 100644 index 000000000000..2780354aa0e6 --- /dev/null +++ b/pkgs/tools/misc/oggvideotools/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchurl, cmake, pkg-config, boost, gd, libogg, libtheora, libvorbis }: + +stdenv.mkDerivation rec { + pname = "oggvideotools"; + version = "0.9.1"; + + src = fetchurl { + url = "mirror://sourceforge/oggvideotools/oggvideotools/oggvideotools-${version}/oggvideotools-${version}.tar.bz2"; + sha256 = "sha256-2dv3iXt86phhIgnYC5EnRzyX1u5ssNzPwrOP4+jilSM="; + }; + + patches = [ + ./fix-compile.patch + ]; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ boost gd libogg libtheora libvorbis ]; + + meta = with lib; { + description = "Toolbox for manipulating and creating Ogg video files"; + homepage = "http://www.streamnik.de/oggvideotools.html"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/tools/misc/oggvideotools/fix-compile.patch b/pkgs/tools/misc/oggvideotools/fix-compile.patch new file mode 100644 index 000000000000..65c3dd6a2351 --- /dev/null +++ b/pkgs/tools/misc/oggvideotools/fix-compile.patch @@ -0,0 +1,10 @@ +--- oggvideotools-0.9.1/src/base/test/decoderTest.cpp 2016-09-05 10:35:14.000000000 +0200 ++++ oggvideotools-0.9.1/src/base/test/decoderTest.cpp 2021-10-22 22:42:48.980473419 +0200 +@@ -5,6 +5,7 @@ + #include "oggDecoder.h" + #include + #include ++#include + + int main(int argc, char* argv[]) + { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aa996e5adfb0..53f44d0a32cb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1269,6 +1269,8 @@ with pkgs; artyFX = callPackage ../applications/audio/artyFX {}; + oggvideotools = callPackage ../tools/misc/oggvideotools { }; + owl-lisp = callPackage ../development/compilers/owl-lisp {}; ascii = callPackage ../tools/text/ascii { }; From bc4417cdca640090bc55e9b7b9b7e7f72c92d764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 23 Oct 2021 00:18:18 +0200 Subject: [PATCH 3/6] enjarify: init at 1.0.3 --- pkgs/tools/misc/enjarify/default.nix | 35 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/tools/misc/enjarify/default.nix diff --git a/pkgs/tools/misc/enjarify/default.nix b/pkgs/tools/misc/enjarify/default.nix new file mode 100644 index 000000000000..13808b91d051 --- /dev/null +++ b/pkgs/tools/misc/enjarify/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchFromGitHub, python3, runtimeShell }: + +stdenv.mkDerivation rec { + pname = "enjarify"; + version = "1.0.3"; + + src = fetchFromGitHub { + owner = "google"; + repo = pname; + rev = version; + sha256 = "sha256-VDBC5n2jWLNJsilX+PV1smL5JeBDj23jYFRwdObXwYs="; + }; + + installPhase = '' + pypath="$out/${python3.sitePackages}" + mkdir -p $out/bin $pypath + mv enjarify $pypath + + cat << EOF > $out/bin/enjarify + #!${runtimeShell} + export PYTHONPATH=$pypath + exec ${python3.interpreter} -O -m enjarify.main "\$@" + EOF + chmod +x $out/bin/enjarify + ''; + + buildInputs = [ ]; + + meta = with lib; { + description = "Tool for translating Dalvik bytecode to equivalent Java bytecode"; + homepage = "https://github.com/google/enjarify/"; + license = licenses.asl20; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 53f44d0a32cb..f47f3b389d0c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1626,6 +1626,8 @@ with pkgs; enchive = callPackage ../tools/security/enchive { }; + enjarify = callPackage ../tools/misc/enjarify { }; + enpass = callPackage ../tools/security/enpass { }; esbuild = callPackage ../development/tools/esbuild { }; From c6172d382cdab1beb686a43875616a747f59643f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 23 Oct 2021 00:18:50 +0200 Subject: [PATCH 4/6] procyon: init at 0.6-prerelease --- pkgs/tools/misc/procyon/default.nix | 31 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/tools/misc/procyon/default.nix diff --git a/pkgs/tools/misc/procyon/default.nix b/pkgs/tools/misc/procyon/default.nix new file mode 100644 index 000000000000..c217f25c1e19 --- /dev/null +++ b/pkgs/tools/misc/procyon/default.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchurl, runtimeShell, jre_headless }: + +stdenv.mkDerivation rec { + pname = "procyon"; + version = "0.6-prerelease"; + + src = fetchurl { + url = "https://github.com/mstrobel/procyon/releases/download/${version}/procyon-decompiler-${version}.jar"; + sha256 = "sha256-eBVWKCo8ccAT/T9HgjxUCNFzGyzofc9Mbyp0ldUmrdk="; + }; + + dontUnpack = true; + + installPhase = '' + mkdir -p $out/bin $out/share/procyon + cp $src $out/share/procyon/procyon-decompiler.jar + + cat << EOF > $out/bin/procyon + #!${runtimeShell} + exec ${jre_headless}/bin/java -jar $out/share/procyon/procyon-decompiler.jar "\$@" + EOF + chmod +x $out/bin/procyon + ''; + + meta = with lib; { + description = "Procyon is a suite of Java metaprogramming tools including a Java decompiler"; + homepage = "https://github.com/mstrobel/procyon/"; + license = licenses.asl20; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f47f3b389d0c..784370fbb9b0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3420,6 +3420,8 @@ with pkgs; inherit (darwin) libiconv; }; + procyon = callPackage ../tools/misc/procyon { }; + profetch = callPackage ../tools/misc/profetch { }; psrecord = python3Packages.callPackage ../tools/misc/psrecord {}; From aa3eb13c9f2886f47ad04b97fde5660481d68aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 23 Oct 2021 00:19:20 +0200 Subject: [PATCH 5/6] xmlbeans: init at 5.0.2-20211014 --- pkgs/tools/misc/xmlbeans/default.nix | 39 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/tools/misc/xmlbeans/default.nix diff --git a/pkgs/tools/misc/xmlbeans/default.nix b/pkgs/tools/misc/xmlbeans/default.nix new file mode 100644 index 000000000000..ce174b195412 --- /dev/null +++ b/pkgs/tools/misc/xmlbeans/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchzip, jre_headless }: + +stdenv.mkDerivation rec { + pname = "xmlbeans"; + version = "5.0.2-20211014"; + + src = fetchzip { + url = "https://dlcdn.apache.org/poi/xmlbeans/release/bin/xmlbeans-bin-${version}.zip"; + sha256 = "sha256-1o0kfBMhka/Midtg+GzpVDDygixL6mrfxtY5WrjLN+0="; + }; + + postPatch = '' + rm bin/*.cmd + substituteInPlace bin/dumpxsb \ + --replace 'echo `dirname $0`' "" + + substituteInPlace bin/_setlib \ + --replace 'echo XMLBEANS_LIB=$XMLBEANS_LIB' "" + + for file in bin/*; do + substituteInPlace $file \ + --replace "java " "${jre_headless}/bin/java " + done + ''; + + installPhase = '' + mkdir -p $out + chmod +x bin/* + cp -r bin/ lib/ $out/ + ''; + + meta = with lib; { + description = "Java library for accessing XML by binding it to Java types"; + homepage = "https://xmlbeans.apache.org/"; + downloadPage = "https://dlcdn.apache.org/poi/xmlbeans/release/bin/"; + license = licenses.asl20; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 784370fbb9b0..87d86187c50e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3573,6 +3573,8 @@ with pkgs; libmaxminddb = null; }; + xmlbeans = callPackage ../tools/misc/xmlbeans { }; + xmlsort = perlPackages.XMLFilterSort; xmousepasteblock = callPackage ../tools/X11/xmousepasteblock { }; From 3da71c4e9a50890903ef767af99de51a88e71df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 23 Oct 2021 00:19:48 +0200 Subject: [PATCH 6/6] diffoscope: enable all available tools --- pkgs/tools/misc/diffoscope/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix index bdac532f07e1..e07d03cddba2 100644 --- a/pkgs/tools/misc/diffoscope/default.nix +++ b/pkgs/tools/misc/diffoscope/default.nix @@ -1,8 +1,8 @@ { lib, stdenv, fetchurl, python3Packages, docutils, help2man, installShellFiles , abootimg, acl, apksigner, apktool, binutils-unwrapped, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, db, diffutils, dtc -, e2fsprogs, file, findutils, fontforge-fonttools, ffmpeg, fpc, gettext, ghc, ghostscriptX, giflib, gnumeric, gnupg, gnutar -, gzip, hdf5, imagemagick, jdk, libarchive, libcaca, llvm, lz4, mono, openssh, openssl, pdftk, pgpdump, poppler_utils, qemu, R -, radare2, sng, sqlite, squashfsTools, tcpdump, odt2txt, unzip, wabt, xxd, xz, zip, zstd +, e2fsprogs, enjarify, file, findutils, fontforge-fonttools, ffmpeg, fpc, gettext, ghc, ghostscriptX, giflib, gnumeric, gnupg, gnutar +, gzip, hdf5, imagemagick, jdk, libarchive, libcaca, llvm, lz4, mono, ocaml, oggvideotools, openssh, openssl, pdftk, pgpdump, poppler_utils, procyon, qemu, R +, radare2, sng, sqlite, squashfsTools, tcpdump, ubootTools, odt2txt, unzip, wabt, xmlbeans, xxd, xz, zip, zstd , enableBloat ? false }: @@ -40,7 +40,7 @@ python3Packages.buildPythonApplication rec { # Most of the non-Python dependencies here are optional command-line tools for various file-format parsers. # To help figuring out what's missing from the list, run: ./pkgs/tools/misc/diffoscope/list-missing-tools.sh # - # Still missing these tools: docx2txt dumpimage dumppdf dumpxsb enjarify lipo ocamlobjinfo oggDump otool procyon + # Still missing these tools: docx2txt lipo otool r2pipe pythonPath = [ binutils-unwrapped bzip2 colordiff coreutils cpio db diffutils e2fsprogs file findutils fontforge-fonttools gettext gnutar gzip @@ -53,9 +53,9 @@ python3Packages.buildPythonApplication rec { ]) ++ lib.optionals stdenv.isLinux [ python3Packages.pyxattr acl cdrkit dtc ] ++ lib.optionals enableBloat ([ - abootimg apksigner apktool cbfstool colord ffmpeg fpc ghc ghostscriptX giflib gnupg gnumeric - hdf5 imagemagick llvm jdk mono odt2txt openssh pdftk poppler_utils qemu R tcpdump wabt radare2 - ] ++ (with python3Packages; [ binwalk guestfs h5py ])); + abootimg apksigner apktool cbfstool colord enjarify ffmpeg fpc ghc ghostscriptX giflib gnupg gnumeric + hdf5 imagemagick llvm jdk mono ocaml odt2txt oggvideotools openssh pdftk poppler_utils procyon qemu R tcpdump ubootTools wabt radare2 xmlbeans + ] ++ (with python3Packages; [ androguard binwalk guestfs h5py pdfminer ])); checkInputs = with python3Packages; [ pytestCheckHook ] ++ pythonPath;