Merge pull request #8935 from acowley/smlnj-darwin

smlnj: build on darwin
This commit is contained in:
Eric Seidel 2015-07-28 17:39:44 -07:00
commit eca6aa0e8d
2 changed files with 14 additions and 4 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl, darwin }:
let
version = "110.78";
baseurl = "http://smlnj.cs.uchicago.edu/dist/working/${version}";
@ -34,7 +34,15 @@ in stdenv.mkDerivation {
patchPhase = ''
sed -i '/PATH=/d' config/_arch-n-opsys base/runtime/config/gen-posix-names.sh
echo SRCARCHIVEURL="file:/$TMP" > config/srcarchiveurl
'';
'' + stdenv.lib.optionalString stdenv.isDarwin (with darwin; ''
sed -i '/^[[:space:]]*\*x86-darwin\*)$/,/^[[:space:]]*\*) ;;/ c\
\ \*x86-darwin\*)\
\ INCLFILE=${osx_sdk}/Developer/SDKs/${osx_sdk.name}/usr/include/unistd.h\
\ ;;\
\ \*) ;;
' base/runtime/config/gen-posix-names.sh
sed -i 's|^AS =\([[:space:]]*\)/usr/bin/as|AS =\1as|' base/runtime/objs/mk.x86-darwin
'');
unpackPhase = ''
for s in $sources; do
@ -64,7 +72,7 @@ in stdenv.mkDerivation {
description = "Standard ML of New Jersey, a compiler";
homepage = http://smlnj.org;
license = licenses.bsd3;
platforms = [ "i686-linux" ];
platforms = [ "i686-linux" ] ++ platforms.darwin;
maintainers = with maintainers; [ thoughtpolice ];
};
}

View File

@ -4723,7 +4723,9 @@ let
sdcc = callPackage ../development/compilers/sdcc { };
smlnjBootstrap = callPackage ../development/compilers/smlnj/bootstrap.nix { };
smlnj = callPackage_i686 ../development/compilers/smlnj { };
smlnj = if stdenv.isDarwin
then callPackage ../development/compilers/smlnj { }
else callPackage_i686 ../development/compilers/smlnj { };
sqldeveloper = callPackage ../development/tools/database/sqldeveloper { };