> Dear All,
> 
> Can someone checkin the attached? It is for
> 
> applications/science/logic/hol
> 
> It bumps the version to k.8
> 
> I couldn't get the dot documentation generation step to work. It
> doesn't really matter much, but if someone could look at this I would
> be grateful. At the end of the build log it says:
> 
> --
> 
> Writing HOLPage
> *** Can't see dot executable at dot; not generating theory-graph
> Hol built successfully.
> 
> --
> 
> Thanks

Hello Tom,

The attached patch gets rid of the Can't see dot executable at dot warning.  I 
do not know if it 
generates the documentation correctly though.

The substitution of /usr/bin/dot for dot was not working because 
OS.FileSys.access does not use 
the PATH environment variable to look up files.

The addition of fontconfig was to remove a missing font error that occurred 
after fixing the dot 
path lookup.

Saludos,
Karn

diff --git a/pkgs/applications/science/logic/hol/default.nix b/pkgs/applications/science/logic/hol/default.nix
index 5abee67..2e1647b 100644
--- a/pkgs/applications/science/logic/hol/default.nix
+++ b/pkgs/applications/science/logic/hol/default.nix
@@ -1,4 +1,5 @@
-{stdenv, fetchurl, polyml, graphviz, experimentalKernel ? true}:
+{stdenv, fetchurl, polyml, graphviz, fontconfig, liberation_ttf,
+ experimentalKernel ? true}:
 
 let
   pname = "hol4";
@@ -15,9 +16,18 @@ stdenv.mkDerivation {
     sha256 = "5ce4c1e37301dbc38772694e98f1c7eabf69255908de204b280d8b2b1709e9d0";
   };
 
-  buildInputs = [polyml graphviz];
+  buildInputs = [polyml graphviz fontconfig liberation_ttf];
 
   buildCommand = ''
+
+    mkdir chroot-fontconfig
+    cat ${fontconfig}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf
+    sed -e 's@</fontconfig>@@' -i chroot-fontconfig/fonts.conf
+    echo "<dir>${liberation_ttf}</dir>" >> chroot-fontconfig/fonts.conf
+    echo "</fontconfig>" >> chroot-fontconfig/fonts.conf
+
+    export FONTCONFIG_FILE=$(pwd)/chroot-fontconfig/fonts.conf
+
     mkdir -p "$out/src"
     cd  "$out/src"
 
@@ -28,7 +38,10 @@ stdenv.mkDerivation {
       --replace "\"/bin/mv\"" "\"mv\"" \
       --replace "\"/bin/cp\"" "\"cp\""
 
-    substituteInPlace tools/buildutils.sml --replace "\"/usr/bin/dot\"" "\"dot\""
+    for f in tools/buildutils.sml help/src-sml/DOT;
+    do
+      substituteInPlace $f --replace "\"/usr/bin/dot\"" "\"${graphviz}/bin/dot\""
+    done
 
     #sed -ie "/compute/,999 d" tools/build-sequence # for testing
 
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to