Refactor ghcHEAD postPatch / preConfigure phases

This is for GHC developers using NixOS where patchShebangs is
inconvenient as it dirties the tree but unnecessary for compilation.
This commit is contained in:
Matthew Pickering 2016-12-24 17:37:58 +00:00
parent d906fb2c9a
commit 4541b10904

@ -27,19 +27,18 @@ in stdenv.mkDerivation (rec {
sha256 = "0rk6xy7kgxx849nprq1ji459p88nyy93236g841m5p6mdh7mmrcr";
};
postPatch = ''
postPatch = "patchShebangs .";
preConfigure = ''
echo ${version} >VERSION
echo ${rev} >GIT_COMMIT_ID
patchShebangs .
./boot
'';
'' + commonPreConfigure ;
buildInputs = commonBuildInputs;
enableParallelBuilding = true;
preConfigure = commonPreConfigure;
configureFlags = [
"CC=${stdenv.cc}/bin/cc"
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"