nixpkgs/pkgs/development/compilers/ghc/6.10.4.nix
Franz Pletz aff1f4ab94 Use general hardening flag toggle lists
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
2016-03-05 18:55:26 +01:00

32 lines
787 B
Nix

{stdenv, fetchurl, libedit, ghc, perl, gmp, ncurses}:
stdenv.mkDerivation rec {
version = "6.10.4";
name = "ghc-${version}";
src = fetchurl {
url = "${meta.homepage}/dist/${version}/${name}-src.tar.bz2";
sha256 = "d66a8e52572f4ff819fe5c4e34c6dd1e84a7763e25c3fadcc222453c0bd8534d";
};
buildInputs = [ghc libedit perl gmp];
hardeningDisable = [ "format" ];
configureFlags = [
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
meta = {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
platforms = ["x86_64-linux" "i686-linux"]; # Darwin is unsupported.
inherit (ghc.meta) license;
};
}