diffoscope: move unfree dependencies behind a enableUnfree flag

This commit is contained in:
Raito Bezarius 2023-03-18 16:13:21 +01:00
parent bae66663b2
commit 21332b8fd5
2 changed files with 15 additions and 9 deletions

View file

@ -3,7 +3,8 @@
, e2fsprogs, enjarify, file, findutils, fontforge-fonttools, ffmpeg, fpc, gettext, ghc, ghostscriptX, giflib, gnumeric, gnupg, gnutar , e2fsprogs, enjarify, file, findutils, fontforge-fonttools, ffmpeg, fpc, gettext, ghc, ghostscriptX, giflib, gnumeric, gnupg, gnutar
, gzip, html2text, hdf5, imagemagick, jdk, libarchive, libcaca, llvm, lz4, mono, ocaml, oggvideotools, openssh, openssl, pdftk, pgpdump, poppler_utils, procyon, qemu, R , gzip, html2text, 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 , radare2, sng, sqlite, squashfsTools, tcpdump, ubootTools, odt2txt, unzip, wabt, xmlbeans, xxd, xz, zip, zstd
, enableBloat ? false , enableBloat ? true
, enableUnfree ? false
# updater only # updater only
, writeScript , writeScript
}: }:
@ -54,10 +55,15 @@ python3Packages.buildPythonApplication rec {
python-magic progressbar33 pypdf2 tlsh python-magic progressbar33 pypdf2 tlsh
]) ])
++ lib.optionals stdenv.isLinux [ python3Packages.pyxattr python3Packages.rpm acl cdrkit dtc ] ++ lib.optionals stdenv.isLinux [ python3Packages.pyxattr python3Packages.rpm acl cdrkit dtc ]
++ lib.optionals enableBloat ([ ++ lib.optionals enableBloat (
abootimg apksigcopier apksigner apktool cbfstool colord enjarify ffmpeg fpc ghc ghostscriptX giflib gnupg gnumeric [
abootimg apksigcopier apksigner cbfstool colord enjarify ffmpeg fpc ghc ghostscriptX giflib gnupg gnumeric
hdf5 imagemagick libcaca llvm jdk mono ocaml odt2txt oggvideotools openssh pdftk poppler_utils procyon qemu R tcpdump ubootTools wabt radare2 xmlbeans hdf5 imagemagick libcaca 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-six ])); ]
++ (with python3Packages; [ androguard binwalk guestfs h5py pdfminer-six ])
# `apktool` depend on `build-tools` which requires Android SDK acceptance, therefore, the whole thing is unfree.
++ lib.optionals enableUnfree [ apktool ]
);
nativeCheckInputs = with python3Packages; [ pytestCheckHook ] ++ pythonPath; nativeCheckInputs = with python3Packages; [ pytestCheckHook ] ++ pythonPath;
@ -121,7 +127,7 @@ python3Packages.buildPythonApplication rec {
''; '';
homepage = "https://diffoscope.org/"; homepage = "https://diffoscope.org/";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
maintainers = with maintainers; [ dezgeg danielfullmer ]; maintainers = with maintainers; [ dezgeg danielfullmer raitobezarius ];
platforms = platforms.unix; platforms = platforms.unix;
}; };
} }

View file

@ -6645,12 +6645,12 @@ with pkgs;
diction = callPackage ../tools/text/diction { }; diction = callPackage ../tools/text/diction { };
diffoscopeMinimal = callPackage ../tools/misc/diffoscope { diffoscope = callPackage ../tools/misc/diffoscope {
jdk = jdk8; jdk = jdk8;
}; };
diffoscope = diffoscopeMinimal.override { diffoscopeMinimal = diffoscope.override {
enableBloat = !stdenv.isDarwin; enableBloat = false;
}; };
diffr = callPackage ../tools/text/diffr { diffr = callPackage ../tools/text/diffr {