mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 04:57:56 +03:00
mupdf: Unbreak build on Darwin
Recent changes (ea5dd0974d
) dropped a
patch Darwin needed. I've added a new unconditional patch, because it
doesn't affect Linux and this way it's more obvious when the patch needs
updating.
I decided to add the `xcbuild` dependency because the upstream
build uses `xcrun` and I don't know of a good reason not to.
This commit is contained in:
parent
9eb2001217
commit
a149e9b220
@ -21,6 +21,7 @@
|
|||||||
, enableGL ? true
|
, enableGL ? true
|
||||||
, freeglut
|
, freeglut
|
||||||
, libGLU
|
, libGLU
|
||||||
|
, xcbuild
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -39,7 +40,9 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1vfyhlqq1a0k0drcggly4bgsjasmf6lmpfbdi5xcrwdbzkagrbr1";
|
sha256 = "1vfyhlqq1a0k0drcggly4bgsjasmf6lmpfbdi5xcrwdbzkagrbr1";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = ./0001-Use-command-v-in-favor-of-which.patch;
|
patches = [ ./0001-Use-command-v-in-favor-of-which.patch
|
||||||
|
./0002-Add-Darwin-deps.patch
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i "s/__OPENJPEG__VERSION__/${openJpegVersion}/" source/fitz/load-jpx.c
|
sed -i "s/__OPENJPEG__VERSION__/${openJpegVersion}/" source/fitz/load-jpx.c
|
||||||
@ -54,6 +57,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg gumbo ]
|
buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg gumbo ]
|
||||||
|
++ lib.optional stdenv.isDarwin xcbuild
|
||||||
++ lib.optionals enableX11 [ libX11 libXext libXi libXrandr ]
|
++ lib.optionals enableX11 [ libX11 libXext libXi libXrandr ]
|
||||||
++ lib.optionals enableCurl [ curl openssl ]
|
++ lib.optionals enableCurl [ curl openssl ]
|
||||||
++ lib.optionals enableGL (
|
++ lib.optionals enableGL (
|
||||||
|
Loading…
Reference in New Issue
Block a user