Skip to content

Commit

Permalink
sile: 0.10.4 -> 0.10.9 (#94168)
Browse files Browse the repository at this point in the history
* sile: reformatting, not changing drv at all

Put all inputs on separate lines and don't use `with stdenv.lib` for
large scopes.

* sile: 0.10.4 -> 0.10.9

Add poppler_utils as check dependency. Clean up some outdated comments
and hooks. Add more outputs for better closure size.

* maintainers: add alerque

* sile: add alerque as maintainer
  • Loading branch information
doronbehar committed Jul 29, 2020
1 parent e35ca52 commit 7e7bf5a
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 31 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,12 @@
githubId = 43479487;
name = "Titouan Biteau";
};
alerque = {
email = "caleb@alerque.com";
github = "alerque";
githubId = 173595;
name = "Caleb Maclennan";
};
alexarice = {
email = "alexrice999@hotmail.co.uk";
github = "alexarice";
Expand Down
94 changes: 63 additions & 31 deletions pkgs/tools/typesetting/sile/default.nix
Original file line number Diff line number Diff line change
@@ -1,49 +1,86 @@
{ 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 = "sile";
version = "0.10.4";
version = "0.10.9";

src = fetchurl {
url = "https://github.com/sile-typesetter/sile/releases/download/v${version}/${pname}-${version}.tar.bz2";
sha256 = "08j2vv6spnzz8bsh62wbdv1pjiziiba71cadscsy5hw6pklzndni";
url = "https://github.com/sile-typesetter/sile/releases/download/v${version}/${pname}-${version}.tar.xz";
sha256 = "0r55c1nz5bkgzfviw72lyh38nls9s49zi3pja7mld6q5dclazsj4";
};

configureFlags = [ "--with-system-luarocks" ];

nativeBuildInputs = [ autoconf automake pkgconfig makeWrapper ];
buildInputs = [ harfbuzz icu fontconfig libiconv luaEnv ]
++ optional stdenv.isDarwin darwin.apple_sdk.frameworks.AppKit
configureFlags = [
"--with-system-luarocks"
"--with-manual"
];

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 "-framework AppKit";
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-framework AppKit";

FONTCONFIG_FILE = makeFontsConf {
fontDirectories = [
gentium
];
};

# TODO: needs to tweak Makefile-fonts to avoid download fonts
doCheck = false; /*stdenv.targetPlatform == stdenv.hostPlatform
&& ! stdenv.isAarch64 # random seg. faults
&& ! stdenv.isDarwin; # dy lib not found
*/
doCheck = true;

enableParallelBuilding = true;

Expand All @@ -52,18 +89,12 @@ stdenv.mkDerivation rec {
--replace "ASSERT(ht && ht->table && iter);" "ASSERT(ht && iter);"
'';

checkTarget = "examples";

postInstall = ''
install -D -t $out/share/doc/sile documentation/sile.pdf
'';

# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';

outputs = [ "out" "doc" ];
outputs = [ "out" "doc" "man" "dev" ];

meta = {
meta = with stdenv.lib; {
description = "A typesetting system";
longDescription = ''
SILE is a typesetting system; its job is to produce beautiful
Expand All @@ -77,6 +108,7 @@ stdenv.mkDerivation rec {
'';
homepage = "https://sile-typesetter.org/";
platforms = platforms.unix;
maintainers = with maintainers; [ doronbehar alerque ];
license = licenses.mit;
};
}

0 comments on commit 7e7bf5a

Please sign in to comment.