From 51e287469ce64d5a45d4c2247c39358c7f081998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andres=20L=C3=B6h?= Date: Tue, 31 Jan 2006 23:58:32 +0000 Subject: [PATCH] * ghc should call the gcc instance it's been built with (to compile Haskell code) svn path=/nixpkgs/trunk/; revision=4658 --- pkgs/development/compilers/ghc/builder.sh | 5 +++++ pkgs/development/compilers/ghc/default.nix | 4 +++- pkgs/system/all-packages-generic.nix | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/compilers/ghc/builder.sh diff --git a/pkgs/development/compilers/ghc/builder.sh b/pkgs/development/compilers/ghc/builder.sh new file mode 100644 index 00000000000..fed83027448 --- /dev/null +++ b/pkgs/development/compilers/ghc/builder.sh @@ -0,0 +1,5 @@ +source $stdenv/setup + +configureFlags="--with-gcc=$gcc/bin/gcc" + +genericBuild diff --git a/pkgs/development/compilers/ghc/default.nix b/pkgs/development/compilers/ghc/default.nix index 1fdeef20c19..670c146b2de 100644 --- a/pkgs/development/compilers/ghc/default.nix +++ b/pkgs/development/compilers/ghc/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, perl, ghc, m4, readline, ncurses}: +{stdenv, gcc, fetchurl, perl, ghc, m4, readline, ncurses}: stdenv.mkDerivation { name = "ghc-6.4.1"; @@ -8,4 +8,6 @@ stdenv.mkDerivation { }; buildInputs = [perl ghc m4]; propagatedBuildInputs = [readline ncurses]; + builder = ./builder.sh; + inherit gcc; } diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 03e245fcc22..5b09d4cebf7 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -686,6 +686,7 @@ rec { ghc = (import ../development/compilers/ghc) { inherit fetchurl stdenv perl ncurses readline; + gcc = stdenv.gcc; ghc = ghcboot; m4 = gnum4; };