summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lahfa <masterancpp@gmail.com>2023-05-26 15:33:00 +0200
committerGitHub <noreply@github.com>2023-05-26 15:33:00 +0200
commit6b93b785a88aa3ed4888ce0b6fdbe3d21ac7045c (patch)
treee397e0601e61ce1d82bc4676d95c6ce34d3e9300
parenthaskellPackages: ghcWithPackages needs buildHaskellPackages scope (diff)
parentdiffoscope: introduce `lib.meta.availableOn stdenv.hostPlatform` for "plugins" (diff)
downloadnixpkgs-6b93b785a88aa3ed4888ce0b6fdbe3d21ac7045c.tar.gz
Merge pull request #234218 from NixOS/backport-221861-to-release-23.05
[Backport release-23.05] diffoscope: move unfree dependencies behind a enableUnfree flag
-rw-r--r--pkgs/development/python-modules/guestfs/default.nix1
-rw-r--r--pkgs/development/python-modules/pyxattr/default.nix1
-rw-r--r--pkgs/tools/misc/diffoscope/default.nix32
-rw-r--r--pkgs/tools/misc/oggvideotools/default.nix4
-rw-r--r--pkgs/top-level/all-packages.nix6
5 files changed, 31 insertions, 13 deletions
diff --git a/pkgs/development/python-modules/guestfs/default.nix b/pkgs/development/python-modules/guestfs/default.nix
index 0f1d2ddf05cc..68401e9ea4d9 100644
--- a/pkgs/development/python-modules/guestfs/default.nix
+++ b/pkgs/development/python-modules/guestfs/default.nix
@@ -20,5 +20,6 @@ buildPythonPackage rec {
description = "Use libguestfs from Python";
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ grahamc ];
+ inherit (libguestfs.meta) platforms;
};
}
diff --git a/pkgs/development/python-modules/pyxattr/default.nix b/pkgs/development/python-modules/pyxattr/default.nix
index 7e1676dafa63..2bc4a9bf950e 100644
--- a/pkgs/development/python-modules/pyxattr/default.nix
+++ b/pkgs/development/python-modules/pyxattr/default.nix
@@ -21,5 +21,6 @@ buildPythonPackage rec {
meta = with lib; {
description = "A Python extension module which gives access to the extended attributes for filesystem objects available in some operating systems";
license = licenses.lgpl21Plus;
+ inherit (pkgs.attr.meta) platforms;
};
}
diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix
index 6e9a057af077..9f1b76badbba 100644
--- a/pkgs/tools/misc/diffoscope/default.nix
+++ b/pkgs/tools/misc/diffoscope/default.nix
@@ -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
}:
@@ -43,21 +44,32 @@ python3Packages.buildPythonApplication rec {
# To help figuring out what's missing from the list, run: ./pkgs/tools/misc/diffoscope/list-missing-tools.sh
#
# Still missing these tools: docx2txt lipo otool r2pipe
- pythonPath = [
+ # We filter automatically all packages for the host platform (some dependencies are not supported on Darwin, aarch64, etc.).
+ pythonPath = lib.filter (lib.meta.availableOn stdenv.hostPlatform) ([
binutils-unwrapped-all-targets bzip2 colordiff coreutils cpio db diffutils
e2fsprogs file findutils fontforge-fonttools gettext gnutar gzip
html2text libarchive lz4 openssl pgpdump sng sqlite squashfsTools unzip xxd
- xz zip zstd
+ xz zip zstd cdrkit dtc
]
++ (with python3Packages; [
argcomplete debian defusedxml jsondiff jsbeautifier libarchive-c
- python-magic progressbar33 pypdf2 tlsh
+ python-magic progressbar33 pypdf2 tlsh pyxattr rpm
])
- ++ 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 (
+ [
+ apksigcopier apksigner enjarify ffmpeg fpc ghc ghostscriptX giflib gnupg pdftk
+ hdf5 imagemagick libcaca llvm jdk mono ocaml odt2txt openssh
+ poppler_utils procyon qemu R tcpdump wabt radare2 xmlbeans
+ abootimg cbfstool colord ubootTools
+ ]
+ ++ (with python3Packages; [ androguard binwalk h5py pdfminer-six guestfs ])
+ # oggvideotools is broken on Darwin, please put it back when it will be fixed?
+ ++ lib.optionals stdenv.isLinux [ oggvideotools ]
+ # This doesn't work on aarch64-darwin
+ ++ lib.optionals (stdenv.hostPlatform != "aarch64-darwin") [ gnumeric ]
+ # `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;
@@ -121,7 +133,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;
};
}
diff --git a/pkgs/tools/misc/oggvideotools/default.nix b/pkgs/tools/misc/oggvideotools/default.nix
index e6b8d9a1d288..8a390ad490b6 100644
--- a/pkgs/tools/misc/oggvideotools/default.nix
+++ b/pkgs/tools/misc/oggvideotools/default.nix
@@ -43,5 +43,9 @@ stdenv.mkDerivation rec {
homepage = "http://www.streamnik.de/oggvideotools.html";
license = licenses.gpl2Only;
maintainers = with maintainers; [ SuperSandro2000 ];
+ # Compilation error on Darwin:
+ # error: invalid argument '--std=c++0x' not allowed with 'C'
+ # make[2]: *** [src/libresample/CMakeFiles/resample.dir/build.make:76: src/libresample/CMakeFiles/resample.dir/filterkit.c.o] Error 1
+ broken = stdenv.isDarwin;
};
}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c87b5af7cf40..ba75ab46aaa0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6854,12 +6854,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 {