From e7d335fa8b0c4ba46104b0d885bc276365495af1 Mon Sep 17 00:00:00 2001 From: toonn Date: Wed, 9 Mar 2022 14:23:48 +0100 Subject: [PATCH 1/2] mupdf: Don't build X11 binaries by default on Darwin --- pkgs/applications/misc/mupdf/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/mupdf/default.nix b/pkgs/applications/misc/mupdf/default.nix index 7bb9a89b8b39..6471ab49fe0a 100644 --- a/pkgs/applications/misc/mupdf/default.nix +++ b/pkgs/applications/misc/mupdf/default.nix @@ -10,7 +10,7 @@ , libjpeg , darwin , gumbo -, enableX11 ? true +, enableX11 ? (!stdenv.isDarwin) , libX11 , libXext , libXi From 5c4f57cc5720ca7c4a500d6dc672208fe191564a Mon Sep 17 00:00:00 2001 From: toonn Date: Wed, 9 Mar 2022 17:33:08 +0100 Subject: [PATCH 2/2] mupdf: Add Darwin application --- pkgs/applications/misc/mupdf/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/mupdf/default.nix b/pkgs/applications/misc/mupdf/default.nix index 6471ab49fe0a..7a272e9d491f 100644 --- a/pkgs/applications/misc/mupdf/default.nix +++ b/pkgs/applications/misc/mupdf/default.nix @@ -2,6 +2,7 @@ , lib , fetchurl , fetchpatch +, desktopToDarwinBundle , pkg-config , freetype , harfbuzz @@ -50,7 +51,9 @@ stdenv.mkDerivation rec { ++ lib.optionals (!enableX11) [ "HAVE_X11=no" ] ++ lib.optionals (!enableGL) [ "HAVE_GLUT=no" ]; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = + [ pkg-config ] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg gumbo ] ++ lib.optionals enableX11 [ libX11 libXext libXi libXrandr ] ++ lib.optionals enableCurl [ curl openssl ]