llpp: fix build on darwin
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{ stdenv, lib, substituteAll, makeWrapper, fetchFromGitHub, fetchpatch, ocaml, pkg-config, mupdf, libX11, jbig2dec, openjpeg, libjpeg , lcms2, harfbuzz,
|
||||
libGLU, libGL, gumbo, freetype, zlib, xclip, inotify-tools, procps }:
|
||||
libGLU, libGL, gumbo, freetype, zlib, xclip, inotify-tools, procps, darwin }:
|
||||
|
||||
assert lib.versionAtLeast (lib.getVersion ocaml) "4.07";
|
||||
|
||||
@@ -21,7 +21,9 @@ stdenv.mkDerivation rec {
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ocaml pkg-config ];
|
||||
buildInputs = [ mupdf libX11 libGLU libGL freetype zlib gumbo jbig2dec openjpeg libjpeg lcms2 harfbuzz ];
|
||||
buildInputs = [ mupdf libX11 freetype zlib gumbo jbig2dec openjpeg libjpeg lcms2 harfbuzz ]
|
||||
++ lib.optionals stdenv.isLinux [ libGLU libGL ]
|
||||
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.OpenGL darwin.apple_sdk.frameworks.Cocoa ];
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
@@ -38,7 +40,7 @@ stdenv.mkDerivation rec {
|
||||
install -d $out/bin
|
||||
install build/llpp $out/bin
|
||||
install misc/llpp.inotify $out/bin/llpp.inotify
|
||||
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
wrapProgram $out/bin/llpp \
|
||||
--prefix PATH ":" "${xclip}/bin"
|
||||
|
||||
@@ -51,7 +53,7 @@ stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
homepage = "https://repo.or.cz/w/llpp.git";
|
||||
description = "A MuPDF based PDF pager written in OCaml";
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ pSub ];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user