2021-01-22 11:25:31 +00:00
|
|
|
{ lib, stdenv, fetchurl, cpio, rsync, xar, makeWrapper }:
|
2014-06-26 22:53:50 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "smlnj-bootstrap";
|
2014-06-26 22:53:50 +00:00
|
|
|
|
2019-03-19 20:32:01 +00:00
|
|
|
version = "110.91";
|
2014-06-26 22:53:50 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://smlnj.cs.uchicago.edu/dist/working/${version}/smlnj-x86-${version}.pkg";
|
2019-03-19 20:32:01 +00:00
|
|
|
sha256 = "12jn50h5jz0ac1vzld2mb94p1dyc8h0mk0hip2wj5xqk1dbzwxl4";
|
2014-06-26 22:53:50 +00:00
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ cpio rsync ];
|
2014-06-26 22:53:50 +00:00
|
|
|
|
|
|
|
unpackPhase = ''
|
2019-03-19 20:32:01 +00:00
|
|
|
${xar}/bin/xar -xf $src
|
2014-06-26 22:53:50 +00:00
|
|
|
cd smlnj.pkg
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cat Payload | gunzip -dc | cpio -i
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-07-22 09:01:32 +00:00
|
|
|
mkdir -p $out/bin
|
2014-06-26 22:53:50 +00:00
|
|
|
rsync -av bin/ $out/bin/
|
|
|
|
|
2014-07-22 09:01:32 +00:00
|
|
|
mkdir -p $out/lib
|
2014-06-26 22:53:50 +00: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";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.smlnj.org";
|
2021-01-22 11:25:31 +00:00
|
|
|
license = lib.licenses.free;
|
|
|
|
platforms = lib.platforms.darwin;
|
|
|
|
maintainers = [ lib.maintainers.jwiegley ];
|
2014-06-26 22:53:50 +00:00
|
|
|
};
|
2018-11-16 09:14:41 +00:00
|
|
|
}
|