* ghcjsHEAD: don’t just copy & replace, reuse same code
The HEAD file was just copied over and a few hashes replaced.
Most of these hashes were already function arguments anyway, so no reason to not
abstract over that.
* ghcjs/base: factor out stage1Packages & regenerate for HEAD
The stage1Packages have changed on ghcjs head, this adds the new list.
This reverts commit 8f07d4bd780a24dcf33be46d8cbfc6163fcdde0e. The build
failure blocking this package has been fixed in the meanwhile. Thanks to
@basvandijk for the heads-up.
(cherry picked from commit 56d033ac1b00a8b29bc29589312d2f5024656bd3)
This makes it easier to ensure that the list of stage 1 packages accurately matches the given version of ghcjs, and makes it possible for this list to be overridden
Previously, the stage2 information was stored in haskell-modules, and imported directly from there. However, the correct stage2 information is determined by the version of ghcjs-boot repository. This commit makes the stage2 information part of the ghcjs derivation, which improves organization and makes it possible to override stage2 when overriding ghcjs.
Citing from http://hydra.cryp.to/build/1533084/log/raw:
Configuring ghcjs-0.2.0...
Setup: At least the following dependencies are missing:
aeson >=0.7 && <0.10,
haskell-src-exts ==1.16.*,
optparse-applicative ==0.11.*,
syb >=0.4 && <0.6
This issue has been present for a while now, and it's only gotten worse.
The most complex problems were from dealing with switches reverted in
the meantime (gcc5, gmp6, ncurses6).
It's likely that darwin is (still) broken nontrivially.
This also:
1 Builds Setup.hs with ghcjs, which (among other things) defines
__GHCJS__ and ghcjs_HOST_OS during pre-processing.
2 Fixes ghc-paths to point at ghcjs and use NIX_GHCJS_* env-vars.
3 Boots ghcjs into $prefix/lib/$compiler.
* ghcjs in nixpkgs depends on lens < 4.9
* current lens in nixpkgs is 4.9.1
* actual upstream ghcjs depends on lens < 4.10
Closes https://github.com/NixOS/nixpkgs/pull/7536.