summary refs log tree commit diff
path: root/pkgs/development/libraries/ffmpeg-full
diff options
context:
space:
mode:
authorStéphan Kochen <git@stephank.nl>2021-05-20 07:49:57 +0200
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-05-20 11:50:17 -0700
commit4b6673216f01d896ede3a2115917dd4cf3b8dd16 (patch)
tree9124ef571aa3453600adbb19a7505c3c9ed67bd2 /pkgs/development/libraries/ffmpeg-full
parent9eafeb243ac534410f234389a54a65915a9bd9a9 (diff)
downloadnixpkgs-4b6673216f01d896ede3a2115917dd4cf3b8dd16.tar
nixpkgs-4b6673216f01d896ede3a2115917dd4cf3b8dd16.tar.gz
nixpkgs-4b6673216f01d896ede3a2115917dd4cf3b8dd16.tar.bz2
nixpkgs-4b6673216f01d896ede3a2115917dd4cf3b8dd16.tar.lz
nixpkgs-4b6673216f01d896ede3a2115917dd4cf3b8dd16.tar.xz
nixpkgs-4b6673216f01d896ede3a2115917dd4cf3b8dd16.tar.zst
nixpkgs-4b6673216f01d896ede3a2115917dd4cf3b8dd16.zip
ffmpeg-full: fix darwin build
libglslang is a dependency of vulkan filters, so only makes sense if
those are enabled.
Diffstat (limited to 'pkgs/development/libraries/ffmpeg-full')
-rw-r--r--pkgs/development/libraries/ffmpeg-full/default.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix
index e9c9f2fdf6a..dcd1388143d 100644
--- a/pkgs/development/libraries/ffmpeg-full/default.nix
+++ b/pkgs/development/libraries/ffmpeg-full/default.nix
@@ -272,7 +272,6 @@ stdenv.mkDerivation rec {
     # On some ARM platforms --enable-thumb
     "--enable-shared"
     (enableFeature true "pic")
-    (if stdenv.cc.isClang then "--cc=clang" else null)
     (enableFeature smallBuild "small")
     (enableFeature runtimeCpuDetectBuild "runtime-cpudetect")
     (enableFeature enableLto "lto")
@@ -404,7 +403,7 @@ stdenv.mkDerivation rec {
     (enableFeature (zeromq4 != null) "libzmq")
     (enableFeature (zlib != null) "zlib")
     (enableFeature (isLinux && vulkan-loader != null) "vulkan")
-    (enableFeature (glslang != null) "libglslang")
+    (enableFeature (isLinux && vulkan-loader != null && glslang != null) "libglslang")
     #(enableFeature (zvbi != null && gplLicensing) "libzvbi")
     /*
      * Developer flags
@@ -416,6 +415,9 @@ stdenv.mkDerivation rec {
   ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
     "--cross-prefix=${stdenv.cc.targetPrefix}"
     "--enable-cross-compile"
+  ] ++ optionals stdenv.cc.isClang [
+    "--cc=clang"
+    "--cxx=clang++"
   ];
 
   nativeBuildInputs = [ addOpenGLRunpath perl pkg-config texinfo yasm ];
@@ -426,12 +428,12 @@ stdenv.mkDerivation rec {
     libogg libopus librsvg libssh libtheora libvdpau libvorbis libvpx libwebp libX11
     libxcb libXv libXext xz openal openjpeg libpulseaudio rav1e svt-av1 rtmpdump opencore-amr
     samba SDL2 soxr speex srt vid-stab vo-amrwbenc x264 x265 xavs xvidcore
-    zeromq4 zlib glslang
+    zeromq4 zlib
   ] ++ optionals openglExtlib [ libGL libGLU ]
     ++ optionals nonfreeLicensing [ fdk_aac openssl ]
     ++ optional ((isLinux || isFreeBSD) && libva != null) libva
     ++ optional (!isAarch64 && libvmaf != null && version3Licensing) libvmaf
-    ++ optionals isLinux [ alsaLib libraw1394 libv4l vulkan-loader ]
+    ++ optionals isLinux [ alsaLib libraw1394 libv4l vulkan-loader glslang ]
     ++ optional (isLinux && !isAarch64 && libmfx != null) libmfx
     ++ optional nvenc nv-codec-headers
     ++ optionals stdenv.isDarwin [ Cocoa CoreServices CoreAudio AVFoundation