From 0d9068b13119cfed14fff399f4cc0609e179ac8d Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Thu, 20 Oct 2016 16:38:02 +0300 Subject: [PATCH] opencv: Fix pkgconfig file after multiple outputs It used to contain: ```` includedir_old=${prefix}/include/opencv includedir_new=${prefix}/include Cflags: -I${includedir_old} -I${includedir_new} ```` Should fix build of 'seeks' and some others. --- pkgs/development/libraries/opencv/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/opencv/default.nix b/pkgs/development/libraries/opencv/default.nix index fd66d5bd41ea..7ea32745ba08 100644 --- a/pkgs/development/libraries/opencv/default.nix +++ b/pkgs/development/libraries/opencv/default.nix @@ -68,6 +68,12 @@ stdenv.mkDerivation rec { hardeningDisable = [ "bindnow" "relro" ]; + # Fix pkgconfig file that gets broken with multiple outputs + postFixup = '' + sed -i $dev/lib/pkgconfig/opencv.pc -e "s|includedir_old=.*|includedir_old=$dev/include/opencv|" + sed -i $dev/lib/pkgconfig/opencv.pc -e "s|includedir_new=.*|includedir_new=$dev/include|" + ''; + passthru = lib.optionalAttrs enablePython { pythonPath = []; }; meta = {