@@ -1,12 +1,12 @@
1{ stdenv, fetchurl, cabal, swiProlog, either, mtl, syb
1{ stdenv, fetchurl, cabal, swiProlog, either, mtl, syb
2−, glibcLocales, makeWrapper, rlwrap, tk }:
2+, glibcLocales, makeWrapper, rlwrap, tk, which }:
5− fname = "pakcs-1.11.3";
5+ fname = "pakcs-1.11.4";
7 fsrc = fetchurl {
7 fsrc = fetchurl {
8 url = "http://www.informatik.uni-kiel.de/~pakcs/download/${fname}-src.tar.gz";
8 url = "http://www.informatik.uni-kiel.de/~pakcs/download/${fname}-src.tar.gz";
9− sha256 = "0f4rhaqss9vfinpdjchxq75g343hz322cv0admjnl4g5g568wk3x";
9+ sha256 = "1xsn8h58pi1jp8wr4abyrqdps840j8limyv5i812z49npf91fy5c";
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
36 src = fsrc;
36 src = fsrc;
38− buildInputs = [ swiProlog makeWrapper glibcLocales rlwrap tk ];
38+ buildInputs = [ swiProlog makeWrapper glibcLocales rlwrap tk which ];
40 patches = [ ./adjust-buildsystem.patch ];
40 patches = [ ./adjust-buildsystem.patch ];
@@ -48,48 +48,37 @@ stdenv.mkDerivation rec {
48 sed -i 's@SWIPROLOG=@SWIPROLOG='${swiProlog}/bin/swipl'@' pakcsinitrc
48 sed -i 's@SWIPROLOG=@SWIPROLOG='${swiProlog}/bin/swipl'@' pakcsinitrc
51− preBuild = ''
51+ buildPhase = ''
52 # Some comments in files are in UTF-8, so include the locale needed by GHC runtime.
52 # Some comments in files are in UTF-8, so include the locale needed by GHC runtime.
53 export LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive
53 export LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive
54 export LC_ALL=en_US.UTF-8
54 export LC_ALL=en_US.UTF-8
56− # Set up link to cymake, which has been built already.
56+ # PAKCS must be build in place due to embedded filesystem references placed by swi.
58− ln -s ${curryFront}/bin/cymake bin/.local/
62 # Prepare PAKCSHOME directory.
58 # Prepare PAKCSHOME directory.
63− mkdir -p $out/pakcs
59+ mkdir -p $out/pakcs/bin
64− for d in bin curry2prolog currytools lib tools cpns include www examples docs ; do
65− cp -r $d $out/pakcs ;
67− cp pakcsrc.default $out/pakcs
68− cp pakcsinitrc $out/pakcs
70− # Fixing PAKCSHOME and related paths.
61+ # Set up link to cymake, which has been built already.
71− sed -i 's@PAKCSHOME=/tmp/.*@PAKCSHOME='$out/pakcs'@' $out/pakcs/bin/{pakcs,makecurrycgi,parsecurry,.makesavedstate}
62+ ln -s ${curryFront}/bin/cymake $out/pakcs/bin/
73− # The Prolog sources must be rebuilt in their final directory,
64+ # Prevent embedding the derivation build directory as temp.
74− # to switch the embedded references to the tmp build directory.
75 export TEMP=/tmp
65 export TEMP=/tmp
76− (cd $out/pakcs/curry2prolog/ ; rm c2p.state ; make)
77− cp Makefile $out/pakcs
78− (cd $out/pakcs ; make tools)
79− (cd $out/pakcs/cpns ; make)
80− (cd $out/pakcs/www ; make)
67+ # Copy to in place build location and run the build.
69+ (cd $out/pakcs ; make)
82 # Install bin.
73 # Install bin.
83 mkdir -p $out/bin
74 mkdir -p $out/bin
84− for b in makecurrycgi .makesavedstate pakcs parsecurry cleancurry \
75+ for b in $(ls $out/pakcs/bin) ; do
85− addtypes cass currybrowse currycreatemake currydoc currytest \
86− dataToXml erd2curry ; do
87 ln -s $out/pakcs/bin/$b $out/bin/ ;
76 ln -s $out/pakcs/bin/$b $out/bin/ ;
90 # Place emacs lisp files in expected locations.
79 # Place emacs lisp files in expected locations.
91 mkdir -p $out/share/emacs/site-lisp/curry-pakcs
80 mkdir -p $out/share/emacs/site-lisp/curry-pakcs
92− for e in "tools/emacs/"*.el ; do
81+ for e in "$out/tools/emacs/"*.el ; do
93 cp $e $out/share/emacs/site-lisp/curry-pakcs/ ;
82 cp $e $out/share/emacs/site-lisp/curry-pakcs/ ;
@@ -119,6 +108,5 @@ stdenv.mkDerivation rec {
119 maintainers = [ stdenv.lib.maintainers.kkallio ];
108 maintainers = [ stdenv.lib.maintainers.kkallio ];
120 platforms = stdenv.lib.platforms.linux;
109 platforms = stdenv.lib.platforms.linux;
121 hydraPlatforms = stdenv.lib.platforms.none;
110 hydraPlatforms = stdenv.lib.platforms.none;