mupdf: fix finding pkg-config under cross-compilation

authored by Yves Fischer and committed by Franz Pletz 48728f5c 511cc486

+7 -2
+7 -2
pkgs/applications/misc/mupdf/default.nix
··· 5 5 , copyDesktopItems 6 6 , makeDesktopItem 7 7 , desktopToDarwinBundle 8 + , buildPackages 8 9 , pkg-config 9 10 , freetype 10 11 , harfbuzz ··· 49 50 50 51 postPatch = '' 51 52 sed -i "s/__OPENJPEG__VERSION__/${openJpegVersion}/" source/fitz/load-jpx.c 53 + substituteInPlace Makerules --replace "(shell pkg-config" "(shell $PKG_CONFIG" 52 54 ''; 53 55 54 56 # Use shared libraries to decrease size 55 57 buildFlags = [ "shared" ]; 56 58 57 - makeFlags = [ "prefix=$(out)" "USE_SYSTEM_LIBS=yes" ] 58 - ++ lib.optionals (!enableX11) [ "HAVE_X11=no" ] 59 + makeFlags = [ 60 + "prefix=$(out)" 61 + "USE_SYSTEM_LIBS=yes" 62 + "PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config" 63 + ] ++ lib.optionals (!enableX11) [ "HAVE_X11=no" ] 59 64 ++ lib.optionals (!enableGL) [ "HAVE_GLUT=no" ]; 60 65 61 66 nativeBuildInputs = [ pkg-config ]