diff --git a/pkgs/development/libraries/libmediainfo/default.nix b/pkgs/development/libraries/libmediainfo/default.nix index 38f27ab23fcd..5ae0c2b7edb0 100644 --- a/pkgs/development/libraries/libmediainfo/default.nix +++ b/pkgs/development/libraries/libmediainfo/default.nix @@ -12,7 +12,12 @@ stdenv.mkDerivation rec { buildInputs = [ zlib ]; propagatedBuildInputs = [ libzen ]; - postPatch = "cd Project/GNU/Library"; + sourceRoot = "MediaInfoLib/Project/GNU/Library"; + + postPatch = lib.optionalString (stdenv.cc.targetPrefix != "") '' + substituteInPlace configure.ac \ + --replace "pkg-config " "${stdenv.cc.targetPrefix}pkg-config " + ''; configureFlags = [ "--enable-shared" ];