about summary refs log tree commit diff
path: root/pkgs/tools/typesetting
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-02-11 00:02:00 -0500
committerCaleb Maclennan <caleb@alerque.com>2020-02-11 16:18:20 +0300
commit984256e05c9c1ede509f85753e1397aaa58fd8c7 (patch)
tree4f05a65aba955d025b6db955ba112aa28efea5a6 /pkgs/tools/typesetting
parent928e6486aab41815aa03cf78574beea383ceb951 (diff)
downloadnixlib-984256e05c9c1ede509f85753e1397aaa58fd8c7.tar
nixlib-984256e05c9c1ede509f85753e1397aaa58fd8c7.tar.gz
nixlib-984256e05c9c1ede509f85753e1397aaa58fd8c7.tar.bz2
nixlib-984256e05c9c1ede509f85753e1397aaa58fd8c7.tar.lz
nixlib-984256e05c9c1ede509f85753e1397aaa58fd8c7.tar.xz
nixlib-984256e05c9c1ede509f85753e1397aaa58fd8c7.tar.zst
nixlib-984256e05c9c1ede509f85753e1397aaa58fd8c7.zip
sile: fix build
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r--pkgs/tools/typesetting/sile/default.nix22
1 files changed, 14 insertions, 8 deletions
diff --git a/pkgs/tools/typesetting/sile/default.nix b/pkgs/tools/typesetting/sile/default.nix
index de82656dc303..5bb4c5b7fb2f 100644
--- a/pkgs/tools/typesetting/sile/default.nix
+++ b/pkgs/tools/typesetting/sile/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, darwin, fetchurl, makeWrapper, pkgconfig
+{ stdenv, darwin, fetchurl, makeWrapper, pkgconfig, autoconf, automake
 , harfbuzz, icu
 , fontconfig, lua, libiconv
 , makeFontsConf, gentium
@@ -7,7 +7,7 @@
 with stdenv.lib;
 
 let
-  luaEnv = lua.withPackages(ps: with ps;[cassowary cosmo 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
 
@@ -20,7 +20,9 @@ stdenv.mkDerivation rec {
     sha256 = "d89d5ce7d2bf46fb062e5299ffd8b5d821dc3cb3462a0e7c1109edeee111d856";
   };
 
-  nativeBuildInputs = [pkgconfig makeWrapper];
+  configureFlags = [ "--with-system-luarocks" ];
+
+  nativeBuildInputs = [ autoconf automake pkgconfig makeWrapper ];
   buildInputs = [ harfbuzz icu fontconfig libiconv luaEnv ]
   ++ optional stdenv.isDarwin darwin.apple_sdk.frameworks.AppKit
   ;
@@ -37,19 +39,23 @@ stdenv.mkDerivation rec {
     ];
   };
 
-  doCheck = stdenv.targetPlatform == stdenv.hostPlatform
+  # 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
+ */
 
   enableParallelBuilding = true;
 
-  checkPhase = ''
-    make examples
+  preBuild = stdenv.lib.optionalString stdenv.cc.isClang ''
+    substituteInPlace libtexpdf/dpxutil.c \
+      --replace "ASSERT(ht && ht->table && iter);" "ASSERT(ht && iter);"
   '';
 
+  checkTarget = "examples";
+
   postInstall = ''
     install -D -t $out/share/doc/sile documentation/sile.pdf
-    install -D -t $out/share/doc/sile examples
   '';
 
   # Hack to avoid TMPDIR in RPATHs.
@@ -69,7 +75,7 @@ stdenv.mkDerivation rec {
       technologies and borrowing some ideas from graphical systems
       such as InDesign.
     '';
-    homepage = http://www.sile-typesetter.org;
+    homepage = "https://sile-typesetter.org/";
     platforms = platforms.unix;
     license = licenses.mit;
   };