From 4a8de55be08d0786b3862801f3ed6ddad8c27945 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 11 Nov 2019 20:53:15 +0100 Subject: ffmpeg: fix for structured attrs --- pkgs/development/libraries/ffmpeg/generic.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'pkgs/development/libraries/ffmpeg/generic.nix') diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 3424493c209..956d2d7223f 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -44,7 +44,7 @@ let inherit (stdenv) isDarwin isFreeBSD isLinux isAarch32; - inherit (stdenv.lib) optional optionals optionalString enableFeature; + inherit (stdenv.lib) optional optionals optionalString enableFeature filter; cmpVer = builtins.compareVersions; reqMin = requiredVersion: (cmpVer requiredVersion branch != 1); @@ -85,7 +85,7 @@ stdenv.mkDerivation rec { setOutputFlags = false; # doesn't accept all and stores configureFlags in libs! configurePlatforms = []; - configureFlags = [ + configureFlags = filter (v: v != null) ([ "--arch=${stdenv.hostPlatform.parsed.cpu.name}" "--target_os=${stdenv.hostPlatform.parsed.kernel.name}" # License @@ -96,13 +96,15 @@ stdenv.mkDerivation rec { (ifMinVer "0.6" "--enable-pic") (enableFeature runtimeCpuDetectBuild "runtime-cpudetect") "--enable-hardcoded-tables" + ] ++ (if multithreadBuild then ( if stdenv.isCygwin then - "--disable-pthreads --enable-w32threads" + ["--disable-pthreads" "--enable-w32threads"] else # Use POSIX threads by default - "--enable-pthreads --disable-w32threads") + ["--enable-pthreads" "--disable-w32threads"]) else - "--disable-pthreads --disable-w32threads") + ["--disable-pthreads" "--disable-w32threads"]) + ++ [ (ifMinVer "0.9" "--disable-os2threads") # We don't support OS/2 "--enable-network" (ifMinVer "2.4" "--enable-pixelutils") @@ -161,7 +163,7 @@ stdenv.mkDerivation rec { ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" - ] ++ optional stdenv.cc.isClang "--cc=clang"; + ] ++ optional stdenv.cc.isClang "--cc=clang"); nativeBuildInputs = [ addOpenGLRunpath perl pkgconfig texinfo yasm ]; -- cgit 1.4.1