2010-07-28 12:55:54 +01:00
|
|
|
{ stdenv, fetchurl, readline }:
|
2006-04-26 15:47:16 +01:00
|
|
|
|
2007-11-11 16:12:33 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "spidermonkey-1.7";
|
2015-12-26 02:32:09 +00:00
|
|
|
|
2006-04-26 15:47:16 +01:00
|
|
|
src = fetchurl {
|
2016-05-09 14:49:44 +01:00
|
|
|
url = mirror://mozilla/js/js-1.7.0.tar.gz;
|
2010-07-28 12:55:54 +01:00
|
|
|
sha256 = "12v6v2ccw1y6ng3kny3xw0lfs58d1klylqq707k0x04m707kydj4";
|
2006-04-26 15:47:16 +01:00
|
|
|
};
|
|
|
|
|
2016-04-03 12:49:13 +01:00
|
|
|
hardeningDisable = [ "format" ]
|
|
|
|
++ stdenv.lib.optional stdenv.isi686 "stackprotector";
|
2016-02-08 00:18:44 +00:00
|
|
|
|
2007-11-11 16:12:33 +00:00
|
|
|
buildInputs = [ readline ];
|
|
|
|
|
|
|
|
postUnpack = "sourceRoot=\${sourceRoot}/src";
|
|
|
|
|
|
|
|
makefileExtra = ./Makefile.extra;
|
|
|
|
makefile = "Makefile.ref";
|
2015-12-26 02:32:09 +00:00
|
|
|
|
2010-07-28 12:55:54 +01:00
|
|
|
patchPhase =
|
|
|
|
''
|
|
|
|
cat ${makefileExtra} >> ${makefile}
|
|
|
|
sed -e 's/ -ltermcap/ -lncurses/' -i ${makefile}
|
|
|
|
'';
|
2007-11-11 16:12:33 +00:00
|
|
|
|
2010-12-17 20:41:25 +00:00
|
|
|
CFLAGS = "-DPIC -fPIC -DJS_C_STRINGS_ARE_UTF8";
|
|
|
|
|
2010-07-28 12:55:54 +01:00
|
|
|
makeFlags = "-f ${makefile} JS_DIST=\${out} BUILD_OPT=1 JS_READLINE=1";
|
2016-05-01 10:37:48 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Mozilla's JavaScript engine written in C/C++";
|
|
|
|
homepage = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2006-04-26 15:47:16 +01:00
|
|
|
}
|