From 3d4769a9e86a51117973281d8ab4328713c4c180 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). --- 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 c9523581b0a9..99ca27514345 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" ]