aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/tools/typesetting/sile/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/typesetting/sile/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/typesetting/sile/default.nix95
1 files changed, 64 insertions, 31 deletions
diff --git a/nixpkgs/pkgs/tools/typesetting/sile/default.nix b/nixpkgs/pkgs/tools/typesetting/sile/default.nix
index a8969fd4598..d61e97857c5 100644
--- a/nixpkgs/pkgs/tools/typesetting/sile/default.nix
+++ b/nixpkgs/pkgs/tools/typesetting/sile/default.nix
@@ -1,37 +1,79 @@
-{ 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
+ penlight
+ stdlib
+ vstruct
+ ]);
in
stdenv.mkDerivation rec {
pname = "sile";
- version = "0.10.4";
+ version = "0.10.10";
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 = "0m7yyvw8ypz89rfx8nm70mf87l357w5qac73pmfgl84f24cbxh7g";
};
- 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 = [
@@ -39,11 +81,7 @@ stdenv.mkDerivation rec {
];
};
- # 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;
@@ -52,18 +90,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
@@ -77,6 +109,7 @@ stdenv.mkDerivation rec {
'';
homepage = "https://sile-typesetter.org/";
platforms = platforms.unix;
+ maintainers = with maintainers; [ doronbehar alerque ];
license = licenses.mit;
};
}