@ -1,37 +1,78 @@
{ stdenv , darwin , fetchurl , makeWrapper , pkgconfig , autoconf , automake
, harfbuzz , icu
, fontconfig , lua , libiconv
, makeFontsConf , gentium
{ stdenv
, darwin
, fetchurl
, makeWrapper
, pkg-config
, autoconf
, automake
, poppler_utils
, harfbuzz
, icu
, fontconfig
, lua
, libiconv
, makeFontsConf
, gentium
} :
with stdenv . lib ;
let
luaEnv = lua . withPackages ( ps : with ps ; [ cassowary cosmo compat53 linenoise lpeg lua-zlib lua_cliargs luaepnf luaexpat luafilesystem luarepl luasec luasocket stdlib vstruct ] ) ;
luaEnv = lua . withPackages ( ps : with ps ; [
cassowary
cosmo
compat53
linenoise
lpeg
lua-zlib
lua_cliargs
luaepnf
luaexpat
luafilesystem
luarepl
luasec
luasocket
stdlib
vstruct
] ) ;
in
stdenv . mkDerivation rec {
pname = " s i l e " ;
version = " 0 . 1 0 . 4 " ;
version = " 0 . 1 0 . 9 " ;
src = fetchurl {
url = " h t t p s : / / g i t h u b . c o m / s i l e - t y p e s e t t e r / s i l e / r e l e a s e s / d o w n l o a d / v ${ version } / ${ pname } - ${ version } . t a r . b z 2 " ;
sha256 = " 0 8 j 2 v v 6 s p n z z 8 b s h 6 2 w b d v 1 p j i z i i b a 7 1 c a d s c s y 5 h w 6 p k l z n d n i " ;
url = " h t t p s : / / g i t h u b . c o m / s i l e - t y p e s e t t e r / s i l e / r e l e a s e s / d o w n l o a d / v ${ version } / ${ pname } - ${ version } . t a r . x z " ;
sha256 = " 0 r 5 5 c 1 n z 5 b k g z f v i w 7 2 l y h 3 8 n l s 9 s 4 9 z i 3 p j a 7 m l d 6 q 5 d c l a z s j 4 " ;
} ;
configureFlags = [ " - - w i t h - s y s t e m - l u a r o c k s " ] ;
nativeBuildInputs = [ autoconf automake pkgconfig makeWrapper ] ;
buildInputs = [ harfbuzz icu fontconfig libiconv luaEnv ]
++ optional stdenv . isDarwin darwin . apple_sdk . frameworks . AppKit
configureFlags = [
" - - w i t h - s y s t e m - l u a r o c k s "
" - - w i t h - m a n u a l "
] ;
nativeBuildInputs = [
autoconf
automake
pkg-config
makeWrapper
] ;
buildInputs = [
harfbuzz
icu
fontconfig
libiconv
luaEnv
]
++ stdenv . lib . optional stdenv . isDarwin darwin . apple_sdk . frameworks . AppKit
;
checkInputs = [
poppler_utils
] ;
preConfigure = optionalString stdenv . isDarwin ''
preConfigure = stdenv . lib . optionalString stdenv . isDarwin ''
sed - i - e ' s | @ import AppKit ; | #import <AppKit/AppKit.h>|' src/macfonts.m
'' ;
NIX_LDFLAGS = optionalString stdenv . isDarwin " - f r a m e w o r k A p p K i t " ;
NIX_LDFLAGS = stdenv . lib . optionalString stdenv . isDarwin " - f r a m e w o r k A p p K i t " ;
FONTCONFIG_FILE = makeFontsConf {
fontDirectories = [
@ -39,11 +80,7 @@ stdenv.mkDerivation rec {
] ;
} ;
# TODO: needs to tweak Makefile-fonts to avoid download fonts
doCheck = false ; /* s t d e n v . t a r g e t P l a t f o r m = = s t d e n v . h o s t P l a t f o r m
&& ! stdenv . isAarch64 # random seg. faults
&& ! stdenv . isDarwin ; # dy lib not found
* /
doCheck = true ;
enableParallelBuilding = true ;
@ -52,18 +89,12 @@ stdenv.mkDerivation rec {
- - replace " A S S E R T ( h t & & h t - > t a b l e & & i t e r ) ; " " A S S E R T ( h t & & i t e r ) ; "
'' ;
checkTarget = " e x a m p l e s " ;
postInstall = ''
install - D - t $ out/share/doc/sile documentation/sile.pdf
'' ;
# Hack to avoid TMPDIR in RPATHs.
preFixup = '' r m - r f " $( p w d ) " & & m k d i r " $( p w d ) " '' ;
outputs = [ " o u t " " d o c " ] ;
outputs = [ " o u t " " d o c " " m a n " " d e v " ] ;
meta = {
meta = with stdenv . lib ; {
description = " A t y p e s e t t i n g s y s t e m " ;
longDescription = ''
SILE is a typesetting system ; its job is to produce beautiful
@ -77,6 +108,7 @@ stdenv.mkDerivation rec {
'' ;
homepage = " h t t p s : / / s i l e - t y p e s e t t e r . o r g / " ;
platforms = platforms . unix ;
maintainers = with maintainers ; [ doronbehar alerque ] ;
license = licenses . mit ;
} ;
}