sile: on Darwin, use AppKit for font selection
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, makeWrapper, pkgconfig
|
{ stdenv, darwin, fetchurl, makeWrapper, pkgconfig
|
||||||
, harfbuzz, icu, lpeg, luaexpat, luazlib, luafilesystem
|
, harfbuzz, icu, lpeg, luaexpat, luazlib, luafilesystem
|
||||||
, fontconfig, lua, libiconv
|
, fontconfig, lua, libiconv
|
||||||
}:
|
}:
|
||||||
@@ -26,7 +26,15 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [pkgconfig makeWrapper];
|
nativeBuildInputs = [pkgconfig makeWrapper];
|
||||||
buildInputs = [ harfbuzz icu lua lpeg luaexpat luazlib luafilesystem fontconfig libiconv ];
|
buildInputs = [ harfbuzz icu lua lpeg luaexpat luazlib luafilesystem fontconfig libiconv ]
|
||||||
|
++ optional stdenv.isDarwin darwin.apple_sdk.frameworks.AppKit
|
||||||
|
;
|
||||||
|
|
||||||
|
preConfigure = optionalString stdenv.isDarwin ''
|
||||||
|
sed -i -e 's|@import AppKit;|#import <AppKit/AppKit.h>|' src/macfonts.m
|
||||||
|
'';
|
||||||
|
|
||||||
|
NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework AppKit";
|
||||||
|
|
||||||
LUA_PATH = luaPath;
|
LUA_PATH = luaPath;
|
||||||
LUA_CPATH = luaCPath;
|
LUA_CPATH = luaCPath;
|
||||||
@@ -49,8 +57,8 @@ stdenv.mkDerivation rec {
|
|||||||
technologies and borrowing some ideas from graphical systems
|
technologies and borrowing some ideas from graphical systems
|
||||||
such as InDesign.
|
such as InDesign.
|
||||||
'';
|
'';
|
||||||
homepage = "http://www.sile-typesetter.org";
|
homepage = http://www.sile-typesetter.org;
|
||||||
platforms = stdenv.lib.platforms.unix;
|
platforms = platforms.unix;
|
||||||
license = stdenv.lib.licenses.mit;
|
license = licenses.mit;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user