From eaf74a6b7749252da79b03e72160d0cd0ae02d8c Mon Sep 17 00:00:00 2001 From: Chris Double Date: Tue, 18 Nov 2014 00:57:44 +1300 Subject: [PATCH] Update aliceml to use git version of Alice ML This allows 64 bit builds of Alice ML and removes the need for old versions of gcc to build. The license is changed to 'mit' from the 'bsd' that it was previously as the COPYING files in the alice and seam repositories appear to be the modern style MIT variant (also known as the ICU variant). Added myself as the maintainer. --- pkgs/development/compilers/aliceml/builder.sh | 71 ---------------- .../development/compilers/aliceml/default.nix | 85 +++++++------------ pkgs/development/compilers/aliceml/make.patch | 20 +++++ pkgs/development/compilers/aliceml/seam.patch | 13 +++ 4 files changed, 66 insertions(+), 123 deletions(-) delete mode 100644 pkgs/development/compilers/aliceml/builder.sh create mode 100644 pkgs/development/compilers/aliceml/make.patch create mode 100644 pkgs/development/compilers/aliceml/seam.patch diff --git a/pkgs/development/compilers/aliceml/builder.sh b/pkgs/development/compilers/aliceml/builder.sh deleted file mode 100644 index e1f5d1b2bed7..000000000000 --- a/pkgs/development/compilers/aliceml/builder.sh +++ /dev/null @@ -1,71 +0,0 @@ -source $stdenv/setup - -export CXXFLAGS="-m32" - -tar zxvf "$gecodeSrc" -cd gecode-1.3.1 -./configure --prefix="$out" --disable-minimodel --disable-examples -make -make install -cd .. - -PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$out"/lib/pkgconfig - -tar zxvf "$seamSrc" -cd seam-1.4 -./configure --prefix="$out" --with-zlib=$zlib -make -make install -cd .. - -PATH=$PATH:"$out"/bin - -tar zxvf "$aliceSrc" -cd alice-1.4 -sed -i -e 's/bin\/bash/usr\/bin\/env bash/g' bin/alicerun.in -sed -i -e 's/bin\/bash/usr\/bin\/env bash/g' bin/aliceremote -./configure --prefix="$out" --with-gmp=$gmp -make -make install -cd .. - -tar zxvf "$aliceGecodeSrc" -cd alice-gecode-1.4 -make compiledll MUST_GENERATE=no -make installdll MUST_GENERATE=no -cd .. - -tar zxvf "$aliceRegexSrc" -cd alice-regex-1.4 -make compiledll MUST_GENERATE=no -make installdll MUST_GENERATE=no -cd .. - -tar zxvf "$aliceSqliteSrc" -cd alice-sqlite-1.4 -make compiledll MUST_GENERATE=no -make installdll MUST_GENERATE=no -cd .. - -tar zxvf "$aliceXmlSrc" -cd alice-xml-1.4 -make compiledll MUST_GENERATE=no -make installdll MUST_GENERATE=no -cd .. - -tar zxvf "$aliceGtkSrc" -cd alice-gtk-1.4 -sed -i -e 's/PRIVATE_GTK_LEAVE_PENDING/PRIVATE_GTK_HAS_POINTER/g' NativeGtk.cc -sed -i -e 's/bin\/bash/usr\/bin\/env bash/g' myinstall -make compiledll MUST_GENERATE=no -make installdll MUST_GENERATE=no -cd .. - -tar zxvf "$aliceRuntimeSrc" -cd alice-runtime-1.4 -./configure --prefix="$out" -make -make install -cd .. - - diff --git a/pkgs/development/compilers/aliceml/default.nix b/pkgs/development/compilers/aliceml/default.nix index 29e95863921c..5059cdf21587 100644 --- a/pkgs/development/compilers/aliceml/default.nix +++ b/pkgs/development/compilers/aliceml/default.nix @@ -1,46 +1,13 @@ -{stdenv, fetchurl, pkgsi686Linux, libtool, gnumake381, autoconf, automake111x, file, which, zsh, m4, pkgconfig, perl}: +{stdenv, gcc, glibc, fetchurl, fetchgit, libtool, autoconf, automake, file, gnumake, which, zsh, m4, pkgconfig, perl, gnome, pango, sqlite, libxml2, zlib, gmp, smlnj }: stdenv.mkDerivation { - name = "aliceml-1.4"; + name = "aliceml-1.4-493cd356"; - aliceSrc = fetchurl { - url = http://www.ps.uni-saarland.de/alice/download/sources/alice-1.4.tar.gz; - sha256 = "1ay8r26g7xm9zlrlpigp6y1zmrl93hzkndb5phx7651wx8j2183r"; - }; - - aliceGecodeSrc = fetchurl { - url = http://www.ps.uni-saarland.de/alice/download/sources/alice-gecode-1.4.tar.gz; - sha256 = "0yklpsqnm3wwzfz4vvv69dmm7q7pzpl3z7iw7wg33klng85cidl6"; - }; - - aliceGtkSrc = fetchurl { - url = http://www.ps.uni-saarland.de/alice/download/sources/alice-gtk-1.4.tar.gz; - sha256 = "0zx4ks0pk5wgbcsflcmn0kbpa9j7pjbsc19d1s3jgp4rwb24m1an"; - }; - - aliceRegexSrc = fetchurl { - url = http://www.ps.uni-saarland.de/alice/download/sources/alice-regex-1.4.tar.gz; - sha256 = "0myjzh3295awamghs4c88ypaa41m8sxh5jys876yq6flslw41s02"; - }; - - aliceRuntimeSrc = fetchurl { - url = http://www.ps.uni-saarland.de/alice/download/sources/alice-runtime-1.4.tar.gz; - sha256 = "1cbca71vh16l2h0zjvhgzzs0rzq99nc8nx9a97yzw595355nq57f"; - }; - - aliceSqliteSrc = fetchurl { - url = http://www.ps.uni-saarland.de/alice/download/sources/alice-sqlite-1.4.tar.gz; - sha256 = "0554xbx8zgqmpb7x06d7xvhlbk7bxmc237khgjs6yjcy53yf366b"; - }; - - aliceXmlSrc = fetchurl { - url = http://www.ps.uni-saarland.de/alice/download/sources/alice-xml-1.4.tar.gz; - sha256 = "058a815a0vajjvjlsmd4ryx2bc71q6zwvyjg2c0v1gba2v3pddm0"; - }; - - seamSrc = fetchurl { - url = http://www.ps.uni-saarland.de/alice/download/sources/seam-1.4.tar.gz; - sha256 = "1iz98jdv914whaw426d5406shlqgxqwpy3fbyb472x7d3lfra2dz"; + src = fetchgit { + url = "https://github.com/aliceml/aliceml"; + rev = "493cd3565f0bc3b35790185ec358fb91b7b43037"; + sha256 = "12fbaf0a474e53f40a71f16bf61c52b7ffe044f4d0993e208e69552df3054d45"; + fetchSubmodules = true; }; gecodeSrc = fetchurl { @@ -48,19 +15,32 @@ stdenv.mkDerivation { sha256 = "0mgc6llbq166jmlq3alvagqsg3730670zvbwwkdgsqklw70v9355"; }; - zlib = pkgsi686Linux.zlib; - gmp = pkgsi686Linux.gmp; - - buildInputs = [ - stdenv pkgsi686Linux.gcc34 pkgsi686Linux.glibc - libtool gnumake381 autoconf automake111x pkgsi686Linux.zlib - file which zsh pkgsi686Linux.gmp m4 pkgsi686Linux.gnome.gtk - pkgsi686Linux.gnome.libgnomecanvas pkgsi686Linux.pango pkgsi686Linux.sqlite - pkgsi686Linux.libxml2 pkgsi686Linux.lightning pkgconfig perl + stdenv gcc glibc + libtool gnumake autoconf automake + file which zsh m4 gnome.gtk zlib gmp + gnome.libgnomecanvas pango sqlite + libxml2 pkgconfig perl smlnj ]; - - builder = ./builder.sh; + + makePatch = ./make.patch; + seamPatch = ./seam.patch; + + phases = [ "unpackPhase" "patchPhase" "configurePhase" "buildPhase" ]; + + patchPhase = '' + sed -i -e "s@wget ..GECODE_URL. -O - | tar xz@tar xf $gecodeSrc@" make/Makefile + patch -p1 <$makePatch + patch -p1 <$seamPatch + ''; + + configurePhase = '' + make -C make setup PREFIX="$out" + ''; + + buildPhase = '' + gmp="${gmp}" zlib="${zlib}" PATH=$PATH:`pwd`/seam-support/install/bin make -C make all PREFIX="$out" + ''; meta = { description = "Functional programming language based on Standard ML"; @@ -70,6 +50,7 @@ stdenv.mkDerivation { programming. ''; homepage = http://www.ps.uni-saarland.de/alice/; - license = "BSD"; + license = stdenv.lib.licenses.mit; + maintainers = [ stdenv.lib.maintainers.doublec ]; }; } diff --git a/pkgs/development/compilers/aliceml/make.patch b/pkgs/development/compilers/aliceml/make.patch new file mode 100644 index 000000000000..78e2b28974e8 --- /dev/null +++ b/pkgs/development/compilers/aliceml/make.patch @@ -0,0 +1,20 @@ +diff --git a/Makefile b/Makefile +index 6a55b06..84a6000 100644 +--- a/make/Makefile ++++ b/make/Makefile +@@ -387,6 +387,7 @@ configure-seam-linux64: + ../sources/configure \ + --prefix='$(PREFIX)' \ + --with-warnings=yes \ ++ --with-zlib='$(zlib)' \ + --disable-lightning) + + .PHONY: configure-seam-darwin64 +@@ -434,6 +435,7 @@ configure-alice-ll-linux: + (cd $(PWD)/alice/build && \ + ../sources/vm-seam/configure \ + --prefix='$(PREFIX)' \ ++ --with-gmp='$(gmp)' \ + --with-warnings=yes) + + .PHONY: rebuild-alice-ll diff --git a/pkgs/development/compilers/aliceml/seam.patch b/pkgs/development/compilers/aliceml/seam.patch new file mode 100644 index 000000000000..d489037fef4a --- /dev/null +++ b/pkgs/development/compilers/aliceml/seam.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.cvs b/Makefile.cvs +index b59434a..cd1316f 100644 +--- a/seam/sources/Makefile.cvs ++++ b/seam/sources/Makefile.cvs +@@ -32,7 +32,7 @@ autotools: + aclocal -I . + autoconf + automake --add-missing +- cd libltdl; aclocal; autoconf; automake --add-missing ++ cd libltdl; chmod +w *; aclocal; autoconf; automake --add-missing + + lightning: + rm -rf lightning