ghcjs: move list of stage 1 packages into ghcjs derivation
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
This commit is contained in:
parent
676a7b698f
commit
5a622db103
@ -136,6 +136,33 @@ in mkDerivation (rec {
|
||||
isGhcjs = true;
|
||||
inherit nodejs ghcjsBoot;
|
||||
inherit (ghcjsNodePkgs) "socket.io";
|
||||
|
||||
# This is the list of the Stage 1 packages that are built into a booted ghcjs installation
|
||||
# It can be generated with the command:
|
||||
# nix-shell -p haskell.packages.ghcjs.ghc --command "ghcjs-pkg list | sed -n 's/^ \(.*\)-\([0-9.]*\)$/\1_\2/ p' | sed 's/\./_/g' | sed 's/^\([^_]*\)\(.*\)$/ \"\1\"/'"
|
||||
stage1Packages = [
|
||||
"array"
|
||||
"base"
|
||||
"binary"
|
||||
"rts"
|
||||
"bytestring"
|
||||
"containers"
|
||||
"deepseq"
|
||||
"directory"
|
||||
"filepath"
|
||||
"ghc-prim"
|
||||
"ghcjs-prim"
|
||||
"integer-gmp"
|
||||
"old-locale"
|
||||
"pretty"
|
||||
"primitive"
|
||||
"process"
|
||||
"template-haskell"
|
||||
"time"
|
||||
"transformers"
|
||||
"unix"
|
||||
];
|
||||
|
||||
mkStage2 = import ./stage2.nix {
|
||||
inherit ghcjsBoot;
|
||||
};
|
||||
|
@ -8,10 +8,14 @@ in
|
||||
with import ./lib.nix { inherit pkgs; };
|
||||
|
||||
self: super:
|
||||
# The stage 2 packages. Regenerate with ./ghcjs/gen-stage2.rb
|
||||
let stage2 = super.ghc.mkStage2 {
|
||||
inherit (self) callPackage;
|
||||
}; in stage2 // {
|
||||
|
||||
let # The stage 1 packages
|
||||
stage1 = pkgs.lib.genAttrs super.ghc.stage1Packages (pkg: null);
|
||||
# The stage 2 packages. Regenerate with ../compilers/ghcjs/gen-stage2.rb
|
||||
stage2 = super.ghc.mkStage2 {
|
||||
inherit (self) callPackage;
|
||||
};
|
||||
in stage1 // stage2 // {
|
||||
|
||||
old-time = overrideCabal stage2.old-time (drv: {
|
||||
postPatch = ''
|
||||
@ -30,30 +34,6 @@ self: super:
|
||||
inherit (self.ghc.bootPkgs)
|
||||
jailbreak-cabal alex happy gtk2hs-buildtools rehoo hoogle;
|
||||
|
||||
# This is the list of the Stage 1 packages that are built into a booted ghcjs installation
|
||||
# It can be generated with the command:
|
||||
# nix-shell -p haskell.packages.ghcjs.ghc --command "ghcjs-pkg list | sed -n 's/^ \(.*\)-\([0-9.]*\)$/\1_\2/ p' | sed 's/\./_/g' | sed 's/-\(.\)/\U\1/' | sed 's/^\([^_]*\)\(.*\)$/\1 = null;/'"
|
||||
array = null;
|
||||
base = null;
|
||||
binary = null;
|
||||
rts = null;
|
||||
bytestring = null;
|
||||
containers = null;
|
||||
deepseq = null;
|
||||
directory = null;
|
||||
filepath = null;
|
||||
ghc-prim = null;
|
||||
ghcjs-prim = null;
|
||||
integer-gmp = null;
|
||||
old-locale = null;
|
||||
pretty = null;
|
||||
primitive = null;
|
||||
process = null;
|
||||
template-haskell = null;
|
||||
time = null;
|
||||
transformers = null;
|
||||
unix = null;
|
||||
|
||||
# Don't set integer-simple to null!
|
||||
# GHCJS uses integer-gmp, so any package expression that depends on
|
||||
# integer-simple is wrong.
|
||||
|
Loading…
Reference in New Issue
Block a user