3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #17312 from ryantrinkle/ghcjs-separate-stage1-list

ghcjs: move list of stage 1 packages into ghcjs derivation
This commit is contained in:
Peter Simons 2016-07-27 21:15:12 +02:00 committed by GitHub
commit 48829c7828
2 changed files with 35 additions and 28 deletions

View file

@ -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;
};

View file

@ -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.