ffmpeg: fix for structured attrs

This commit is contained in:
Robin Gloster 2019-11-11 20:53:15 +01:00 committed by Jan Tojnar
parent edfdd0f3e4
commit 4a8de55be0
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -44,7 +44,7 @@
let let
inherit (stdenv) isDarwin isFreeBSD isLinux isAarch32; inherit (stdenv) isDarwin isFreeBSD isLinux isAarch32;
inherit (stdenv.lib) optional optionals optionalString enableFeature; inherit (stdenv.lib) optional optionals optionalString enableFeature filter;
cmpVer = builtins.compareVersions; cmpVer = builtins.compareVersions;
reqMin = requiredVersion: (cmpVer requiredVersion branch != 1); reqMin = requiredVersion: (cmpVer requiredVersion branch != 1);
@ -85,7 +85,7 @@ stdenv.mkDerivation rec {
setOutputFlags = false; # doesn't accept all and stores configureFlags in libs! setOutputFlags = false; # doesn't accept all and stores configureFlags in libs!
configurePlatforms = []; configurePlatforms = [];
configureFlags = [ configureFlags = filter (v: v != null) ([
"--arch=${stdenv.hostPlatform.parsed.cpu.name}" "--arch=${stdenv.hostPlatform.parsed.cpu.name}"
"--target_os=${stdenv.hostPlatform.parsed.kernel.name}" "--target_os=${stdenv.hostPlatform.parsed.kernel.name}"
# License # License
@ -96,13 +96,15 @@ stdenv.mkDerivation rec {
(ifMinVer "0.6" "--enable-pic") (ifMinVer "0.6" "--enable-pic")
(enableFeature runtimeCpuDetectBuild "runtime-cpudetect") (enableFeature runtimeCpuDetectBuild "runtime-cpudetect")
"--enable-hardcoded-tables" "--enable-hardcoded-tables"
] ++
(if multithreadBuild then ( (if multithreadBuild then (
if stdenv.isCygwin then if stdenv.isCygwin then
"--disable-pthreads --enable-w32threads" ["--disable-pthreads" "--enable-w32threads"]
else # Use POSIX threads by default else # Use POSIX threads by default
"--enable-pthreads --disable-w32threads") ["--enable-pthreads" "--disable-w32threads"])
else else
"--disable-pthreads --disable-w32threads") ["--disable-pthreads" "--disable-w32threads"])
++ [
(ifMinVer "0.9" "--disable-os2threads") # We don't support OS/2 (ifMinVer "0.9" "--disable-os2threads") # We don't support OS/2
"--enable-network" "--enable-network"
(ifMinVer "2.4" "--enable-pixelutils") (ifMinVer "2.4" "--enable-pixelutils")
@ -161,7 +163,7 @@ stdenv.mkDerivation rec {
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--cross-prefix=${stdenv.cc.targetPrefix}" "--cross-prefix=${stdenv.cc.targetPrefix}"
"--enable-cross-compile" "--enable-cross-compile"
] ++ optional stdenv.cc.isClang "--cc=clang"; ] ++ optional stdenv.cc.isClang "--cc=clang");
nativeBuildInputs = [ addOpenGLRunpath perl pkgconfig texinfo yasm ]; nativeBuildInputs = [ addOpenGLRunpath perl pkgconfig texinfo yasm ];