nixpkgs/pkgs/development/interpreters/spidermonkey/1.8.0-rc1.nix
Vladimír Čunát ba9b80c7e0 nspr,nss: split into multiple outputs
Hopefully most references are OK.
2015-10-13 20:18:44 +02:00

31 lines
790 B
Nix

{ stdenv, fetchurl, readline, nspr }:
stdenv.mkDerivation rec {
version = "1.8.0-rc1";
name = "spidermonkey-${version}";
src = fetchurl {
url = "http://ftp.mozilla.org/pub/mozilla.org/js/js-${version}.tar.gz";
sha256 = "374398699ac3fd802d98d642486cf6b0edc082a119c9c9c499945a0bc73e3413";
};
buildInputs = [ readline nspr ];
postUnpack = "sourceRoot=\${sourceRoot}/src";
makefileExtra = ./Makefile.extra;
makefile = "Makefile.ref";
patchPhase =
''
cat ${makefileExtra} >> ${makefile}
sed -e 's/ -ltermcap/ -lncurses/' -i ${makefile}
'';
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr"
'';
makeFlags = "-f ${makefile} JS_DIST=\${out} BUILD_OPT=1 JS_READLINE=1 JS_THREADSAFE=1";
}