about summary refs log tree commit diff
path: root/pkgs/development/compilers/pakcs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/pakcs/default.nix')
-rw-r--r--pkgs/development/compilers/pakcs/default.nix29
1 files changed, 16 insertions, 13 deletions
diff --git a/pkgs/development/compilers/pakcs/default.nix b/pkgs/development/compilers/pakcs/default.nix
index bb4657d8afff..f7c76d74aaeb 100644
--- a/pkgs/development/compilers/pakcs/default.nix
+++ b/pkgs/development/compilers/pakcs/default.nix
@@ -1,11 +1,12 @@
-{ stdenv, fetchurl, cabal, swiProlog, mtl, syb, makeWrapper, rlwrap, tk }:
+{ stdenv, fetchurl, cabal, swiProlog, either, mtl, syb
+, glibcLocales, makeWrapper, rlwrap, tk }:
 
 let
-  fname = "pakcs-1.11.2";
+  fname = "pakcs-1.11.3";
 
   fsrc = fetchurl {
     url = "http://www.informatik.uni-kiel.de/~pakcs/download/${fname}-src.tar.gz";
-    sha256 = "1x23kn91v44my4rd8j3247pj8i2myz82rzgbq07asi1x21bpvvmy";
+    sha256 = "0f4rhaqss9vfinpdjchxq75g343hz322cv0admjnl4g5g568wk3x";
   };
 
 in
@@ -29,12 +30,12 @@ stdenv.mkDerivation rec {
     sourceRoot = "${name}/frontend/curry-frontend";
     isLibrary = true;
     isExecutable = true;
-    buildDepends = [ mtl syb curryBase ];
+    buildDepends = [ either mtl syb curryBase ];
   });
 
   src = fsrc;
 
-  buildInputs = [ swiProlog makeWrapper rlwrap tk ];
+  buildInputs = [ swiProlog makeWrapper glibcLocales rlwrap tk ];
 
   patches = [ ./adjust-buildsystem.patch ];
 
@@ -48,14 +49,18 @@ stdenv.mkDerivation rec {
   '';
 
   preBuild = ''
+    # Some comments in files are in UTF-8, so include the locale needed by GHC runtime.
+    export LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive
+    export LC_ALL=en_US.UTF-8
+
     # Set up link to cymake, which has been built already.
-    ensureDir bin/.local
+    mkdir -p bin/.local
     ln -s ${curryFront}/bin/cymake bin/.local/
   '';
 
   installPhase = ''
     # Prepare PAKCSHOME directory.
-    ensureDir $out/pakcs
+    mkdir -p $out/pakcs
     for d in bin curry2prolog currytools lib tools cpns include www examples docs ; do
       cp -r $d $out/pakcs ;
     done
@@ -65,10 +70,6 @@ stdenv.mkDerivation rec {
     # Fixing PAKCSHOME and related paths.
     sed -i 's@PAKCSHOME=/tmp/.*@PAKCSHOME='$out/pakcs'@' $out/pakcs/bin/{pakcs,makecurrycgi,parsecurry,.makesavedstate}
 
-    # Fix symbolic links into the tmp build dir.
-    ln -s ../currytools/CASS/cass $out/pakcs/bin/cass
-    ln -s ../currytools/currydoc/CurryDoc $out/pakcs/bin/currydoc
-
     # The Prolog sources must be rebuilt in their final directory,
     # to switch the embedded references to the tmp build directory.
     export TEMP=/tmp
@@ -79,7 +80,7 @@ stdenv.mkDerivation rec {
     (cd $out/pakcs/www ; make)
 
     # Install bin.
-    ensureDir $out/bin
+    mkdir -p $out/bin
     for b in makecurrycgi .makesavedstate pakcs parsecurry cleancurry \
              addtypes cass currybrowse currycreatemake currydoc currytest \
              dataToXml erd2curry ; do
@@ -87,7 +88,7 @@ stdenv.mkDerivation rec {
     done
 
     # Place emacs lisp files in expected locations.
-    ensureDir $out/share/emacs/site-lisp/curry-pakcs
+    mkdir -p $out/share/emacs/site-lisp/curry-pakcs
     for e in "tools/emacs/"*.el ; do
       cp $e $out/share/emacs/site-lisp/curry-pakcs/ ;
     done
@@ -117,5 +118,7 @@ stdenv.mkDerivation rec {
 
     maintainers = [ stdenv.lib.maintainers.kkallio ];
     platforms = stdenv.lib.platforms.linux;
+    hydraPlatforms = stdenv.lib.platforms.none;
+    broken = true;
   };
 }