2014-06-26 23:53:50 +01:00
|
|
|
{ stdenv, fetchurl, cpio, rsync, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "smlnj-bootstrap-${version}";
|
|
|
|
|
2016-09-09 04:12:22 +01:00
|
|
|
version = "110.80";
|
2014-06-26 23:53:50 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://smlnj.cs.uchicago.edu/dist/working/${version}/smlnj-x86-${version}.pkg";
|
2016-09-09 04:12:22 +01:00
|
|
|
sha256 = "1709xpgmxa6v73h77y7vn9wf5vlfdk75p61w28nzgfdsdc8f8l65";
|
2014-06-26 23:53:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ cpio rsync makeWrapper ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
/usr/bin/xar -xf $src
|
|
|
|
cd smlnj.pkg
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cat Payload | gunzip -dc | cpio -i
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-07-22 10:01:32 +01:00
|
|
|
mkdir -p $out/bin
|
2014-06-26 23:53:50 +01:00
|
|
|
rsync -av bin/ $out/bin/
|
|
|
|
|
2014-07-22 10:01:32 +01:00
|
|
|
mkdir -p $out/lib
|
2014-06-26 23:53:50 +01:00
|
|
|
rsync -av lib/ $out/lib/
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/sml" --set "SMLNJ_HOME" "$out"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Compiler for the Standard ML '97 programming language";
|
|
|
|
homepage = http://www.smlnj.org;
|
|
|
|
license = stdenv.lib.licenses.free;
|
|
|
|
platforms = stdenv.lib.platforms.darwin;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.jwiegley ];
|
|
|
|
};
|
|
|
|
}
|