mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
aff1f4ab94
The following parameters are now available: * hardeningDisable To disable specific hardening flags * hardeningEnable To enable specific hardening flags Only the cc-wrapper supports this right now, but these may be reused by other wrappers, builders or setup hooks. cc-wrapper supports the following flags: * fortify * stackprotector * pie (disabled by default) * pic * strictoverflow * format * relro * bindnow
30 lines
678 B
Nix
30 lines
678 B
Nix
{ stdenv, fetchurl, readline }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "spidermonkey-1.7";
|
|
|
|
src = fetchurl {
|
|
url = https://ftp.mozilla.org/pub/js/js-1.7.0.tar.gz;
|
|
sha256 = "12v6v2ccw1y6ng3kny3xw0lfs58d1klylqq707k0x04m707kydj4";
|
|
};
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
buildInputs = [ readline ];
|
|
|
|
postUnpack = "sourceRoot=\${sourceRoot}/src";
|
|
|
|
makefileExtra = ./Makefile.extra;
|
|
makefile = "Makefile.ref";
|
|
|
|
patchPhase =
|
|
''
|
|
cat ${makefileExtra} >> ${makefile}
|
|
sed -e 's/ -ltermcap/ -lncurses/' -i ${makefile}
|
|
'';
|
|
|
|
CFLAGS = "-DPIC -fPIC -DJS_C_STRINGS_ARE_UTF8";
|
|
|
|
makeFlags = "-f ${makefile} JS_DIST=\${out} BUILD_OPT=1 JS_READLINE=1";
|
|
}
|