From ad1912700993e759630c2289c5cf863c44448876 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Sun, 15 Jul 2018 13:15:24 +0900 Subject: [PATCH 1/2] ffmpeg: fix inverted cross compilation flags --- pkgs/development/libraries/ffmpeg/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 270e9605582..762f306d69f 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -148,7 +148,7 @@ stdenv.mkDerivation rec { "--disable-stripping" # Disable mmx support for 0.6.90 (verFix null "0.6.90" "--disable-mmx") - ] ++ optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" ] ++ optional stdenv.cc.isClang "--cc=clang"; From 342f72e747369c19f041e4169d93b3283dbe15a9 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Sun, 15 Jul 2018 14:41:45 +0900 Subject: [PATCH 2/2] ffmpeg: fix includedir in pkg-config files --- pkgs/development/libraries/ffmpeg/generic.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 762f306d69f..bc70c5ab237 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -170,9 +170,15 @@ stdenv.mkDerivation rec { doCheck = false; # fails + # ffmpeg 3+ generates pkg-config (.pc) files that don't have the + # form automatically handled by the multiple-outputs hooks. postFixup = '' moveToOutput bin "$bin" moveToOutput share/ffmpeg/examples "$doc" + for pc in ''${!outputDev}/lib/pkgconfig/*.pc; do + substituteInPlace $pc \ + --replace "includedir=$out" "includedir=''${!outputInclude}" + done ''; installFlags = [ "install-man" ];