git.iko.soy/typeable/nixpkgs
on master help sign in
pakcs: advance version 1.11.3 to 1.11.4, also fixing the build.
commit19cd862a6df19df6105e61bbc193caac0cf7f333 authorKarn Kallio <kkallio@skami.org> dateTue 6 Jan 2015, 04:24 (12 years ago) parent0eccb88
2 files changed+29−41
pkgs/development/compilers/pakcs/adjust-buildsystem.patch+11−11 pkgs/development/compilers/pakcs/default.nix+18−30
pkgs/development/compilers/pakcs/adjust-buildsystem.patch+11−11
@@ -1,15 +1,15 @@
1−diff -Naur pakcs-1.11.3-upstream/Makefile pakcs-1.11.3/Makefile
2−--- pakcs-1.11.3-upstream/Makefile 2014-01-31 09:10:03.000000000 -0430
3−+++ pakcs-1.11.3/Makefile 2014-02-03 20:27:41.558334480 -0430
4−@@ -66,7 +66,6 @@
5− #
6− .PHONY: install
7− install: installscripts
1+diff -Naur pakcs-1.11.4-upstream/Makefile pakcs-1.11.4/Makefile
2+--- pakcs-1.11.4-upstream/Makefile 2014-10-24 05:12:37.000000000 -0430
3++++ pakcs-1.11.4/Makefile 2015-01-05 16:26:39.256709080 -0430
4+@@ -94,7 +94,6 @@
5+ install: cleanoldinfos installscripts copylibs
6+ @echo "PAKCS installation configuration (file pakcsinitrc):"
7+ @cat pakcsinitrc
88- $(MAKE) frontend
99 # pre-compile all libraries:
1010 @cd lib && $(MAKE) fcy
1111 # install the Curry2Prolog compiler as a saved system:
12−@@ -105,10 +104,6 @@
12+@@ -145,10 +144,6 @@
1313 # compile the tools:
1414 .PHONY: tools
1515 tools:
@@ -20,9 +20,9 @@ diff -Naur pakcs-1.11.3-upstream/Makefile pakcs-1.11.3/Makefile
2020 @if [ -r bin/pakcs ] ; then cd currytools && $(MAKE) ; fi
2121 @if [ -r bin/pakcs ] ; then cd tools && $(MAKE) ; fi
2222
23−diff -Naur pakcs-1.11.3-upstream/scripts/pakcs.sh pakcs-1.11.3/scripts/pakcs.sh
24−--- pakcs-1.11.3-upstream/scripts/pakcs.sh 2014-01-31 09:04:19.000000000 -0430
25−+++ pakcs-1.11.3/scripts/pakcs.sh 2014-02-03 20:20:40.775350116 -0430
23+diff -Naur pakcs-1.11.4-upstream/scripts/pakcs.sh pakcs-1.11.4/scripts/pakcs.sh
24+--- pakcs-1.11.4-upstream/scripts/pakcs.sh 2014-10-24 05:06:07.000000000 -0430
25++++ pakcs-1.11.4/scripts/pakcs.sh 2015-01-05 16:26:15.697982791 -0430
2626@@ -16,7 +16,7 @@
2727 # use readline wrapper rlwrap if it is installed and we have tty as stdin:
2828 USERLWRAP=no
pkgs/development/compilers/pakcs/default.nix+18−30
@@ -1,12 +1,12 @@
11{ stdenv, fetchurl, cabal, swiProlog, either, mtl, syb
2−, glibcLocales, makeWrapper, rlwrap, tk }:
2+, glibcLocales, makeWrapper, rlwrap, tk, which }:
33
44let
5− fname = "pakcs-1.11.3";
5+ fname = "pakcs-1.11.4";
66
77 fsrc = fetchurl {
88 url = "http://www.informatik.uni-kiel.de/~pakcs/download/${fname}-src.tar.gz";
9− sha256 = "0f4rhaqss9vfinpdjchxq75g343hz322cv0admjnl4g5g568wk3x";
9+ sha256 = "1xsn8h58pi1jp8wr4abyrqdps840j8limyv5i812z49npf91fy5c";
1010 };
1111
1212in
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
3535
3636 src = fsrc;
3737
38− buildInputs = [ swiProlog makeWrapper glibcLocales rlwrap tk ];
38+ buildInputs = [ swiProlog makeWrapper glibcLocales rlwrap tk which ];
3939
4040 patches = [ ./adjust-buildsystem.patch ];
4141
@@ -48,48 +48,37 @@ stdenv.mkDerivation rec {
4848 sed -i 's@SWIPROLOG=@SWIPROLOG='${swiProlog}/bin/swipl'@' pakcsinitrc
4949 '';
5050
51− preBuild = ''
51+ buildPhase = ''
5252 # Some comments in files are in UTF-8, so include the locale needed by GHC runtime.
5353 export LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive
5454 export LC_ALL=en_US.UTF-8
5555
56− # Set up link to cymake, which has been built already.
57− mkdir -p bin/.local
58− ln -s ${curryFront}/bin/cymake bin/.local/
59− '';
56+ # PAKCS must be build in place due to embedded filesystem references placed by swi.
6057
61− installPhase = ''
6258 # Prepare PAKCSHOME directory.
63− mkdir -p $out/pakcs
64− for d in bin curry2prolog currytools lib tools cpns include www examples docs ; do
65− cp -r $d $out/pakcs ;
66− done
67− cp pakcsrc.default $out/pakcs
68− cp pakcsinitrc $out/pakcs
59+ mkdir -p $out/pakcs/bin
6960
70− # Fixing PAKCSHOME and related paths.
71− sed -i 's@PAKCSHOME=/tmp/.*@PAKCSHOME='$out/pakcs'@' $out/pakcs/bin/{pakcs,makecurrycgi,parsecurry,.makesavedstate}
61+ # Set up link to cymake, which has been built already.
62+ ln -s ${curryFront}/bin/cymake $out/pakcs/bin/
7263
73− # The Prolog sources must be rebuilt in their final directory,
74− # to switch the embedded references to the tmp build directory.
64+ # Prevent embedding the derivation build directory as temp.
7565 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)
8166
67+ # Copy to in place build location and run the build.
68+ cp -r * $out/pakcs
69+ (cd $out/pakcs ; make)
70+ '';
71+
72+ installPhase = ''
8273 # Install bin.
8374 mkdir -p $out/bin
84− for b in makecurrycgi .makesavedstate pakcs parsecurry cleancurry \
85− addtypes cass currybrowse currycreatemake currydoc currytest \
86− dataToXml erd2curry ; do
75+ for b in $(ls $out/pakcs/bin) ; do
8776 ln -s $out/pakcs/bin/$b $out/bin/ ;
8877 done
8978
9079 # Place emacs lisp files in expected locations.
9180 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
9382 cp $e $out/share/emacs/site-lisp/curry-pakcs/ ;
9483 done
9584
@@ -119,6 +108,5 @@ stdenv.mkDerivation rec {
119108 maintainers = [ stdenv.lib.maintainers.kkallio ];
120109 platforms = stdenv.lib.platforms.linux;
121110 hydraPlatforms = stdenv.lib.platforms.none;
122− broken = true;
123111 };
124112}