From 8185586a98d9eba12c1f2f9c783bc3c1b9514de2 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sun, 11 Jun 2023 16:12:01 +0200 Subject: [PATCH] mupdf: actually build and install the shared libraries version The current version of the derivation builds in shared libraries mode, but then the "shared" flag is not passed to the "make install" invocation. This causes "make install" to perform a whole second build from scratch, in static mode, and install this to $out instead. Instead pass shared=yes as part of the makeFlags -- this is basically the only thing that the "shared" build target does anyway, and I don't think there is a similar target for "make install". This issue was detected because the .pc shipped with mupdf doesn't work with the static libraries currently shipped (it doesn't include recursive dependencies like zlib). (cherry picked from commit 3d4769a9e86a51117973281d8ab4328713c4c180) --- pkgs/applications/misc/mupdf/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/applications/misc/mupdf/default.nix b/pkgs/applications/misc/mupdf/default.nix index 812bc9a5d76df..8afcc5abed98a 100644 --- a/pkgs/applications/misc/mupdf/default.nix +++ b/pkgs/applications/misc/mupdf/default.nix @@ -64,11 +64,9 @@ stdenv.mkDerivation rec { substituteInPlace Makerules --replace "(shell pkg-config" "(shell $PKG_CONFIG" ''; - # Use shared libraries to decrease size - buildFlags = [ "shared" ]; - makeFlags = [ "prefix=$(out)" + "shared=yes" "USE_SYSTEM_LIBS=yes" "PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config" ] ++ lib.optionals (!enableX11) [ "HAVE_X11=no" ]