Skip to content

Commit

Permalink
diffoscope: move unfree dependencies behind a enableUnfree flag
Browse files Browse the repository at this point in the history
  • Loading branch information
RaitoBezarius committed May 23, 2023
1 parent bae6666 commit 21332b8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
18 changes: 12 additions & 6 deletions pkgs/tools/misc/diffoscope/default.nix
Expand Up @@ -3,7 +3,8 @@
, 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
, radare2, sng, sqlite, squashfsTools, tcpdump, ubootTools, odt2txt, unzip, wabt, xmlbeans, xxd, xz, zip, zstd
, enableBloat ? false
, enableBloat ? true
, enableUnfree ? false
# updater only
, writeScript
}:
Expand Down Expand Up @@ -54,10 +55,15 @@ python3Packages.buildPythonApplication rec {
python-magic progressbar33 pypdf2 tlsh
])
++ lib.optionals stdenv.isLinux [ python3Packages.pyxattr python3Packages.rpm acl cdrkit dtc ]
++ lib.optionals enableBloat ([
abootimg apksigcopier apksigner apktool 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
] ++ (with python3Packages; [ androguard binwalk guestfs h5py pdfminer-six ]));
++ lib.optionals enableBloat (
[
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
]
++ (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;

Expand Down Expand Up @@ -121,7 +127,7 @@ python3Packages.buildPythonApplication rec {
'';
homepage = "https://diffoscope.org/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dezgeg danielfullmer ];
maintainers = with maintainers; [ dezgeg danielfullmer raitobezarius ];
platforms = platforms.unix;
};
}
6 changes: 3 additions & 3 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -6645,12 +6645,12 @@ with pkgs;

diction = callPackage ../tools/text/diction { };

diffoscopeMinimal = callPackage ../tools/misc/diffoscope {
diffoscope = callPackage ../tools/misc/diffoscope {
jdk = jdk8;
};

diffoscope = diffoscopeMinimal.override {
enableBloat = !stdenv.isDarwin;
diffoscopeMinimal = diffoscope.override {
enableBloat = false;
};

diffr = callPackage ../tools/text/diffr {
Expand Down

0 comments on commit 21332b8

Please sign in to comment.