The attached patch advances the version of the pakcs (Portland Aachen Kiel
Curry System compiler) from 1.11.3 to 1.11.4. It also fixes the broken build
of the expression for the older version.
>From a8eaa6edcdcb0ca4329a6eb433ad729e7e2c1931 Mon Sep 17 00:00:00 2001
From: Karn Kallio <[email protected]>
Date: Tue, 6 Jan 2015 04:24:11 -0430
Subject: [PATCH] pakcs: advance version 1.11.3 to 1.11.4, also fixing the
build.
---
.../compilers/pakcs/adjust-buildsystem.patch | 22 +++++-----
pkgs/development/compilers/pakcs/default.nix | 48 ++++++++--------------
2 files changed, 29 insertions(+), 41 deletions(-)
diff --git a/pkgs/development/compilers/pakcs/adjust-buildsystem.patch b/pkgs/development/compilers/pakcs/adjust-buildsystem.patch
index 830fc3f..ce0b42c 100644
--- a/pkgs/development/compilers/pakcs/adjust-buildsystem.patch
+++ b/pkgs/development/compilers/pakcs/adjust-buildsystem.patch
@@ -1,15 +1,15 @@
-diff -Naur pakcs-1.11.3-upstream/Makefile pakcs-1.11.3/Makefile
---- pakcs-1.11.3-upstream/Makefile 2014-01-31 09:10:03.000000000 -0430
-+++ pakcs-1.11.3/Makefile 2014-02-03 20:27:41.558334480 -0430
-@@ -66,7 +66,6 @@
- #
- .PHONY: install
- install: installscripts
+diff -Naur pakcs-1.11.4-upstream/Makefile pakcs-1.11.4/Makefile
+--- pakcs-1.11.4-upstream/Makefile 2014-10-24 05:12:37.000000000 -0430
++++ pakcs-1.11.4/Makefile 2015-01-05 16:26:39.256709080 -0430
+@@ -94,7 +94,6 @@
+ install: cleanoldinfos installscripts copylibs
+ @echo "PAKCS installation configuration (file pakcsinitrc):"
+ @cat pakcsinitrc
- $(MAKE) frontend
# pre-compile all libraries:
@cd lib && $(MAKE) fcy
# install the Curry2Prolog compiler as a saved system:
-@@ -105,10 +104,6 @@
+@@ -145,10 +144,6 @@
# compile the tools:
.PHONY: tools
tools:
@@ -20,9 +20,9 @@ diff -Naur pakcs-1.11.3-upstream/Makefile pakcs-1.11.3/Makefile
@if [ -r bin/pakcs ] ; then cd currytools && $(MAKE) ; fi
@if [ -r bin/pakcs ] ; then cd tools && $(MAKE) ; fi
-diff -Naur pakcs-1.11.3-upstream/scripts/pakcs.sh pakcs-1.11.3/scripts/pakcs.sh
---- pakcs-1.11.3-upstream/scripts/pakcs.sh 2014-01-31 09:04:19.000000000 -0430
-+++ pakcs-1.11.3/scripts/pakcs.sh 2014-02-03 20:20:40.775350116 -0430
+diff -Naur pakcs-1.11.4-upstream/scripts/pakcs.sh pakcs-1.11.4/scripts/pakcs.sh
+--- pakcs-1.11.4-upstream/scripts/pakcs.sh 2014-10-24 05:06:07.000000000 -0430
++++ pakcs-1.11.4/scripts/pakcs.sh 2015-01-05 16:26:15.697982791 -0430
@@ -16,7 +16,7 @@
# use readline wrapper rlwrap if it is installed and we have tty as stdin:
USERLWRAP=no
diff --git a/pkgs/development/compilers/pakcs/default.nix b/pkgs/development/compilers/pakcs/default.nix
index f7c76d7..433301e 100644
--- a/pkgs/development/compilers/pakcs/default.nix
+++ b/pkgs/development/compilers/pakcs/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, cabal, swiProlog, either, mtl, syb
-, glibcLocales, makeWrapper, rlwrap, tk }:
+, glibcLocales, makeWrapper, rlwrap, tk, which }:
let
- fname = "pakcs-1.11.3";
+ fname = "pakcs-1.11.4";
fsrc = fetchurl {
url = "http://www.informatik.uni-kiel.de/~pakcs/download/${fname}-src.tar.gz";
- sha256 = "0f4rhaqss9vfinpdjchxq75g343hz322cv0admjnl4g5g568wk3x";
+ sha256 = "1xsn8h58pi1jp8wr4abyrqdps840j8limyv5i812z49npf91fy5c";
};
in
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
src = fsrc;
- buildInputs = [ swiProlog makeWrapper glibcLocales rlwrap tk ];
+ buildInputs = [ swiProlog makeWrapper glibcLocales rlwrap tk which ];
patches = [ ./adjust-buildsystem.patch ];
@@ -48,48 +48,37 @@ stdenv.mkDerivation rec {
sed -i 's@SWIPROLOG=@SWIPROLOG='${swiProlog}/bin/swipl'@' pakcsinitrc
'';
- preBuild = ''
+ buildPhase = ''
# 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.
- mkdir -p bin/.local
- ln -s ${curryFront}/bin/cymake bin/.local/
- '';
+ # PAKCS must be build in place due to embedded filesystem references placed by swi.
- installPhase = ''
# Prepare PAKCSHOME directory.
- mkdir -p $out/pakcs
- for d in bin curry2prolog currytools lib tools cpns include www examples docs ; do
- cp -r $d $out/pakcs ;
- done
- cp pakcsrc.default $out/pakcs
- cp pakcsinitrc $out/pakcs
+ mkdir -p $out/pakcs/bin
- # Fixing PAKCSHOME and related paths.
- sed -i 's@PAKCSHOME=/tmp/.*@PAKCSHOME='$out/pakcs'@' $out/pakcs/bin/{pakcs,makecurrycgi,parsecurry,.makesavedstate}
+ # Set up link to cymake, which has been built already.
+ ln -s ${curryFront}/bin/cymake $out/pakcs/bin/
- # The Prolog sources must be rebuilt in their final directory,
- # to switch the embedded references to the tmp build directory.
+ # Prevent embedding the derivation build directory as temp.
export TEMP=/tmp
- (cd $out/pakcs/curry2prolog/ ; rm c2p.state ; make)
- cp Makefile $out/pakcs
- (cd $out/pakcs ; make tools)
- (cd $out/pakcs/cpns ; make)
- (cd $out/pakcs/www ; make)
+ # Copy to in place build location and run the build.
+ cp -r * $out/pakcs
+ (cd $out/pakcs ; make)
+ '';
+
+ installPhase = ''
# Install bin.
mkdir -p $out/bin
- for b in makecurrycgi .makesavedstate pakcs parsecurry cleancurry \
- addtypes cass currybrowse currycreatemake currydoc currytest \
- dataToXml erd2curry ; do
+ for b in $(ls $out/pakcs/bin) ; do
ln -s $out/pakcs/bin/$b $out/bin/ ;
done
# Place emacs lisp files in expected locations.
mkdir -p $out/share/emacs/site-lisp/curry-pakcs
- for e in "tools/emacs/"*.el ; do
+ for e in "$out/tools/emacs/"*.el ; do
cp $e $out/share/emacs/site-lisp/curry-pakcs/ ;
done
@@ -119,6 +108,5 @@ stdenv.mkDerivation rec {
maintainers = [ stdenv.lib.maintainers.kkallio ];
platforms = stdenv.lib.platforms.linux;
hydraPlatforms = stdenv.lib.platforms.none;
- broken = true;
};
}
--
2.1.4
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev