on iko/ghcjs-patch-master help sign in
build ghcjs (#382)

Adds `ghcjs` to haskell.nix Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@googlemail.com> Co-authored-by: Michael Bishop <cleverca22@gmail.com>

commitf5b150c98a7d7ae8e414652ba20f3ccc98414f36 authorMoritz Angermann <moritz.angermann@gmail.com> dateSun 9 Feb 2020, 20:03 (7 years ago) parente346ccb
22 files changed+2376−165
builder/comp-builder.nix+4−3 builder/ghc-for-component-wrapper.nix+10−10 builder/hspkg-builder.nix+49−11 builder/make-config-files.nix+66−27 builder/setup-builder.nix+4−5 builder/shell-for.nix+1 compiler/ghcjs/ghcjs-src.json+3−3 compiler/ghcjs/ghcjs.nix+39−95 lib/call-cabal-project-to-nix.nix+2−2 lib/ghcjs-project.nix+131 materialized/ghcjs/.plan.nix/ghc-api-ghcjs.nix+620 materialized/ghcjs/.plan.nix/ghci-ghcjs.nix+101 materialized/ghcjs/.plan.nix/ghcjs-th.nix+89 materialized/ghcjs/.plan.nix/ghcjs.nix+362 materialized/ghcjs/.plan.nix/haddock-api-ghcjs.nix+215 materialized/ghcjs/.plan.nix/haddock-library-ghcjs.nix+134 materialized/ghcjs/.plan.nix/template-haskell-ghcjs.nix+85 materialized/ghcjs/default.nix+413 modules/cabal.nix+5 modules/component-driver.nix+6−1 overlays/bootstrap.nix+32−8 overlays/haskell.nix+5
builder/comp-builder.nix+4−3
@@ -103,6 +103,7 @@ let
103103 map (arg: "--hsc2hs-option=" + arg) (["--cross-compile"] ++ lib.optionals (stdenv.hostPlatform.isWindows) ["--via-asm"])
104104 ++ lib.optional (package.buildType == "Configure") "--configure-option=--host=${stdenv.hostPlatform.config}" )
105105 ++ component.configureFlags
106+ ++ (ghc.extraConfigureFlags or [])
106107 );
107108
108109 setupGhcOptions = lib.optional (package.ghcOptions != null) '' --ghc-options="${package.ghcOptions}"'';
@@ -139,7 +140,7 @@ let
139140in stdenv.lib.fix (drv:
140141
141142stdenv.mkDerivation ({
142− name = fullName;
143+ name = "${ghc.targetPrefix}${fullName}";
143144
144145 src = cleanSrc;
145146
@@ -272,10 +273,10 @@ stdenv.mkDerivation ({
272273 ${ghc.targetPrefix}ghc-pkg -v0 init $out/package.conf.d
273274 if [ -d "${name}.conf" ]; then
274275 for pkg in ${name}.conf/*; do
275− ${ghc.targetPrefix}ghc-pkg -v0 --package-db ${configFiles}/package.conf.d -f $out/package.conf.d register "$pkg"
276+ ${ghc.targetPrefix}ghc-pkg -v0 --package-db ${configFiles}/${configFiles.packageCfgDir} -f $out/package.conf.d register "$pkg"
276277 done
277278 elif [ -e "${name}.conf" ]; then
278− ${ghc.targetPrefix}ghc-pkg -v0 --package-db ${configFiles}/package.conf.d -f $out/package.conf.d register ${name}.conf
279+ ${ghc.targetPrefix}ghc-pkg -v0 --package-db ${configFiles}/${configFiles.packageCfgDir} -f $out/package.conf.d register ${name}.conf
279280 fi
280281
281282 mkdir -p $out/exactDep
builder/ghc-for-component-wrapper.nix+10−10
@@ -15,15 +15,11 @@
1515}:
1616
1717let
18− isGhcjs = ghc.isGhcjs or false;
19− ghcCommand' = if isGhcjs then "ghcjs" else "ghc";
20− ghcCommand = "${ghc.targetPrefix}${ghcCommand'}";
21− ghcCommandCaps = lib.toUpper ghcCommand';
22− libDir = "$out/lib/${ghcCommand}-${ghc.version}";
18+ inherit (configFiles) ghcCommand ghcCommandCaps packageCfgDir;
19+ libDir = "$out/${configFiles.libDir}";
2320 docDir = "$out/share/doc/ghc/html";
24− packageCfgDir = "${libDir}/package.conf.d";
2521
26−in runCommand "${componentName}-${ghc.name}" {
22+in runCommand "${componentName}-${ghc.name}-env" {
2723 preferLocalBuild = true;
2824 passthru = {
2925 inherit (ghc) version meta;
@@ -40,12 +36,16 @@ in runCommand "${componentName}-${ghc.name}" {
4036 rm -rf ${libDir}/*/
4137 # ... but retain the lib/ghc/bin directory. This contains `unlit' and friends.
4238 ln -s ${ghc}/lib/${ghcCommand}-${ghc.version}/bin ${libDir}
43− # ... and the ghcjs shim's if they are available
39+ # ... and the ghcjs shim's if they are available ...
4440 if [ -d ${ghc}/lib/${ghcCommand}-${ghc.version}/shims ]; then
4541 ln -s ${ghc}/lib/${ghcCommand}-${ghc.version}/shims ${libDir}
4642 fi
43+ # ... and node modules ...
44+ if [ -d ${ghc}/lib/${ghcCommand}-${ghc.version}/ghcjs-node ]; then
45+ ln -s ${ghc}/lib/${ghcCommand}-${ghc.version}/ghcjs-node ${libDir}
46+ fi
4747 # Replace the package database with the one from target package config.
48− ln -s ${configFiles}/package.conf.d ${packageCfgDir}
48+ ln -s ${configFiles}/${packageCfgDir} $out/${packageCfgDir}
4949
5050 # Wrap compiler executables with correct env variables.
5151 # The NIX_ variables are used by the patched Paths_ghc module.
@@ -88,7 +88,7 @@ in runCommand "${componentName}-${ghc.name}" {
8888 for prg in ${ghcCommand}-pkg ${ghcCommand}-pkg-${ghc.version}; do
8989 if [[ -x "${ghc}/bin/$prg" ]]; then
9090 rm -f $out/bin/$prg
91− makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "--global-package-db=${packageCfgDir}"
91+ makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "--global-package-db=$out/${packageCfgDir}"
9292 fi
9393 done
9494
builder/hspkg-builder.nix+49−11
@@ -1,6 +1,6 @@
11{ pkgs, buildPackages, stdenv, lib, haskellLib, ghc, fetchurl, runCommand, comp-builder, setup-builder }:
22
3−
3+config:
44{ flags
55, package
66, components
@@ -16,7 +16,7 @@
1616, shellHook
1717
1818, ...
19−}@config:
19+}@pkg:
2020
2121assert (if ghc.isHaskellNixCompiler or false then true
2222 else throw ("It is likely you used `haskell.compiler.X` instead of `haskell-nix.compiler.X`"
@@ -34,21 +34,59 @@ let
3434 import Distribution.Simple
3535 main = defaultMain
3636 '';
37− defaultSetup = buildPackages.runCommand "default-Setup" { nativeBuildInputs = [(ghc.passthru.buildGHC or ghc)]; } ''
38− cat ${defaultSetupSrc} > Setup.hs
39− mkdir -p $out/bin
40− ${(ghc.passthru.buildGHC or ghc).targetPrefix}ghc Setup.hs --make -o $out/bin/Setup
41− '';
37+ defaultSetup = setup-builder {
38+ name = "${ghc.targetPrefix}default-Setup";
39+ component = {
40+ depends = config.setup-depends;
41+ libs = [];
42+ frameworks = [];
43+ doExactConfig = false;
44+ includeDirs = [];
45+ asmSources = [];
46+ cSources = [];
47+ cmmSources = [];
48+ cxxSources = [];
49+ jsSources = [];
50+ extraSrcFiles = [ "Setup.hs" "Setup.lhs" ];
51+ pkgconfig = [];
52+ build-tools = [];
53+
54+ platforms = null;
55+ preBuild = null; postBuild = null;
56+ preInstall = null; postInstall = null;
57+ preUnpack = null; postUnpack = null;
58+ };
59+ package = {
60+ identifier = {
61+ name = "default-Setup";
62+ version = "1.0";
63+ };
64+ homepage = null;
65+ synopsis = null;
66+ license = "MIT";
67+ };
68+ src = null; cleanSrc = buildPackages.runCommand "default-Setup-src" {} ''
69+ mkdir $out
70+ cat ${defaultSetupSrc} > $out/Setup.hs
71+ '';
72+ inherit defaultSetupSrc;
73+ };
74+
75+ # buildPackages.runCommand "default-Setup" { nativeBuildInputs = [(ghc.passthru.buildGHC or ghc)]; } ''
76+ # cat ${defaultSetupSrc} > Setup.hs
77+ # mkdir -p $out/bin
78+ # ${(ghc.passthru.buildGHC or ghc).targetPrefix}ghc Setup.hs --make -o $out/bin/Setup
79+ # '';
4280
43− setup = if package.buildType == "Simple" && package.setup-depends == []
81+ setup = if package.buildType == "Simple"
4482 then defaultSetup
4583 else setup-builder {
4684 component = components.setup // {
47− depends = components.setup.depends ++ package.setup-depends;
85+ depends = config.setup-depends ++ components.setup.depends ++ package.setup-depends;
4886 extraSrcFiles = components.setup.extraSrcFiles ++ [ "Setup.hs" "Setup.lhs" ];
4987 };
5088 inherit package name src flags revision patches defaultSetupSrc;
51− inherit (config) preUnpack postUnpack;
89+ inherit (pkg) preUnpack postUnpack;
5290 };
5391
5492 buildComp = componentId: component: comp-builder {
@@ -58,7 +96,7 @@ let
5896 };
5997
6098in rec {
61− components = haskellLib.applyComponents buildComp config;
99+ components = haskellLib.applyComponents buildComp pkg;
62100 checks = pkgs.recurseIntoAttrs (builtins.mapAttrs
63101 (_: d: haskellLib.check d)
64102 (lib.filterAttrs (_: d: d.config.doCheck) components.tests));
builder/make-config-files.nix+66−27
@@ -17,9 +17,10 @@ let
1717
1818 # exactDep will pass --exact-configuration to the `SETUP_HS confiugre` command.
1919 # This requires us to pass --dependency={dep name}={pkg id}. The dependency
20− # name will usually be the name of the package `p`, that will have been located
21− # in the suitable package db when the dependency (along with `exactDep` and `envDep`)
22− # was built. Sublibs need a bit of special handling:
20+ # name will usually be the name of the package `p`, which we can locate in the
21+ # package-db, passed in via `pdbArg`. Thus querying the package-db for the
22+ # id field for package `p`, will unsually provide is with the right value. Sublibs
23+ # need a bit of special handling:
2324 #
2425 # - Sublibs: if the dependency is a sublibrary of a package, we need to use
2526 # the sublibrary's name for the dep name, and lookup the sublibraries
@@ -30,11 +31,11 @@ let
3031
3132 getLibComponent = dep:
3233 dep.components.library # Regular package dependency
33− or dep; # or a sublib
34−
34+ or dep; # or a sublib
35+
3536 catPkgExactDep = p: ''
36− cat ${getLibComponent p}/exactDep/configure-flags >> $out/configure-flags
37− cat ${getLibComponent p}/exactDep/cabal.config >> $out/cabal.config
37+ cat ${p}/exactDep/configure-flags >> $out/configure-flags
38+ cat ${p}/exactDep/cabal.config >> $out/cabal.config
3839 '';
3940
4041 catGhcPkgExactDep = p: ''
@@ -45,7 +46,7 @@ let
4546 '';
4647
4748 catPkgEnvDep = p: ''
48− cat ${getLibComponent p}/envDep >> $out/ghc-environment
49+ cat ${p}/envDep >> $out/ghc-environment
4950 '';
5051
5152 catGhcPkgEnvDep = p: ''
@@ -54,11 +55,36 @@ let
5455 fi
5556 '';
5657
58+ # Work our suitable packageCfgDir subdirectory
59+ isGhcjs = ghc.isGhcjs or false;
60+ ghcCommand' = if isGhcjs then "ghcjs" else "ghc";
61+ ghcCommand = "${ghc.targetPrefix}${ghcCommand'}";
62+ ghcCommandCaps = lib.toUpper ghcCommand';
63+ libDir = "lib/${ghcCommand}-${ghc.version}";
64+ packageCfgDir = "${libDir}/package.conf.d";
65+
5766in { identifier, component, fullName, flags ? {} }:
58− runCommand "${fullName}-config" { nativeBuildInputs = [ghc]; } (''
67+ # Filters out only library packages that for this GHC target
68+ # TODO investigate why this is needed
69+ let libDeps = lib.filter (p: p.configFiles.targetPrefix == ghc.targetPrefix)
70+ (map getLibComponent component.depends);
71+ cfgFiles =
72+ let xs = map
73+ (p: "${p.configFiles}")
74+ libDeps;
75+ in lib.concatStringsSep "\" \"" xs;
76+ libs = lib.concatMapStringsSep "\" \"" (p: "${p}") libDeps;
77+ in
78+ runCommand "${ghc.targetPrefix}${fullName}-config" {
79+ nativeBuildInputs = [ghc];
80+ passthru = {
81+ inherit (ghc) targetPrefix;
82+ inherit ghcCommand ghcCommandCaps libDir packageCfgDir;
83+ };
84+ } (''
5985 mkdir -p $out
6086
61− ${target-pkg} init $out/package.conf.d
87+ ${target-pkg} init $out/${packageCfgDir}
6288
6389 ${lib.concatStringsSep "\n" (lib.mapAttrsToList flagsAndConfig {
6490 "extra-lib-dirs" = map (p: "${lib.getLib p}/lib") component.libs;
@@ -68,16 +94,22 @@ in { identifier, component, fullName, flags ? {} }:
6894
6995 # Copy over the nonReinstallablePkgs from the global package db.
7096 ${lib.concatMapStringsSep "\n" (p: ''
71− find ${ghc}/lib/${ghc.name}/package.conf.d -name '${p}*.conf' -exec cp -f {} $out/package.conf.d \;
97+ find ${ghc}/lib/${ghc.name}/package.conf.d -name '${p}*.conf' -exec cp -f {} $out/${packageCfgDir} \;
7298 '') nonReinstallablePkgs}
7399
74− ${lib.concatMapStringsSep "\n" (p: ''
75− cp -f "${(getLibComponent p).configFiles}/package.conf.d/"*.conf $out/package.conf.d
76− cp -f "${getLibComponent p}/package.conf.d/"*.conf $out/package.conf.d
77− '') component.depends}
100+ for l in "${cfgFiles}"; do
101+ if [ -n "$l" ]; then
102+ cp -f "$l/${packageCfgDir}/"*.conf $out/${packageCfgDir}
103+ fi
104+ done
105+ for l in "${libs}"; do
106+ if [ -n "$l" ]; then
107+ cp -f "$l/package.conf.d/"*.conf $out/${packageCfgDir}
108+ fi
109+ done
78110
79111 # Note: we pass `clear` first to ensure that we never consult the implicit global package db.
80− ${flagsAndConfig "package-db" ["clear" "$out/package.conf.d"]}
112+ ${flagsAndConfig "package-db" ["clear" "$out/${packageCfgDir}"]}
81113
82114 echo ${lib.concatStringsSep " " (lib.mapAttrsToList (fname: val: "--flags=${lib.optionalString (!val) "-" + fname}") flags)} >> $out/configure-flags
83115
@@ -86,17 +118,17 @@ in { identifier, component, fullName, flags ? {} }:
86118
87119 # Provide a GHC environment file
88120 cat > $out/ghc-environment <<EOF
89− package-db $out/package.conf.d
121+ package-db $out/${packageCfgDir}
90122 EOF
91123
92− ${lib.concatMapStringsSep "\n" catPkgEnvDep component.depends}
124+ ${lib.concatMapStringsSep "\n" catPkgEnvDep libDeps}
93125 ${lib.concatMapStringsSep "\n" catGhcPkgEnvDep (lib.remove "ghc" nonReinstallablePkgs)}
94126 '' + lib.optionalString component.doExactConfig ''
95127 echo "--exact-configuration" >> $out/configure-flags
96128 echo "allow-newer: ${identifier.name}:*" >> $out/cabal.config
97129 echo "allow-older: ${identifier.name}:*" >> $out/cabal.config
98130
99− ${lib.concatMapStringsSep "\n" catPkgExactDep component.depends}
131+ ${lib.concatMapStringsSep "\n" catPkgExactDep libDeps}
100132 ${lib.concatMapStringsSep "\n" catGhcPkgExactDep nonReinstallablePkgs}
101133
102134 ''
@@ -116,10 +148,12 @@ in { identifier, component, fullName, flags ? {} }:
116148 # (e.g. libiconv), and thus we don't want to fail, but just link it again.
117149 #
118150 # Confusing sed stuff:
119− # '/^ ./{H;$!d} ; x' Groups lines that start with a space with the initial
120− # line of a block. Needs a blank line added to the file
121− # to terminate the last block.
122− # 's/ /\n/g ; s/\n\n*/\n/g; s/^\n//;' Puts each field on its own line.
151+ # '/^ ./{H;$!d} ; x' Groups lines that start with a space with the initial
152+ # line of a block. Needs a blank line added to the file
153+ # to terminate the last block.
154+ # 's/ /\n/g ; s/\n\n*/\n/g; s/^\n//;' Puts each field on its own line.
155+ # 's|/nix/store/|''${pkgroot}/../../../|' Convert store path to pkgroot relative path
156+ # 's|''${pkgroot}/../../../|/nix/store/|' Convert pkgroot relative path to store path
123157 + lib.optionalString stdenv.isDarwin ''
124158 # Work around a limit in the macOS Sierra linker on the number of paths
125159 # referenced by any one dynamic library:
@@ -128,20 +162,25 @@ in { identifier, component, fullName, flags ? {} }:
128162 # libraries) from all the dependencies.
129163 local dynamicLinksDir="$out/lib/links"
130164 mkdir -p $dynamicLinksDir
165+ # Enumerate dynamic-library-dirs with ''${pkgroot} expanded.
131166 local dirsToLink=$(
132− for f in "$out/package.conf.d/"*.conf; do
167+ for f in "$out/${packageCfgDir}/"*.conf; do
133168 (cat $f; echo) | sed -En '/^ ./{H;$!d} ; x ; /^dynamic-library-dirs:/ {s/^dynamic-library-dirs:// ; s/ /\n/g ; s/\n\n*/\n/g; s/^\n//; p}'
134− done | sort -u
169+ done | sed 's|''${pkgroot}/../../../|/nix/store/|' | sort -u
135170 )
136171 for d in $dirsToLink; do
137172 ln -f -s "$d/"*.dylib $dynamicLinksDir
138173 done
139174 # Edit the local package DB to reference the links directory.
140− for f in "$out/package.conf.d/"*.conf; do
175+ for f in "$out/${packageCfgDir}/"*.conf; do
141176 chmod +w $f
142177 echo >> $f
143178 sed -i -E "/^ ./{H;$!d} ; x ; s,^dynamic-library-dirs:.*,dynamic-library-dirs: $dynamicLinksDir," $f
144179 done
145180 '' + ''
146− ${target-pkg} -v0 --package-db $out/package.conf.d recache
181+ # Use ''${pkgroot} relative paths so that we can relocate the package database
182+ # along with referenced packages and still have it work on systems with
183+ # or without nix installed.
184+ sed -i 's|/nix/store/|''${pkgroot}/../../../|' $out/${packageCfgDir}/*.conf
185+ ${target-pkg} -v0 --package-db $out/${packageCfgDir} recache
147186 '')
builder/setup-builder.nix+4−5
@@ -1,15 +1,14 @@
11{ stdenv, lib, buildPackages, haskellLib, ghc, nonReinstallablePkgs, hsPkgs, makeSetupConfigFiles, pkgconfig }:
22
3−{ component, package, name, src, flags, revision, patches, defaultSetupSrc
3+{ component, package, name, src, flags ? {}, revision ? null, patches ? [], defaultSetupSrc
44, preUnpack ? component.preUnpack, postUnpack ? component.postUnpack
55, prePatch ? null, postPatch ? null
66, preBuild ? component.preBuild , postBuild ? component.postBuild
77, preInstall ? component.preInstall , postInstall ? component.postInstall
8+, cleanSrc ? haskellLib.cleanCabalComponent package component src
89}:
910
1011let
11− cleanSrc = haskellLib.cleanCabalComponent package component src;
12−
1312 fullName = "${name}-setup";
1413
1514 includeGhcPackage = lib.any (p: p.identifier.name == "ghc") component.depends;
@@ -36,7 +35,7 @@ let
3635in
3736 stdenv.lib.fix (drv:
3837 stdenv.mkDerivation ({
39− name = "${fullName}";
38+ name = "${ghc.targetPrefix}${fullName}";
4039 src = cleanSrc;
4140 buildInputs = component.libs
4241 ++ component.frameworks
@@ -70,7 +69,7 @@ in
7069 if [ -f $f ]; then
7170 echo Compiling package $f
7271 ghc $f -threaded '' + (if includeGhcPackage then "-package ghc " else "")
73− + ''-package-db ${configFiles}/package.conf.d --make -o ./Setup
72+ + ''-package-db ${configFiles}/${configFiles.packageCfgDir} --make -o ./Setup
7473 setup=$(pwd)/Setup
7574 fi
7675 done
builder/shell-for.nix+1
@@ -90,6 +90,7 @@ in
9090
9191 passthru = (mkDrvArgs.passthru or {}) // {
9292 ghc = ghcEnv;
93+ inherit configFiles;
9394 };
9495 } // lib.optionalAttrs exactDeps {
9596 CABAL_CONFIG = "${configFiles}/cabal.config";
compiler/ghcjs/ghcjs-src.json+3−3
@@ -1,6 +1,6 @@
11{
22 "url": "https://github.com/ghcjs/ghcjs",
3− "rev": "d97caeb07757e09f7402429532c14d20eab79bd2",
4− "sha256": "0025pjgbmr34f2wadrnm9crnx966scc7ja8n9gy93jcqzzmvgj6x",
3+ "rev": "e87195eaa2bc7e320e18cf10386802bc90b7c874",
4+ "sha256": "02mwkf7aagxqi142gcmq048244apslrr72p568akcab9s0fn2gvy",
55 "fetchSubmodules": true
6−}
6+}
compiler/ghcjs/ghcjs.nix+39−95
@@ -9,66 +9,15 @@
99, cabal-install ? pkgs.buildPackages.cabal-install
1010}:
1111let
12− configured-src = pkgs.buildPackages.runCommand "configured-ghcjs-src" {
13− buildInputs = with pkgs.buildPackages; [
14− perl
15− autoconf
16− automake
17− python3
18− ] ++ [
19− ghc
20− happy
21− alex
22− cabal-install
23− ];
24− inherit ghcjsSrc;
25− } ''
26− export HOME=$(pwd)
27− mkdir $HOME/.cabal
28− touch $HOME/.cabal/config
29− cp -r "$ghcjsSrc" "$out"
30− chmod -R +w "$out"
31− cd "$out"
32−
33− # TODO: Find a better way to avoid impure version numbers
34− sed -i 's/RELEASE=NO/RELEASE=YES/' ghc/configure.ac
35− sed -i 's/${ghcjsVersion}/${ghcVersion}/' ghcjs.cabal
36−
37− # TODO: How to actually fix this?
38− # Seems to work fine and produce the right files.
39− touch ghc/includes/ghcautoconf.h
40− mkdir -p ghc/compiler/vectorise
41− mkdir -p ghc/utils/haddock/haddock-library/vendor
42−
43− patchShebangs .
44− sed -i 's/gcc /cc /g' utils/makePackages.sh
45− cat utils/makePackages.sh
46− ./utils/makePackages.sh copy
12+ project = pkgs.buildPackages.haskell-nix.ghcjsProject {
13+ src = ghcjsSrc;
14+ inherit ghc ghcjsVersion ghcVersion happy alex cabal-install;
15+ index-state = "2019-12-10T00:00:00Z";
16+# plan-sha256 = "1wy2lr08maxyi7r8jiwf2gj6pdayk5vxxwh42bj4s2gg4035z0yc";
17+# materialized = ../../materialized/ghcjs;
18+ };
4719
48− echo " build-tool-depends: alex:alex, happy:happy <= 1.19.9" >> lib/ghc-api-ghcjs/ghc-api-ghcjs.cabal
49− '';
50− # see https://github.com/ghcjs/ghcjs/issues/751 for the happy upper bound.
51− ghcjs = (pkgs.buildPackages.haskell-nix.cabalProject {
52− src = configured-src;
53− inherit ghc;
54− modules = [
55− {
56− # we need ghc-boot in here for ghcjs.
57− nonReinstallablePkgs = [ "rts" "ghc-heap" "ghc-prim" "integer-gmp" "integer-simple" "base"
58− "deepseq" "array" "ghc-boot-th" "pretty" "template-haskell"
59− "ghc-boot" "binary" "bytestring" "filepath" "directory" "containers"
60− "time" "unix" "Win32" ];
61− }
62− {
63− packages.Cabal.patches = [ ./../../overlays/patches/Cabal/fix-data-dir.patch ];
64− packages.ghcjs.doHaddock = false;
65− packages.haddock-ghcjs.doHaddock = false;
66− packages.haddock-api-ghcjs.doHaddock = false;
67− packages.ghcjs.flags = { no-wrapper-install = true; };
68− # packages.ghcjs.components.library.configureFlags = [ "-fno-wrapper-install" ];
69− }
70− ];
71− }).ghcjs; # <- we are only interested in the `ghcjs` package.
20+ inherit (project.hsPkgs) ghcjs;
7221
7322 all-ghcjs = pkgs.buildPackages.symlinkJoin {
7423 name = "ghcjs-${ghcjsVersion}-symlinked";
@@ -79,46 +28,41 @@ let
7928 ghcjs.components.exes.hsc2hs-ghcjs
8029 ghcjs.components.exes.ghcjs-boot
8130 ghcjs.components.exes.ghcjs-run
31+ ghcjs.components.exes.ghcjs-dumparchive
8232 ];
8333 };
84− libexec = "${all-ghcjs}/libexec/${builtins.replaceStrings ["darwin" "i686"] ["osx" "i386"] pkgs.stdenv.buildPlatform.system}-${ghc.name}/ghcjs-${ghcVersion}";
85−in pkgs.stdenv.mkDerivation {
86− name = "ghcjs-${ghcVersion}";
87− src = configured-src;
34+ libexec = "libexec/${builtins.replaceStrings ["darwin" "i686"] ["osx" "i386"] pkgs.stdenv.buildPlatform.system}-${ghc.name}/ghcjs-${ghcVersion}";
35+ booted-ghcjs = pkgs.stdenv.mkDerivation {
36+ name = "ghcjs-${ghcVersion}";
37+ src = project.configured-src;
8838
89− nativeBuildInputs = with pkgs.buildPackages; [
90− nodejs
91− makeWrapper
92− xorg.lndir
93− gmp
94− pkgconfig
95− ]
96− ++ [ ghc cabal-install ]
97− ++ lib.optionals stdenv.isDarwin [
98− pkgs.buildPackages.gcc # https://github.com/ghcjs/ghcjs/issues/663
99− ];
100− passthru = {
39+ nativeBuildInputs = project.bootInputs;
40+ passthru = {
10141 inherit all-ghcjs;
102− } // ghcjs.components.exes;
103− dontConfigure = true;
104− dontInstall = true;
105− buildPhase = ''
106− export HOME=$TMP
107− mkdir $HOME/.cabal
108− touch $HOME/.cabal/config
109− cd lib/boot
42+ inherit (project) configured-src;
43+ # Used to detect non haskell-nix compilers (accedental use of nixpkgs compilers can lead to unexpected errors)
44+ isHaskellNixCompiler = true;
45+ } // ghcjs.components.exes;
46+ dontConfigure = true;
47+ dontInstall = true;
48+ buildPhase = ''
49+ export HOME=$TMP
50+ mkdir $HOME/.cabal
51+ touch $HOME/.cabal/config
52+ cd lib/boot
11053
111− mkdir -p $out/bin
112− mkdir -p $out/lib/ghcjs-${ghcVersion}
113− lndir ${libexec} $out/bin
54+ mkdir -p $out/bin
55+ mkdir -p $out/lib/ghcjs-${ghcVersion}
56+ lndir ${all-ghcjs}/${libexec} $out/bin
11457
115− wrapProgram $out/bin/ghcjs --add-flags "-B$out/lib/ghcjs-${ghcVersion}"
116− wrapProgram $out/bin/haddock-ghcjs --add-flags "-B$out/lib/ghcjs-${ghcVersion}"
117− wrapProgram $out/bin/ghcjs-pkg --add-flags "--global-package-db=$out/lib/ghcjs-${ghcVersion}/package.conf.d"
58+ wrapProgram $out/bin/ghcjs --add-flags "-B$out/lib/ghcjs-${ghcVersion}"
59+ wrapProgram $out/bin/haddock-ghcjs --add-flags "-B$out/lib/ghcjs-${ghcVersion}"
60+ wrapProgram $out/bin/ghcjs-pkg --add-flags "--global-package-db=$out/lib/ghcjs-${ghcVersion}/package.conf.d"
11861
119− env PATH=$out/bin:$PATH $out/bin/ghcjs-boot -j1 --with-ghcjs-bin $out/bin
120− '';
121− # We hard code -j1 as a temporary workaround for
122− # https://github.com/ghcjs/ghcjs/issues/654
123− # enableParallelBuilding = true;
124−}
62+ env PATH=$out/bin:$PATH $out/bin/ghcjs-boot -j1 --with-ghcjs-bin $out/bin
63+ '';
64+ # We hard code -j1 as a temporary workaround for
65+ # https://github.com/ghcjs/ghcjs/issues/654
66+ # enableParallelBuilding = true;
67+ };
68+in booted-ghcjs
lib/call-cabal-project-to-nix.nix+2−2
@@ -173,7 +173,7 @@ let
173173 else null;
174174 } // pkgs.lib.optionalAttrs (checkMaterialization != null) {
175175 inherit checkMaterialization;
176− }) (runCommand (if name == null then "plan-to-nix-pkgs" else name + "-plan-to-nix-pkgs") {
176+ }) (builtins.trace "[${if name == null then "plan-to-nix-pkgs" else name + "-plan-to-nix-pkgs"}] cabal new-configure --with-ghc=${ghc.targetPrefix}ghc --with-ghc-pkg=${ghc.targetPrefix}ghc-pkg" (runCommand (if name == null then "plan-to-nix-pkgs" else name + "-plan-to-nix-pkgs") {
177177 nativeBuildInputs = [ nix-tools ghc hpack cabal-install pkgs.rsync pkgs.git ];
178178 # Needed or stack-to-nix will die on unicode inputs
179179 LOCALE_ARCHIVE = pkgs.lib.optionalString (pkgs.stdenv.hostPlatform.libc == "glibc") "${pkgs.glibcLocales}/lib/locale/locale-archive";
@@ -247,5 +247,5 @@ let
247247
248248 # move pkgs.nix to default.nix ensure we can just nix `import` the result.
249249 mv $out/pkgs.nix $out/default.nix
250− '');
250+ ''));
251251in { projectNix = plan-nix; inherit src; inherit (fixedProject) sourceRepos; }
lib/ghcjs-project.nixnew file+131
@@ -0,0 +1,131 @@
1+# For the time being we can't really treat ghcjs like a
2+# regular ghc (with different target). We need this as a
3+# stop-gap measure until ghcjs can be treated like a regular
4+# ghc.
5+#
6+# `haskell-nix.ghcjsProject` wraps `haskell-nix.cabalProject'`
7+# for use with the ghcjs source. It is exposed to allow GHCJS
8+# developers to work on the GHCJS code in a nix-shell with
9+# `shellFor`. It takes thes the clean src (from fetched
10+# source or local source that has been cleaned with cleanGit.
11+# It configures the source and passes it onto `cabalProject`
12+# along with the necessary modules.
13+#
14+# It also adds `configureInputs` and `bootInputs` that a
15+# needed for configuring the source and booting the compiler
16+# once it is built. These are added to the `hsPkgs.shellFor`
17+# of the project.
18+{ pkgs }:
19+{ src
20+, ghc ? pkgs.ghc
21+, ghcjsVersion ? "8.6.0.1" # TODO get this from the source?
22+, ghcVersion ? "8.6.5" # TODO get this from the ghc arg?
23+, happy ? pkgs.haskellPackages.happy
24+, alex ? pkgs.haskellPackages.alex
25+, cabal-install ? pkgs.cabal-install
26+, ...
27+}@args:
28+let
29+ # Inputs needed to configure the GHCJS source tree
30+ configureInputs = with pkgs; [
31+ perl
32+ autoconf
33+ automake
34+ python3
35+ ] ++ [
36+ ghc
37+ happy
38+ alex
39+ cabal-install
40+ ];
41+ # Inputs needed to boot the GHCJS compiler
42+ bootInputs = with pkgs; [
43+ nodejs
44+ makeWrapper
45+ xorg.lndir
46+ gmp
47+ pkgconfig
48+ ]
49+ ++ [ ghc cabal-install ]
50+ ++ lib.optionals stdenv.isDarwin [
51+ pkgs.buildPackages.gcc # https://github.com/ghcjs/ghcjs/issues/663
52+ ];
53+ # Configured the GHCJS source
54+ configured-src = pkgs.runCommand "configured-ghcjs-src" {
55+ buildInputs = configureInputs;
56+ inherit src;
57+ } ''
58+ export HOME=$(pwd)
59+ mkdir $HOME/.cabal
60+ touch $HOME/.cabal/config
61+ cp -r "$src" "$out"
62+ chmod -R +w "$out"
63+ cd "$out"
64+
65+ # TODO: Find a better way to avoid impure version numbers
66+ sed -i 's/RELEASE=NO/RELEASE=YES/' ghc/configure.ac
67+ sed -i 's/${ghcjsVersion}/${ghcVersion}/' ghcjs.cabal
68+
69+ # TODO: How to actually fix this?
70+ # Seems to work fine and produce the right files.
71+ touch ghc/includes/ghcautoconf.h
72+ mkdir -p ghc/compiler/vectorise
73+ mkdir -p ghc/utils/haddock/haddock-library/vendor
74+
75+ patchShebangs .
76+ sed -i 's/gcc /cc /g' utils/makePackages.sh
77+ cat utils/makePackages.sh
78+ ./utils/makePackages.sh copy
79+
80+ echo " build-tool-depends: alex:alex, happy:happy <= 1.19.9" >> lib/ghc-api-ghcjs/ghc-api-ghcjs.cabal
81+
82+ # nuke the HsBaseConfig.h from base.buildinfo.in; this will
83+ # prevent it from being installed and provide incorrect values.
84+ sed -i 's/HsBaseConfig.h//g' lib/boot/pkg/base/base.buildinfo.in
85+ cat lib/boot/pkg/base/base.buildinfo.in
86+ '';
87+ # see https://github.com/ghcjs/ghcjs/issues/751 for the happy upper bound.
88+
89+ ghcjsProject = pkgs.haskell-nix.cabalProject' (
90+ (pkgs.lib.filterAttrs
91+ (n: _: builtins.any (x: x == n)
92+ ["src" "ghcjsVersion" "ghcVersion" "happy" "alex" "cabal-install"]) args) // {
93+ src = configured-src;
94+ modules = [
95+ {
96+ # we need ghc-boot in here for ghcjs.
97+ nonReinstallablePkgs = [ "rts" "ghc-heap" "ghc-prim" "integer-gmp" "integer-simple" "base"
98+ "deepseq" "array" "ghc-boot-th" "pretty" "template-haskell"
99+ "ghc-boot" "binary" "bytestring" "filepath" "directory" "containers"
100+ "time" "unix" "Win32" ];
101+ }
102+ {
103+ packages.Cabal.patches = [ ./../overlays/patches/Cabal/fix-data-dir.patch ];
104+ packages.ghcjs.doHaddock = false;
105+ packages.haddock-ghcjs.doHaddock = false;
106+ packages.haddock-api-ghcjs.doHaddock = false;
107+ packages.ghcjs.flags.no-wrapper-install = true;
108+ # set use-host-template-haskell. This *does*
109+ # work as we use a patched ghc to boot anyway.
110+ # (we apply https://github.com/ghcjs/ghc/commit/2918d88d4ef786b5f2801f6f77ac333cc56dde75 already)
111+ packages.ghcjs.flags.use-host-template-haskell = true;
112+ packages.ghc-api-ghcjs.flags.use-host-template-haskell = true;
113+ packages.ghcjs-th.flags.use-host-template-haskell = true;
114+ packages.ghc.flags.ghci = true;
115+ packages.ghci.flags.ghci = true;
116+ # packages.ghcjs.components.library.configureFlags = [ "-fno-wrapper-install" ];
117+ }
118+ ];
119+ });
120+in ghcjsProject // {
121+ # Add `configureInputs` and `bootInputs` to the shell
122+ hsPkgs = ghcjsProject.hsPkgs // {
123+ # Shell suitable for configuring and building a local copy of GHCJS
124+ shellFor = args: (ghcjsProject.hsPkgs.shellFor args).overrideAttrs (drv: {
125+ buildInputs = (drv.buildInputs or []) ++ configureInputs;
126+ nativeBuildInputs = (drv.nativeBuildInputs or []) ++ bootInputs;
127+ });
128+ };
129+ inherit configureInputs bootInputs configured-src;
130+}
131+
materialized/ghcjs/.plan.nix/ghc-api-ghcjs.nixnew file+620
@@ -0,0 +1,620 @@
1+let
2+ buildDepError = pkg:
3+ builtins.throw ''
4+ The Haskell package set does not contain the package: ${pkg} (build dependency).
5+
6+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
7+ '';
8+ sysDepError = pkg:
9+ builtins.throw ''
10+ The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11+
12+ You may need to augment the system package mapping in haskell.nix so that it can be found.
13+ '';
14+ pkgConfDepError = pkg:
15+ builtins.throw ''
16+ The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17+
18+ You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
19+ '';
20+ exeDepError = pkg:
21+ builtins.throw ''
22+ The local executable components do not include the component: ${pkg} (executable dependency).
23+ '';
24+ legacyExeDepError = pkg:
25+ builtins.throw ''
26+ The Haskell package set does not contain the package: ${pkg} (executable dependency).
27+
28+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
29+ '';
30+ buildToolDepError = pkg:
31+ builtins.throw ''
32+ Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33+
34+ If this is a system dependency:
35+ You may need to augment the system package mapping in haskell.nix so that it can be found.
36+
37+ If this is a Haskell dependency:
38+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
39+ '';
40+in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
41+ {
42+ flags = {
43+ debug = false;
44+ ghci = true;
45+ stage1 = false;
46+ stage2 = true;
47+ stage3 = false;
48+ terminfo = true;
49+ use-host-template-haskell = false;
50+ };
51+ package = {
52+ specVersion = "2.0";
53+ identifier = { name = "ghc-api-ghcjs"; version = "8.6.5"; };
54+ license = "BSD-3-Clause";
55+ copyright = "";
56+ maintainer = "glasgow-haskell-users@haskell.org";
57+ author = "The GHC Team";
58+ homepage = "http://www.haskell.org/ghc/";
59+ url = "";
60+ synopsis = "The GHC API (customized for GHCJS)";
61+ description = "GHC's functionality can be useful for more things than just\ncompiling Haskell programs. Important use cases are programs\nthat analyse (and perhaps transform) Haskell code. Others\ninclude loading Haskell code dynamically in a GHCi-like manner.\nFor this reason, a lot of GHC's functionality is made available\nthrough this package.";
62+ buildType = "Simple";
63+ isLocal = true;
64+ detailLevel = "FullDetails";
65+ licenseFiles = [ "LICENSE" ];
66+ dataDir = "";
67+ dataFiles = [];
68+ extraSrcFiles = [
69+ "compiler/utils/md5.h"
70+ "compiler/Unique.h"
71+ "compiler/HsVersions.h"
72+ "compiler/nativeGen/NCG.h"
73+ "compiler/parser/cutils.h"
74+ "compiler/utils/md5.h"
75+ "includes/CodeGen.Platform.hs"
76+ "autogen/Config.hs"
77+ "autogen/864/Config.hs"
78+ "autogen/863/Config.hs"
79+ "includes/GHCConstantsHaskellExports.hs"
80+ "includes/GHCConstantsHaskellType.hs"
81+ "includes/GHCConstantsHaskellWrappers.hs"
82+ "includes/*.h"
83+ "includes/*.hs-incl"
84+ "includes/rts/*.h"
85+ "includes/rts/storage/*.h"
86+ "includes/stg/*.h"
87+ ];
88+ extraTmpFiles = [];
89+ extraDocFiles = [];
90+ };
91+ components = {
92+ "library" = {
93+ depends = ([
94+ (hsPkgs."base" or (buildDepError "base"))
95+ (hsPkgs."deepseq" or (buildDepError "deepseq"))
96+ (hsPkgs."directory" or (buildDepError "directory"))
97+ (hsPkgs."process" or (buildDepError "process"))
98+ (hsPkgs."bytestring" or (buildDepError "bytestring"))
99+ (hsPkgs."binary" or (buildDepError "binary"))
100+ (hsPkgs."time" or (buildDepError "time"))
101+ (hsPkgs."containers" or (buildDepError "containers"))
102+ (hsPkgs."array" or (buildDepError "array"))
103+ (hsPkgs."filepath" or (buildDepError "filepath"))
104+ (hsPkgs."hpc" or (buildDepError "hpc"))
105+ (hsPkgs."transformers" or (buildDepError "transformers"))
106+ (hsPkgs."ghc-boot" or (buildDepError "ghc-boot"))
107+ (hsPkgs."ghc-boot-th" or (buildDepError "ghc-boot-th"))
108+ (hsPkgs."ghc-heap" or (buildDepError "ghc-heap"))
109+ ] ++ (if flags.use-host-template-haskell || compiler.isGhcjs && true
110+ then [
111+ (hsPkgs."template-haskell" or (buildDepError "template-haskell"))
112+ (hsPkgs."ghci" or (buildDepError "ghci"))
113+ ]
114+ else [
115+ (hsPkgs."template-haskell-ghcjs" or (buildDepError "template-haskell-ghcjs"))
116+ (hsPkgs."ghci-ghcjs" or (buildDepError "ghci-ghcjs"))
117+ ])) ++ (if system.isWindows
118+ then [ (hsPkgs."Win32" or (buildDepError "Win32")) ]
119+ else [
120+ (hsPkgs."unix" or (buildDepError "unix"))
121+ ] ++ (pkgs.lib).optional (flags.terminfo) (hsPkgs."terminfo" or (buildDepError "terminfo")));
122+ build-tools = [
123+ (hsPkgs.buildPackages.happy or (pkgs.buildPackages.happy or (buildToolDepError "happy")))
124+ (hsPkgs.buildPackages.alex or (pkgs.buildPackages.alex or (buildToolDepError "alex")))
125+ (hsPkgs.buildPackages.alex or (pkgs.buildPackages.alex or (buildToolDepError "alex")))
126+ (hsPkgs.buildPackages.happy or (pkgs.buildPackages.happy or (buildToolDepError "happy")))
127+ ];
128+ buildable = true;
129+ modules = [
130+ "GhcPrelude"
131+ "Ar"
132+ "FileCleanup"
133+ "DriverBkp"
134+ "BkpSyn"
135+ "NameShape"
136+ "RnModIface"
137+ "Avail"
138+ "AsmUtils"
139+ "BasicTypes"
140+ "ConLike"
141+ "DataCon"
142+ "PatSyn"
143+ "Demand"
144+ "Debug"
145+ "Exception"
146+ "FieldLabel"
147+ "GhcMonad"
148+ "Hooks"
149+ "Id"
150+ "IdInfo"
151+ "Lexeme"
152+ "Literal"
153+ "Llvm"
154+ "Llvm/AbsSyn"
155+ "Llvm/MetaData"
156+ "Llvm/PpLlvm"
157+ "Llvm/Types"
158+ "LlvmCodeGen"
159+ "LlvmCodeGen/Base"
160+ "LlvmCodeGen/CodeGen"
161+ "LlvmCodeGen/Data"
162+ "LlvmCodeGen/Ppr"
163+ "LlvmCodeGen/Regs"
164+ "LlvmMangler"
165+ "MkId"
166+ "Module"
167+ "Name"
168+ "NameEnv"
169+ "NameSet"
170+ "OccName"
171+ "RdrName"
172+ "NameCache"
173+ "SrcLoc"
174+ "UniqSupply"
175+ "Unique"
176+ "Var"
177+ "VarEnv"
178+ "VarSet"
179+ "UnVarGraph"
180+ "BlockId"
181+ "CLabel"
182+ "Cmm"
183+ "CmmBuildInfoTables"
184+ "CmmPipeline"
185+ "CmmCallConv"
186+ "CmmCommonBlockElim"
187+ "CmmImplementSwitchPlans"
188+ "CmmContFlowOpt"
189+ "CmmExpr"
190+ "CmmInfo"
191+ "CmmLex"
192+ "CmmLint"
193+ "CmmLive"
194+ "CmmMachOp"
195+ "CmmMonad"
196+ "CmmSwitch"
197+ "CmmNode"
198+ "CmmOpt"
199+ "CmmParse"
200+ "CmmProcPoint"
201+ "CmmSink"
202+ "CmmType"
203+ "CmmUtils"
204+ "CmmLayoutStack"
205+ "EnumSet"
206+ "MkGraph"
207+ "PprBase"
208+ "PprC"
209+ "PprCmm"
210+ "PprCmmDecl"
211+ "PprCmmExpr"
212+ "Bitmap"
213+ "CodeGen/Platform"
214+ "CodeGen/Platform/ARM"
215+ "CodeGen/Platform/ARM64"
216+ "CodeGen/Platform/NoRegs"
217+ "CodeGen/Platform/PPC"
218+ "CodeGen/Platform/PPC_Darwin"
219+ "CodeGen/Platform/SPARC"
220+ "CodeGen/Platform/X86"
221+ "CodeGen/Platform/X86_64"
222+ "CgUtils"
223+ "StgCmm"
224+ "StgCmmBind"
225+ "StgCmmClosure"
226+ "StgCmmCon"
227+ "StgCmmEnv"
228+ "StgCmmExpr"
229+ "StgCmmForeign"
230+ "StgCmmHeap"
231+ "StgCmmHpc"
232+ "StgCmmArgRep"
233+ "StgCmmLayout"
234+ "StgCmmMonad"
235+ "StgCmmPrim"
236+ "StgCmmProf"
237+ "StgCmmTicky"
238+ "StgCmmUtils"
239+ "StgCmmExtCode"
240+ "SMRep"
241+ "CoreArity"
242+ "CoreFVs"
243+ "CoreLint"
244+ "CorePrep"
245+ "CoreSubst"
246+ "CoreOpt"
247+ "CoreSyn"
248+ "TrieMap"
249+ "CoreTidy"
250+ "CoreUnfold"
251+ "CoreUtils"
252+ "CoreMap"
253+ "CoreSeq"
254+ "CoreStats"
255+ "MkCore"
256+ "PprCore"
257+ "PmExpr"
258+ "TmOracle"
259+ "Check"
260+ "Coverage"
261+ "Desugar"
262+ "DsArrows"
263+ "DsBinds"
264+ "DsCCall"
265+ "DsExpr"
266+ "DsForeign"
267+ "DsGRHSs"
268+ "DsListComp"
269+ "DsMonad"
270+ "DsUsage"
271+ "DsUtils"
272+ "ExtractDocs"
273+ "Match"
274+ "MatchCon"
275+ "MatchLit"
276+ "HsBinds"
277+ "HsDecls"
278+ "HsDoc"
279+ "HsExpr"
280+ "HsImpExp"
281+ "HsLit"
282+ "PlaceHolder"
283+ "HsExtension"
284+ "HsInstances"
285+ "HsPat"
286+ "HsSyn"
287+ "HsTypes"
288+ "HsUtils"
289+ "HsDumpAst"
290+ "BinIface"
291+ "BinFingerprint"
292+ "BuildTyCl"
293+ "IfaceEnv"
294+ "IfaceSyn"
295+ "IfaceType"
296+ "ToIface"
297+ "LoadIface"
298+ "MkIface"
299+ "TcIface"
300+ "FlagChecker"
301+ "Annotations"
302+ "CmdLineParser"
303+ "CodeOutput"
304+ "Config"
305+ "Constants"
306+ "DriverMkDepend"
307+ "DriverPhases"
308+ "PipelineMonad"
309+ "DriverPipeline"
310+ "DynFlags"
311+ "ErrUtils"
312+ "Finder"
313+ "GHC"
314+ "GhcMake"
315+ "GhcPlugins"
316+ "DynamicLoading"
317+ "HeaderInfo"
318+ "HscMain"
319+ "HscStats"
320+ "HscTypes"
321+ "InteractiveEval"
322+ "InteractiveEvalTypes"
323+ "PackageConfig"
324+ "Packages"
325+ "PlatformConstants"
326+ "Plugins"
327+ "TcPluginM"
328+ "PprTyThing"
329+ "StaticPtrTable"
330+ "SysTools"
331+ "SysTools/BaseDir"
332+ "SysTools/Terminal"
333+ "SysTools/ExtraObj"
334+ "SysTools/Info"
335+ "SysTools/Process"
336+ "SysTools/Tasks"
337+ "Elf"
338+ "TidyPgm"
339+ "Ctype"
340+ "HaddockUtils"
341+ "Lexer"
342+ "OptCoercion"
343+ "Parser"
344+ "RdrHsSyn"
345+ "ApiAnnotation"
346+ "ForeignCall"
347+ "KnownUniques"
348+ "PrelInfo"
349+ "PrelNames"
350+ "PrelRules"
351+ "PrimOp"
352+ "TysPrim"
353+ "TysWiredIn"
354+ "CostCentre"
355+ "CostCentreState"
356+ "ProfInit"
357+ "RnBinds"
358+ "RnEnv"
359+ "RnExpr"
360+ "RnHsDoc"
361+ "RnNames"
362+ "RnPat"
363+ "RnSource"
364+ "RnSplice"
365+ "RnTypes"
366+ "RnFixity"
367+ "RnUtils"
368+ "RnUnbound"
369+ "CoreMonad"
370+ "CSE"
371+ "FloatIn"
372+ "FloatOut"
373+ "LiberateCase"
374+ "OccurAnal"
375+ "SAT"
376+ "SetLevels"
377+ "SimplCore"
378+ "SimplEnv"
379+ "SimplMonad"
380+ "SimplUtils"
381+ "Simplify"
382+ "SimplStg"
383+ "StgStats"
384+ "StgCse"
385+ "UnariseStg"
386+ "RepType"
387+ "Rules"
388+ "SpecConstr"
389+ "Specialise"
390+ "CoreToStg"
391+ "StgLint"
392+ "StgSyn"
393+ "CallArity"
394+ "DmdAnal"
395+ "Exitify"
396+ "WorkWrap"
397+ "WwLib"
398+ "FamInst"
399+ "Inst"
400+ "TcAnnotations"
401+ "TcArrows"
402+ "TcBinds"
403+ "TcSigs"
404+ "TcClassDcl"
405+ "TcDefaults"
406+ "TcDeriv"
407+ "TcDerivInfer"
408+ "TcDerivUtils"
409+ "TcEnv"
410+ "TcExpr"
411+ "TcForeign"
412+ "TcGenDeriv"
413+ "TcGenFunctor"
414+ "TcGenGenerics"
415+ "TcHsSyn"
416+ "TcHsType"
417+ "TcInstDcls"
418+ "TcMType"
419+ "TcValidity"
420+ "TcMatches"
421+ "TcPat"
422+ "TcPatSyn"
423+ "TcRnDriver"
424+ "TcBackpack"
425+ "TcRnExports"
426+ "TcRnMonad"
427+ "TcRnTypes"
428+ "TcRules"
429+ "TcSimplify"
430+ "TcHoleErrors"
431+ "TcErrors"
432+ "TcTyClsDecls"
433+ "TcTyDecls"
434+ "TcTypeable"
435+ "TcType"
436+ "TcEvidence"
437+ "TcEvTerm"
438+ "TcUnify"
439+ "TcInteract"
440+ "TcCanonical"
441+ "TcFlatten"
442+ "TcSMonad"
443+ "TcTypeNats"
444+ "TcSplice"
445+ "Class"
446+ "Coercion"
447+ "DsMeta"
448+ "THNames"
449+ "FamInstEnv"
450+ "FunDeps"
451+ "InstEnv"
452+ "TyCon"
453+ "CoAxiom"
454+ "Kind"
455+ "Type"
456+ "TyCoRep"
457+ "Unify"
458+ "Bag"
459+ "Binary"
460+ "BooleanFormula"
461+ "BufWrite"
462+ "Digraph"
463+ "Encoding"
464+ "FastFunctions"
465+ "FastMutInt"
466+ "FastString"
467+ "FastStringEnv"
468+ "Fingerprint"
469+ "FiniteMap"
470+ "FV"
471+ "GraphBase"
472+ "GraphColor"
473+ "GraphOps"
474+ "GraphPpr"
475+ "IOEnv"
476+ "Json"
477+ "ListSetOps"
478+ "ListT"
479+ "Maybes"
480+ "MonadUtils"
481+ "OrdList"
482+ "Outputable"
483+ "Pair"
484+ "Panic"
485+ "PprColour"
486+ "Pretty"
487+ "State"
488+ "Stream"
489+ "StringBuffer"
490+ "UniqDFM"
491+ "UniqDSet"
492+ "UniqFM"
493+ "UniqMap"
494+ "UniqSet"
495+ "Util"
496+ "Hoopl/Block"
497+ "Hoopl/Collections"
498+ "Hoopl/Dataflow"
499+ "Hoopl/Graph"
500+ "Hoopl/Label"
501+ "AsmCodeGen"
502+ "TargetReg"
503+ "NCGMonad"
504+ "Instruction"
505+ "Format"
506+ "Reg"
507+ "RegClass"
508+ "PIC"
509+ "Platform"
510+ "CPrim"
511+ "X86/Regs"
512+ "X86/RegInfo"
513+ "X86/Instr"
514+ "X86/Cond"
515+ "X86/Ppr"
516+ "X86/CodeGen"
517+ "PPC/Regs"
518+ "PPC/RegInfo"
519+ "PPC/Instr"
520+ "PPC/Cond"
521+ "PPC/Ppr"
522+ "PPC/CodeGen"
523+ "SPARC/Base"
524+ "SPARC/Regs"
525+ "SPARC/Imm"
526+ "SPARC/AddrMode"
527+ "SPARC/Cond"
528+ "SPARC/Instr"
529+ "SPARC/Stack"
530+ "SPARC/ShortcutJump"
531+ "SPARC/Ppr"
532+ "SPARC/CodeGen"
533+ "SPARC/CodeGen/Amode"
534+ "SPARC/CodeGen/Base"
535+ "SPARC/CodeGen/CondCode"
536+ "SPARC/CodeGen/Gen32"
537+ "SPARC/CodeGen/Gen64"
538+ "SPARC/CodeGen/Sanity"
539+ "SPARC/CodeGen/Expand"
540+ "RegAlloc/Liveness"
541+ "RegAlloc/Graph/Main"
542+ "RegAlloc/Graph/Stats"
543+ "RegAlloc/Graph/ArchBase"
544+ "RegAlloc/Graph/ArchX86"
545+ "RegAlloc/Graph/Coalesce"
546+ "RegAlloc/Graph/Spill"
547+ "RegAlloc/Graph/SpillClean"
548+ "RegAlloc/Graph/SpillCost"
549+ "RegAlloc/Graph/TrivColorable"
550+ "RegAlloc/Linear/Main"
551+ "RegAlloc/Linear/JoinToTargets"
552+ "RegAlloc/Linear/State"
553+ "RegAlloc/Linear/Stats"
554+ "RegAlloc/Linear/FreeRegs"
555+ "RegAlloc/Linear/StackMap"
556+ "RegAlloc/Linear/Base"
557+ "RegAlloc/Linear/X86/FreeRegs"
558+ "RegAlloc/Linear/X86_64/FreeRegs"
559+ "RegAlloc/Linear/PPC/FreeRegs"
560+ "RegAlloc/Linear/SPARC/FreeRegs"
561+ "Dwarf"
562+ "Dwarf/Types"
563+ "Dwarf/Constants"
564+ "Convert"
565+ "ByteCodeTypes"
566+ "ByteCodeAsm"
567+ "ByteCodeGen"
568+ "ByteCodeInstr"
569+ "ByteCodeItbls"
570+ "ByteCodeLink"
571+ "Debugger"
572+ "Linker"
573+ "RtClosureInspect"
574+ "GHCi"
575+ ];
576+ cSources = [
577+ "compiler/parser/cutils.c"
578+ "compiler/ghci/keepCAFsForGHCi.c"
579+ "compiler/cbits/genSym.c"
580+ ];
581+ hsSourceDirs = [
582+ "compiler/backpack"
583+ "compiler/basicTypes"
584+ "compiler/cmm"
585+ "compiler/codeGen"
586+ "compiler/coreSyn"
587+ "compiler/deSugar"
588+ "compiler/ghci"
589+ "compiler/hsSyn"
590+ "compiler/iface"
591+ "compiler/llvmGen"
592+ "compiler/main"
593+ "compiler/nativeGen"
594+ "compiler/parser"
595+ "compiler/prelude"
596+ "compiler/profiling"
597+ "compiler/rename"
598+ "compiler/simplCore"
599+ "compiler/simplStg"
600+ "compiler/specialise"
601+ "compiler/stgSyn"
602+ "compiler/stranal"
603+ "compiler/typecheck"
604+ "compiler/types"
605+ "compiler/utils"
606+ ] ++ (if compiler.isGhc && (compiler.version).eq "8.6.3"
607+ then [ "autogen/863" ]
608+ else if compiler.isGhc && (compiler.version).eq "8.6.4"
609+ then [ "autogen/864" ]
610+ else [ "autogen" ]);
611+ includeDirs = [
612+ "compiler"
613+ "compiler/parser"
614+ "compiler/utils"
615+ "includes"
616+ "autogen"
617+ ];
618+ };
619+ };
620+ } // rec { src = (pkgs.lib).mkDefault ../lib/ghc-api-ghcjs; }
materialized/ghcjs/.plan.nix/ghci-ghcjs.nixnew file+101
@@ -0,0 +1,101 @@
1+let
2+ buildDepError = pkg:
3+ builtins.throw ''
4+ The Haskell package set does not contain the package: ${pkg} (build dependency).
5+
6+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
7+ '';
8+ sysDepError = pkg:
9+ builtins.throw ''
10+ The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11+
12+ You may need to augment the system package mapping in haskell.nix so that it can be found.
13+ '';
14+ pkgConfDepError = pkg:
15+ builtins.throw ''
16+ The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17+
18+ You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
19+ '';
20+ exeDepError = pkg:
21+ builtins.throw ''
22+ The local executable components do not include the component: ${pkg} (executable dependency).
23+ '';
24+ legacyExeDepError = pkg:
25+ builtins.throw ''
26+ The Haskell package set does not contain the package: ${pkg} (executable dependency).
27+
28+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
29+ '';
30+ buildToolDepError = pkg:
31+ builtins.throw ''
32+ Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33+
34+ If this is a system dependency:
35+ You may need to augment the system package mapping in haskell.nix so that it can be found.
36+
37+ If this is a Haskell dependency:
38+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
39+ '';
40+in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
41+ {
42+ flags = { ghci = true; };
43+ package = {
44+ specVersion = "1.10";
45+ identifier = { name = "ghci-ghcjs"; version = "8.6.1"; };
46+ license = "BSD-3-Clause";
47+ copyright = "";
48+ maintainer = "ghc-devs@haskell.org";
49+ author = "";
50+ homepage = "";
51+ url = "";
52+ synopsis = "The library supporting GHC's interactive interpreter (customized for GHCJS)";
53+ description = "This library offers interfaces which mediate interactions between the\n@ghci@ interactive shell and @iserv@, GHC's out-of-process interpreter\nbackend.";
54+ buildType = "Simple";
55+ isLocal = true;
56+ detailLevel = "FullDetails";
57+ licenseFiles = [ "LICENSE" ];
58+ dataDir = "";
59+ dataFiles = [];
60+ extraSrcFiles = [ "changelog.md" ];
61+ extraTmpFiles = [];
62+ extraDocFiles = [];
63+ };
64+ components = {
65+ "library" = {
66+ depends = [
67+ (hsPkgs."array" or (buildDepError "array"))
68+ (hsPkgs."base" or (buildDepError "base"))
69+ (hsPkgs."binary" or (buildDepError "binary"))
70+ (hsPkgs."bytestring" or (buildDepError "bytestring"))
71+ (hsPkgs."containers" or (buildDepError "containers"))
72+ (hsPkgs."deepseq" or (buildDepError "deepseq"))
73+ (hsPkgs."filepath" or (buildDepError "filepath"))
74+ (hsPkgs."ghc-boot" or (buildDepError "ghc-boot"))
75+ (hsPkgs."ghc-boot-th" or (buildDepError "ghc-boot-th"))
76+ (hsPkgs."ghc-heap" or (buildDepError "ghc-heap"))
77+ (hsPkgs."template-haskell-ghcjs" or (buildDepError "template-haskell-ghcjs"))
78+ (hsPkgs."transformers" or (buildDepError "transformers"))
79+ ] ++ (pkgs.lib).optional (!system.isWindows) (hsPkgs."unix" or (buildDepError "unix"));
80+ buildable = true;
81+ modules = [
82+ "GHCi/BreakArray"
83+ "GHCi/BinaryArray"
84+ "GHCi/Message"
85+ "GHCi/ResolvedBCO"
86+ "GHCi/RemoteTypes"
87+ "GHCi/FFI"
88+ "GHCi/InfoTable"
89+ "GHCi/StaticPtrTable"
90+ "GHCi/TH/Binary"
91+ "SizedSeq"
92+ ] ++ (pkgs.lib).optionals (flags.ghci) [
93+ "GHCi/Run"
94+ "GHCi/CreateBCO"
95+ "GHCi/ObjLink"
96+ "GHCi/Signals"
97+ "GHCi/TH"
98+ ];
99+ };
100+ };
101+ } // rec { src = (pkgs.lib).mkDefault ../lib/ghci-ghcjs; }
materialized/ghcjs/.plan.nix/ghcjs-th.nixnew file+89
@@ -0,0 +1,89 @@
1+let
2+ buildDepError = pkg:
3+ builtins.throw ''
4+ The Haskell package set does not contain the package: ${pkg} (build dependency).
5+
6+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
7+ '';
8+ sysDepError = pkg:
9+ builtins.throw ''
10+ The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11+
12+ You may need to augment the system package mapping in haskell.nix so that it can be found.
13+ '';
14+ pkgConfDepError = pkg:
15+ builtins.throw ''
16+ The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17+
18+ You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
19+ '';
20+ exeDepError = pkg:
21+ builtins.throw ''
22+ The local executable components do not include the component: ${pkg} (executable dependency).
23+ '';
24+ legacyExeDepError = pkg:
25+ builtins.throw ''
26+ The Haskell package set does not contain the package: ${pkg} (executable dependency).
27+
28+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
29+ '';
30+ buildToolDepError = pkg:
31+ builtins.throw ''
32+ Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33+
34+ If this is a system dependency:
35+ You may need to augment the system package mapping in haskell.nix so that it can be found.
36+
37+ If this is a Haskell dependency:
38+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
39+ '';
40+in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
41+ {
42+ flags = { use-host-template-haskell = false; };
43+ package = {
44+ specVersion = "1.10";
45+ identifier = { name = "ghcjs-th"; version = "0.1.0.0"; };
46+ license = "MIT";
47+ copyright = "";
48+ maintainer = "stegeman@gmail.com";
49+ author = "Luite Stegeman";
50+ homepage = "http://github.com/ghcjs";
51+ url = "";
52+ synopsis = "";
53+ description = "";
54+ buildType = "Simple";
55+ isLocal = true;
56+ detailLevel = "FullDetails";
57+ licenseFiles = [ "LICENSE" ];
58+ dataDir = "";
59+ dataFiles = [];
60+ extraSrcFiles = [];
61+ extraTmpFiles = [];
62+ extraDocFiles = [];
63+ };
64+ components = {
65+ "library" = {
66+ depends = [
67+ (hsPkgs."base" or (buildDepError "base"))
68+ (hsPkgs."ghc-prim" or (buildDepError "ghc-prim"))
69+ (hsPkgs."binary" or (buildDepError "binary"))
70+ (hsPkgs."bytestring" or (buildDepError "bytestring"))
71+ (hsPkgs."containers" or (buildDepError "containers"))
72+ ] ++ (if compiler.isGhcjs && true || flags.use-host-template-haskell
73+ then [
74+ (hsPkgs."template-haskell" or (buildDepError "template-haskell"))
75+ (hsPkgs."ghci" or (buildDepError "ghci"))
76+ ]
77+ else [
78+ (hsPkgs."template-haskell-ghcjs" or (buildDepError "template-haskell-ghcjs"))
79+ (hsPkgs."ghci-ghcjs" or (buildDepError "ghci-ghcjs"))
80+ ]);
81+ buildable = true;
82+ modules = [
83+ "GHCJS/Prim/TH/Eval"
84+ "GHCJS/Prim/TH/Serialized"
85+ "GHCJS/Prim/TH/Types"
86+ ];
87+ };
88+ };
89+ } // rec { src = (pkgs.lib).mkDefault ../lib/ghcjs-th; }
materialized/ghcjs/.plan.nix/ghcjs.nixnew file+362
@@ -0,0 +1,362 @@
1+let
2+ buildDepError = pkg:
3+ builtins.throw ''
4+ The Haskell package set does not contain the package: ${pkg} (build dependency).
5+
6+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
7+ '';
8+ sysDepError = pkg:
9+ builtins.throw ''
10+ The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11+
12+ You may need to augment the system package mapping in haskell.nix so that it can be found.
13+ '';
14+ pkgConfDepError = pkg:
15+ builtins.throw ''
16+ The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17+
18+ You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
19+ '';
20+ exeDepError = pkg:
21+ builtins.throw ''
22+ The local executable components do not include the component: ${pkg} (executable dependency).
23+ '';
24+ legacyExeDepError = pkg:
25+ builtins.throw ''
26+ The Haskell package set does not contain the package: ${pkg} (executable dependency).
27+
28+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
29+ '';
30+ buildToolDepError = pkg:
31+ builtins.throw ''
32+ Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33+
34+ If this is a system dependency:
35+ You may need to augment the system package mapping in haskell.nix so that it can be found.
36+
37+ If this is a Haskell dependency:
38+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
39+ '';
40+in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
41+ {
42+ flags = {
43+ compiler-only = false;
44+ no-wrapper-install = false;
45+ disable-optimizer = false;
46+ runtime-assertions = false;
47+ use-host-template-haskell = false;
48+ };
49+ package = {
50+ specVersion = "2.0";
51+ identifier = { name = "ghcjs"; version = "8.6.5"; };
52+ license = "MIT";
53+ copyright = "Victor Nazarov, Hamish Mackenzie, Luite Stegeman";
54+ maintainer = "Luite Stegeman <stegeman@gmail.com>";
55+ author = "Victor Nazarov, Hamish Mackenzie, Luite Stegeman";
56+ homepage = "";
57+ url = "";
58+ synopsis = "Haskell to JavaScript compiler";
59+ description = "Haskell to JavaScript compiler based on GHC";
60+ buildType = "Custom";
61+ isLocal = true;
62+ setup-depends = [
63+ (hsPkgs.buildPackages.base or (pkgs.buildPackages.base or (buildToolDepError "base")))
64+ (hsPkgs.buildPackages.Cabal or (pkgs.buildPackages.Cabal or (buildToolDepError "Cabal")))
65+ (hsPkgs.buildPackages.containers or (pkgs.buildPackages.containers or (buildToolDepError "containers")))
66+ (hsPkgs.buildPackages.filepath or (pkgs.buildPackages.filepath or (buildToolDepError "filepath")))
67+ (hsPkgs.buildPackages.directory or (pkgs.buildPackages.directory or (buildToolDepError "directory")))
68+ (hsPkgs.buildPackages.process or (pkgs.buildPackages.process or (buildToolDepError "process")))
69+ (hsPkgs.buildPackages.template-haskell or (pkgs.buildPackages.template-haskell or (buildToolDepError "template-haskell")))
70+ (hsPkgs.buildPackages.transformers or (pkgs.buildPackages.transformers or (buildToolDepError "transformers")))
71+ ];
72+ detailLevel = "FullDetails";
73+ licenseFiles = [ "LICENSE" ];
74+ dataDir = "data";
75+ dataFiles = [ "*.tar" "bin/*.sh" "bin/*.exe.options" ];
76+ extraSrcFiles = [
77+ "utils/*.hs"
78+ "utils/*.sh"
79+ "include/prim/*.hs-incl"
80+ "include/prim/*.txt"
81+ "include/*.h"
82+ "src-bin/haddock/*.hs"
83+ "HACKING.markdown"
84+ "README.markdown"
85+ "test/LICENSE"
86+ "test/ghcjs-testsuite.cabal"
87+ "stack.yaml"
88+ ];
89+ extraTmpFiles = [];
90+ extraDocFiles = [];
91+ };
92+ components = {
93+ "library" = {
94+ depends = [
95+ (hsPkgs."base" or (buildDepError "base"))
96+ (hsPkgs."Cabal" or (buildDepError "Cabal"))
97+ (hsPkgs."ghc-api-ghcjs" or (buildDepError "ghc-api-ghcjs"))
98+ (hsPkgs."ghcjs-th" or (buildDepError "ghcjs-th"))
99+ (hsPkgs."ghc-boot" or (buildDepError "ghc-boot"))
100+ (hsPkgs."directory" or (buildDepError "directory"))
101+ (hsPkgs."filepath" or (buildDepError "filepath"))
102+ (hsPkgs."containers" or (buildDepError "containers"))
103+ (hsPkgs."process" or (buildDepError "process"))
104+ (hsPkgs."mtl" or (buildDepError "mtl"))
105+ (hsPkgs."ghc-paths" or (buildDepError "ghc-paths"))
106+ (hsPkgs."template-haskell" or (buildDepError "template-haskell"))
107+ (hsPkgs."syb" or (buildDepError "syb"))
108+ (hsPkgs."bytestring" or (buildDepError "bytestring"))
109+ (hsPkgs."attoparsec" or (buildDepError "attoparsec"))
110+ (hsPkgs."aeson" or (buildDepError "aeson"))
111+ (hsPkgs."text" or (buildDepError "text"))
112+ (hsPkgs."wl-pprint-text" or (buildDepError "wl-pprint-text"))
113+ (hsPkgs."lens" or (buildDepError "lens"))
114+ (hsPkgs."yaml" or (buildDepError "yaml"))
115+ (hsPkgs."time" or (buildDepError "time"))
116+ (hsPkgs."transformers" or (buildDepError "transformers"))
117+ (hsPkgs."split" or (buildDepError "split"))
118+ (hsPkgs."deepseq" or (buildDepError "deepseq"))
119+ (hsPkgs."vector" or (buildDepError "vector"))
120+ (hsPkgs."data-default" or (buildDepError "data-default"))
121+ (hsPkgs."array" or (buildDepError "array"))
122+ (hsPkgs."binary" or (buildDepError "binary"))
123+ (hsPkgs."unordered-containers" or (buildDepError "unordered-containers"))
124+ (hsPkgs."parallel" or (buildDepError "parallel"))
125+ (hsPkgs."cryptohash" or (buildDepError "cryptohash"))
126+ (hsPkgs."hashable" or (buildDepError "hashable"))
127+ (hsPkgs."optparse-applicative" or (buildDepError "optparse-applicative"))
128+ (hsPkgs."stringsearch" or (buildDepError "stringsearch"))
129+ (hsPkgs."base16-bytestring" or (buildDepError "base16-bytestring"))
130+ (hsPkgs."base64-bytestring" or (buildDepError "base64-bytestring"))
131+ (hsPkgs."regex-posix" or (buildDepError "regex-posix"))
132+ (hsPkgs."safe" or (buildDepError "safe"))
133+ (hsPkgs."parsec" or (buildDepError "parsec"))
134+ (hsPkgs."haskell-src-exts" or (buildDepError "haskell-src-exts"))
135+ (hsPkgs."haskell-src-meta" or (buildDepError "haskell-src-meta"))
136+ ] ++ (if flags.use-host-template-haskell
137+ then [ (hsPkgs."ghci" or (buildDepError "ghci")) ]
138+ else [
139+ (hsPkgs."template-haskell-ghcjs" or (buildDepError "template-haskell-ghcjs"))
140+ (hsPkgs."ghci-ghcjs" or (buildDepError "ghci-ghcjs"))
141+ ]);
142+ buildable = true;
143+ modules = [
144+ "Paths_ghcjs"
145+ "Gen2/Generator"
146+ "Gen2/Profiling"
147+ "Gen2/Floater"
148+ "Gen2/Prim"
149+ "Gen2/Rts"
150+ "Gen2/RtsApply"
151+ "Gen2/RtsTypes"
152+ "Gen2/RtsAlloc"
153+ "Gen2/Utils"
154+ "Gen2/StgAst"
155+ "Gen2/Optimizer"
156+ "Gen2/Dataflow"
157+ "Gen2/Deps"
158+ "Gen2/Printer"
159+ "Gen2/Linker"
160+ "Gen2/Shim"
161+ "Gen2/Compactor"
162+ "Gen2/Object"
163+ "Gen2/Archive"
164+ "Gen2/ClosureInfo"
165+ "Gen2/Foreign"
166+ "Gen2/Sinker"
167+ "Gen2/TH"
168+ "Gen2/Base"
169+ "Gen2/Cache"
170+ "Gen2/DynamicLinking"
171+ "Gen2/GHC/Digraph"
172+ "Gen2/GHC/DsForeign"
173+ "Compiler/Compat"
174+ "Compiler/GhcjsHooks"
175+ "Compiler/GhcjsPlatform"
176+ "Compiler/Info"
177+ "Compiler/Plugins"
178+ "Compiler/Program"
179+ "Compiler/GhcjsProgram"
180+ "Compiler/Settings"
181+ "Compiler/Utils"
182+ "Compiler/Variants"
183+ "Compiler/JMacro"
184+ "Compiler/JMacro/Base"
185+ "Compiler/JMacro/Lens"
186+ "Compiler/JMacro/QQ"
187+ "Compiler/JMacro/ParseTH"
188+ "Compiler/JMacro/Util"
189+ "GHCJS"
190+ ];
191+ hsSourceDirs = [ "src" ];
192+ includeDirs = [ "include" ];
193+ };
194+ exes = {
195+ "ghcjs" = {
196+ depends = [
197+ (hsPkgs."base" or (buildDepError "base"))
198+ (hsPkgs."ghcjs" or (buildDepError "ghcjs"))
199+ ];
200+ buildable = true;
201+ hsSourceDirs = [ "src-bin" ];
202+ mainPath = [ "Main.hs" ];
203+ };
204+ "haddock-ghcjs" = {
205+ depends = [
206+ (hsPkgs."ghc-api-ghcjs" or (buildDepError "ghc-api-ghcjs"))
207+ (hsPkgs."haddock-api-ghcjs" or (buildDepError "haddock-api-ghcjs"))
208+ (hsPkgs."base" or (buildDepError "base"))
209+ (hsPkgs."process" or (buildDepError "process"))
210+ (hsPkgs."transformers" or (buildDepError "transformers"))
211+ (hsPkgs."transformers-compat" or (buildDepError "transformers-compat"))
212+ (hsPkgs."containers" or (buildDepError "containers"))
213+ (hsPkgs."directory" or (buildDepError "directory"))
214+ (hsPkgs."filepath" or (buildDepError "filepath"))
215+ (hsPkgs."ghcjs" or (buildDepError "ghcjs"))
216+ ];
217+ buildable = true;
218+ modules = [ "ResponseFile" ];
219+ hsSourceDirs = [ "src-bin" "src-bin/haddock" ];
220+ mainPath = [
221+ "Haddock.hs"
222+ ] ++ (pkgs.lib).optional (system.isWindows) "";
223+ };
224+ "hsc2hs-ghcjs" = {
225+ depends = [
226+ (hsPkgs."base" or (buildDepError "base"))
227+ (hsPkgs."ghcjs" or (buildDepError "ghcjs"))
228+ (hsPkgs."process" or (buildDepError "process"))
229+ ];
230+ buildable = true;
231+ hsSourceDirs = [ "src-bin" ];
232+ mainPath = [
233+ "Hsc2Hs.hs"
234+ ] ++ (pkgs.lib).optional (system.isWindows) "";
235+ };
236+ "ghcjs-pkg" = {
237+ depends = [
238+ (hsPkgs."ghcjs" or (buildDepError "ghcjs"))
239+ (hsPkgs."base" or (buildDepError "base"))
240+ (hsPkgs."directory" or (buildDepError "directory"))
241+ (hsPkgs."process" or (buildDepError "process"))
242+ (hsPkgs."filepath" or (buildDepError "filepath"))
243+ (hsPkgs."containers" or (buildDepError "containers"))
244+ (hsPkgs."Cabal" or (buildDepError "Cabal"))
245+ (hsPkgs."binary" or (buildDepError "binary"))
246+ (hsPkgs."bytestring" or (buildDepError "bytestring"))
247+ (hsPkgs."ghc-boot" or (buildDepError "ghc-boot"))
248+ ] ++ (pkgs.lib).optionals (!system.isWindows) [
249+ (hsPkgs."unix" or (buildDepError "unix"))
250+ (hsPkgs."terminfo" or (buildDepError "terminfo"))
251+ ];
252+ buildable = if flags.compiler-only then false else true;
253+ cSources = (pkgs.lib).optional (system.isWindows) "cbits/CRT_noglob.c";
254+ hsSourceDirs = [ "src-bin" ];
255+ mainPath = (([
256+ "Pkg.hs"
257+ ] ++ (pkgs.lib).optional (flags.compiler-only) "") ++ (pkgs.lib).optional (!system.isWindows) "") ++ (pkgs.lib).optional (system.isWindows) "";
258+ };
259+ "ghcjs-boot" = {
260+ depends = [
261+ (hsPkgs."base" or (buildDepError "base"))
262+ (hsPkgs."ghcjs" or (buildDepError "ghcjs"))
263+ (hsPkgs."directory" or (buildDepError "directory"))
264+ (hsPkgs."Cabal" or (buildDepError "Cabal"))
265+ (hsPkgs."mtl" or (buildDepError "mtl"))
266+ (hsPkgs."transformers" or (buildDepError "transformers"))
267+ (hsPkgs."lens" or (buildDepError "lens"))
268+ (hsPkgs."unordered-containers" or (buildDepError "unordered-containers"))
269+ (hsPkgs."vector" or (buildDepError "vector"))
270+ (hsPkgs."filepath" or (buildDepError "filepath"))
271+ (hsPkgs."aeson" or (buildDepError "aeson"))
272+ (hsPkgs."text" or (buildDepError "text"))
273+ (hsPkgs."bytestring" or (buildDepError "bytestring"))
274+ (hsPkgs."system-filepath" or (buildDepError "system-filepath"))
275+ (hsPkgs."shelly" or (buildDepError "shelly"))
276+ (hsPkgs."system-fileio" or (buildDepError "system-fileio"))
277+ (hsPkgs."optparse-applicative" or (buildDepError "optparse-applicative"))
278+ (hsPkgs."tar" or (buildDepError "tar"))
279+ (hsPkgs."yaml" or (buildDepError "yaml"))
280+ (hsPkgs."process" or (buildDepError "process"))
281+ (hsPkgs."time" or (buildDepError "time"))
282+ (hsPkgs."unix-compat" or (buildDepError "unix-compat"))
283+ (hsPkgs."executable-path" or (buildDepError "executable-path"))
284+ ];
285+ buildable = if flags.compiler-only then false else true;
286+ hsSourceDirs = [ "src-bin" ];
287+ mainPath = ([
288+ "Boot.hs"
289+ ] ++ (pkgs.lib).optional (flags.compiler-only) "") ++ (pkgs.lib).optional (system.isWindows) "";
290+ };
291+ "ghcjs-run" = {
292+ depends = [
293+ (hsPkgs."base" or (buildDepError "base"))
294+ (hsPkgs."directory" or (buildDepError "directory"))
295+ (hsPkgs."process" or (buildDepError "process"))
296+ (hsPkgs."filepath" or (buildDepError "filepath"))
297+ ];
298+ buildable = if flags.compiler-only then false else true;
299+ hsSourceDirs = [ "src-bin" ];
300+ mainPath = ([
301+ "Run.hs"
302+ ] ++ (pkgs.lib).optional (flags.compiler-only) "") ++ (pkgs.lib).optional (system.isWindows) "";
303+ };
304+ "ghcjs-dumparchive" = {
305+ depends = [
306+ (hsPkgs."base" or (buildDepError "base"))
307+ (hsPkgs."text" or (buildDepError "text"))
308+ (hsPkgs."ghc-api-ghcjs" or (buildDepError "ghc-api-ghcjs"))
309+ (hsPkgs."ghcjs" or (buildDepError "ghcjs"))
310+ (hsPkgs."bytestring" or (buildDepError "bytestring"))
311+ (hsPkgs."filepath" or (buildDepError "filepath"))
312+ ];
313+ buildable = if flags.compiler-only then false else true;
314+ hsSourceDirs = [ "utils" ];
315+ mainPath = ([
316+ "dumpArchive.hs"
317+ ] ++ (pkgs.lib).optional (flags.compiler-only) "") ++ (pkgs.lib).optional (system.isWindows) "";
318+ };
319+ };
320+ tests = {
321+ "test" = {
322+ depends = [
323+ (hsPkgs."base" or (buildDepError "base"))
324+ (hsPkgs."process" or (buildDepError "process"))
325+ (hsPkgs."network" or (buildDepError "network"))
326+ (hsPkgs."aeson" or (buildDepError "aeson"))
327+ (hsPkgs."test-framework" or (buildDepError "test-framework"))
328+ (hsPkgs."test-framework-hunit" or (buildDepError "test-framework-hunit"))
329+ (hsPkgs."HUnit" or (buildDepError "HUnit"))
330+ (hsPkgs."system-filepath" or (buildDepError "system-filepath"))
331+ (hsPkgs."system-fileio" or (buildDepError "system-fileio"))
332+ (hsPkgs."text" or (buildDepError "text"))
333+ (hsPkgs."transformers" or (buildDepError "transformers"))
334+ (hsPkgs."lens" or (buildDepError "lens"))
335+ (hsPkgs."random" or (buildDepError "random"))
336+ (hsPkgs."time" or (buildDepError "time"))
337+ (hsPkgs."bytestring" or (buildDepError "bytestring"))
338+ (hsPkgs."deepseq" or (buildDepError "deepseq"))
339+ (hsPkgs."unordered-containers" or (buildDepError "unordered-containers"))
340+ (hsPkgs."shelly" or (buildDepError "shelly"))
341+ (hsPkgs."data-default" or (buildDepError "data-default"))
342+ (hsPkgs."yaml" or (buildDepError "yaml"))
343+ (hsPkgs."optparse-applicative" or (buildDepError "optparse-applicative"))
344+ (hsPkgs."directory" or (buildDepError "directory"))
345+ (hsPkgs."http-types" or (buildDepError "http-types"))
346+ (hsPkgs."warp" or (buildDepError "warp"))
347+ (hsPkgs."wai" or (buildDepError "wai"))
348+ (hsPkgs."wai-extra" or (buildDepError "wai-extra"))
349+ (hsPkgs."wai-app-static" or (buildDepError "wai-app-static"))
350+ (hsPkgs."wai-websockets" or (buildDepError "wai-websockets"))
351+ (hsPkgs."websockets" or (buildDepError "websockets"))
352+ (hsPkgs."webdriver" or (buildDepError "webdriver"))
353+ (hsPkgs."lifted-base" or (buildDepError "lifted-base"))
354+ ];
355+ buildable = true;
356+ modules = [ "Server" "Client" "Types" ];
357+ hsSourceDirs = [ "test" ];
358+ mainPath = [ "TestRunner.hs" ];
359+ };
360+ };
361+ };
362+ } // rec { src = (pkgs.lib).mkDefault ../.; }
materialized/ghcjs/.plan.nix/haddock-api-ghcjs.nixnew file+215
@@ -0,0 +1,215 @@
1+let
2+ buildDepError = pkg:
3+ builtins.throw ''
4+ The Haskell package set does not contain the package: ${pkg} (build dependency).
5+
6+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
7+ '';
8+ sysDepError = pkg:
9+ builtins.throw ''
10+ The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11+
12+ You may need to augment the system package mapping in haskell.nix so that it can be found.
13+ '';
14+ pkgConfDepError = pkg:
15+ builtins.throw ''
16+ The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17+
18+ You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
19+ '';
20+ exeDepError = pkg:
21+ builtins.throw ''
22+ The local executable components do not include the component: ${pkg} (executable dependency).
23+ '';
24+ legacyExeDepError = pkg:
25+ builtins.throw ''
26+ The Haskell package set does not contain the package: ${pkg} (executable dependency).
27+
28+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
29+ '';
30+ buildToolDepError = pkg:
31+ builtins.throw ''
32+ Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33+
34+ If this is a system dependency:
35+ You may need to augment the system package mapping in haskell.nix so that it can be found.
36+
37+ If this is a Haskell dependency:
38+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
39+ '';
40+in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
41+ {
42+ flags = {};
43+ package = {
44+ specVersion = "2.0";
45+ identifier = { name = "haddock-api-ghcjs"; version = "2.20.0"; };
46+ license = "BSD-3-Clause";
47+ copyright = "(c) Simon Marlow, David Waern";
48+ maintainer = "Alex Biehl <alexbiehl@gmail.com>, Simon Hengel <sol@typeful.net>, Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>";
49+ author = "Simon Marlow, David Waern";
50+ homepage = "http://www.haskell.org/haddock/";
51+ url = "";
52+ synopsis = "A documentation-generation tool for Haskell libraries";
53+ description = "Haddock is a documentation-generation tool for Haskell\nlibraries";
54+ buildType = "Simple";
55+ isLocal = true;
56+ detailLevel = "FullDetails";
57+ licenseFiles = [ "LICENSE" ];
58+ dataDir = "resources";
59+ dataFiles = [
60+ "html/quick-jump.min.js"
61+ "html/haddock-bundle.min.js"
62+ "html/quick-jump.css"
63+ "html/solarized.css"
64+ "html/highlight.js"
65+ "html/Classic.theme/haskell_icon.gif"
66+ "html/Classic.theme/minus.gif"
67+ "html/Classic.theme/plus.gif"
68+ "html/Classic.theme/xhaddock.css"
69+ "html/Ocean.std-theme/hslogo-16.png"
70+ "html/Ocean.std-theme/minus.gif"
71+ "html/Ocean.std-theme/ocean.css"
72+ "html/Ocean.std-theme/plus.gif"
73+ "html/Ocean.std-theme/synopsis.png"
74+ "latex/haddock.sty"
75+ ];
76+ extraSrcFiles = [ "CHANGES.md" ];
77+ extraTmpFiles = [];
78+ extraDocFiles = [];
79+ };
80+ components = {
81+ "library" = {
82+ depends = [
83+ (hsPkgs."base" or (buildDepError "base"))
84+ (hsPkgs."Cabal" or (buildDepError "Cabal"))
85+ (hsPkgs."ghc-api-ghcjs" or (buildDepError "ghc-api-ghcjs"))
86+ (hsPkgs."ghc-paths" or (buildDepError "ghc-paths"))
87+ (hsPkgs."haddock-library-ghcjs" or (buildDepError "haddock-library-ghcjs"))
88+ (hsPkgs."xhtml" or (buildDepError "xhtml"))
89+ (hsPkgs."array" or (buildDepError "array"))
90+ (hsPkgs."bytestring" or (buildDepError "bytestring"))
91+ (hsPkgs."containers" or (buildDepError "containers"))
92+ (hsPkgs."deepseq" or (buildDepError "deepseq"))
93+ (hsPkgs."directory" or (buildDepError "directory"))
94+ (hsPkgs."filepath" or (buildDepError "filepath"))
95+ (hsPkgs."ghc-boot" or (buildDepError "ghc-boot"))
96+ (hsPkgs."transformers" or (buildDepError "transformers"))
97+ ];
98+ buildable = true;
99+ modules = [
100+ "Haddock"
101+ "Haddock/Interface"
102+ "Haddock/Interface/Rename"
103+ "Haddock/Interface/Create"
104+ "Haddock/Interface/AttachInstances"
105+ "Haddock/Interface/Json"
106+ "Haddock/Interface/LexParseRn"
107+ "Haddock/Interface/ParseModuleHeader"
108+ "Haddock/Interface/Specialize"
109+ "Haddock/Parser"
110+ "Haddock/Utils"
111+ "Haddock/Utils/Json"
112+ "Haddock/Backends/Xhtml"
113+ "Haddock/Backends/Xhtml/Decl"
114+ "Haddock/Backends/Xhtml/DocMarkup"
115+ "Haddock/Backends/Xhtml/Layout"
116+ "Haddock/Backends/Xhtml/Meta"
117+ "Haddock/Backends/Xhtml/Names"
118+ "Haddock/Backends/Xhtml/Themes"
119+ "Haddock/Backends/Xhtml/Types"
120+ "Haddock/Backends/Xhtml/Utils"
121+ "Haddock/Backends/LaTeX"
122+ "Haddock/Backends/HaddockDB"
123+ "Haddock/Backends/Hoogle"
124+ "Haddock/Backends/Hyperlinker"
125+ "Haddock/Backends/Hyperlinker/Ast"
126+ "Haddock/Backends/Hyperlinker/Parser"
127+ "Haddock/Backends/Hyperlinker/Renderer"
128+ "Haddock/Backends/Hyperlinker/Types"
129+ "Haddock/Backends/Hyperlinker/Utils"
130+ "Haddock/ModuleTree"
131+ "Haddock/Types"
132+ "Haddock/Doc"
133+ "Haddock/Version"
134+ "Haddock/InterfaceFile"
135+ "Haddock/Options"
136+ "Haddock/GhcUtils"
137+ "Haddock/Syb"
138+ "Haddock/Convert"
139+ "Paths_haddock_api_ghcjs"
140+ "Documentation/Haddock"
141+ ];
142+ hsSourceDirs = [ "src" ];
143+ };
144+ tests = {
145+ "spec" = {
146+ depends = [
147+ (hsPkgs."Cabal" or (buildDepError "Cabal"))
148+ (hsPkgs."ghc-api-ghcjs" or (buildDepError "ghc-api-ghcjs"))
149+ (hsPkgs."ghc-paths" or (buildDepError "ghc-paths"))
150+ (hsPkgs."haddock-library-ghcjs" or (buildDepError "haddock-library-ghcjs"))
151+ (hsPkgs."xhtml" or (buildDepError "xhtml"))
152+ (hsPkgs."hspec" or (buildDepError "hspec"))
153+ (hsPkgs."QuickCheck" or (buildDepError "QuickCheck"))
154+ (hsPkgs."base" or (buildDepError "base"))
155+ (hsPkgs."array" or (buildDepError "array"))
156+ (hsPkgs."bytestring" or (buildDepError "bytestring"))
157+ (hsPkgs."containers" or (buildDepError "containers"))
158+ (hsPkgs."deepseq" or (buildDepError "deepseq"))
159+ (hsPkgs."directory" or (buildDepError "directory"))
160+ (hsPkgs."filepath" or (buildDepError "filepath"))
161+ (hsPkgs."ghc-boot" or (buildDepError "ghc-boot"))
162+ (hsPkgs."transformers" or (buildDepError "transformers"))
163+ ];
164+ build-tools = [
165+ (hsPkgs.buildPackages.hspec-discover or (pkgs.buildPackages.hspec-discover or (buildToolDepError "hspec-discover")))
166+ ];
167+ buildable = true;
168+ modules = [
169+ "Haddock"
170+ "Haddock/Backends/Hoogle"
171+ "Haddock/Backends/Hyperlinker"
172+ "Haddock/Backends/Hyperlinker/Ast"
173+ "Haddock/Backends/Hyperlinker/Renderer"
174+ "Haddock/Backends/Hyperlinker/Utils"
175+ "Haddock/Backends/LaTeX"
176+ "Haddock/Backends/Xhtml"
177+ "Haddock/Backends/Xhtml/Decl"
178+ "Haddock/Backends/Xhtml/DocMarkup"
179+ "Haddock/Backends/Xhtml/Layout"
180+ "Haddock/Backends/Xhtml/Meta"
181+ "Haddock/Backends/Xhtml/Names"
182+ "Haddock/Backends/Xhtml/Themes"
183+ "Haddock/Backends/Xhtml/Types"
184+ "Haddock/Backends/Xhtml/Utils"
185+ "Haddock/Convert"
186+ "Haddock/Doc"
187+ "Haddock/GhcUtils"
188+ "Haddock/Interface"
189+ "Haddock/Interface/AttachInstances"
190+ "Haddock/Interface/Create"
191+ "Haddock/Interface/Json"
192+ "Haddock/Interface/LexParseRn"
193+ "Haddock/Interface/ParseModuleHeader"
194+ "Haddock/Interface/Rename"
195+ "Haddock/Interface/Specialize"
196+ "Haddock/InterfaceFile"
197+ "Haddock/ModuleTree"
198+ "Haddock/Options"
199+ "Haddock/Parser"
200+ "Haddock/Syb"
201+ "Haddock/Types"
202+ "Haddock/Utils"
203+ "Haddock/Utils/Json"
204+ "Haddock/Version"
205+ "Paths_haddock_api_ghcjs"
206+ "Haddock/Backends/Hyperlinker/ParserSpec"
207+ "Haddock/Backends/Hyperlinker/Parser"
208+ "Haddock/Backends/Hyperlinker/Types"
209+ ];
210+ hsSourceDirs = [ "test" "src" ];
211+ mainPath = [ "Spec.hs" ];
212+ };
213+ };
214+ };
215+ } // rec { src = (pkgs.lib).mkDefault ../lib/haddock-api-ghcjs; }
materialized/ghcjs/.plan.nix/haddock-library-ghcjs.nixnew file+134
@@ -0,0 +1,134 @@
1+let
2+ buildDepError = pkg:
3+ builtins.throw ''
4+ The Haskell package set does not contain the package: ${pkg} (build dependency).
5+
6+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
7+ '';
8+ sysDepError = pkg:
9+ builtins.throw ''
10+ The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11+
12+ You may need to augment the system package mapping in haskell.nix so that it can be found.
13+ '';
14+ pkgConfDepError = pkg:
15+ builtins.throw ''
16+ The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17+
18+ You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
19+ '';
20+ exeDepError = pkg:
21+ builtins.throw ''
22+ The local executable components do not include the component: ${pkg} (executable dependency).
23+ '';
24+ legacyExeDepError = pkg:
25+ builtins.throw ''
26+ The Haskell package set does not contain the package: ${pkg} (executable dependency).
27+
28+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
29+ '';
30+ buildToolDepError = pkg:
31+ builtins.throw ''
32+ Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33+
34+ If this is a system dependency:
35+ You may need to augment the system package mapping in haskell.nix so that it can be found.
36+
37+ If this is a Haskell dependency:
38+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
39+ '';
40+in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
41+ {
42+ flags = {};
43+ package = {
44+ specVersion = "2.0";
45+ identifier = { name = "haddock-library-ghcjs"; version = "1.6.0"; };
46+ license = "BSD-3-Clause";
47+ copyright = "";
48+ maintainer = "Alex Biehl <alexbiehl@gmail.com>, Simon Hengel <sol@typeful.net>, Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>";
49+ author = "";
50+ homepage = "http://www.haskell.org/haddock/";
51+ url = "";
52+ synopsis = "Library exposing some functionality of Haddock.";
53+ description = "Haddock is a documentation-generation tool for Haskell\nlibraries. These modules expose some functionality of it\nwithout pulling in the GHC dependency. Please note that the\nAPI is likely to change so specify upper bounds in your\nproject if you can't release often. For interacting with Haddock\nitself, see the ‘haddock’ package.";
54+ buildType = "Simple";
55+ isLocal = true;
56+ detailLevel = "FullDetails";
57+ licenseFiles = [ "LICENSE" ];
58+ dataDir = "";
59+ dataFiles = [];
60+ extraSrcFiles = [ "CHANGES.md" ];
61+ extraTmpFiles = [];
62+ extraDocFiles = [];
63+ };
64+ components = {
65+ "library" = {
66+ depends = [
67+ (hsPkgs."base" or (buildDepError "base"))
68+ (hsPkgs."bytestring" or (buildDepError "bytestring"))
69+ (hsPkgs."containers" or (buildDepError "containers"))
70+ (hsPkgs."transformers" or (buildDepError "transformers"))
71+ (hsPkgs."text" or (buildDepError "text"))
72+ (hsPkgs."parsec" or (buildDepError "parsec"))
73+ ];
74+ buildable = true;
75+ modules = [
76+ "Documentation/Haddock/Parser/Util"
77+ "Documentation/Haddock/Doc"
78+ "Documentation/Haddock/Markup"
79+ "Documentation/Haddock/Parser"
80+ "Documentation/Haddock/Parser/Monad"
81+ "Documentation/Haddock/Types"
82+ "Documentation/Haddock/Utf8"
83+ ];
84+ hsSourceDirs = [ "src" ];
85+ };
86+ tests = {
87+ "spec" = {
88+ depends = [
89+ (hsPkgs."base" or (buildDepError "base"))
90+ (hsPkgs."base-compat" or (buildDepError "base-compat"))
91+ (hsPkgs."bytestring" or (buildDepError "bytestring"))
92+ (hsPkgs."containers" or (buildDepError "containers"))
93+ (hsPkgs."transformers" or (buildDepError "transformers"))
94+ (hsPkgs."hspec" or (buildDepError "hspec"))
95+ (hsPkgs."QuickCheck" or (buildDepError "QuickCheck"))
96+ (hsPkgs."text" or (buildDepError "text"))
97+ (hsPkgs."parsec" or (buildDepError "parsec"))
98+ (hsPkgs."deepseq" or (buildDepError "deepseq"))
99+ ];
100+ build-tools = [
101+ (hsPkgs.buildPackages.hspec-discover or (pkgs.buildPackages.hspec-discover or (buildToolDepError "hspec-discover")))
102+ ];
103+ buildable = true;
104+ modules = [
105+ "Documentation/Haddock/Doc"
106+ "Documentation/Haddock/Parser"
107+ "Documentation/Haddock/Parser/Monad"
108+ "Documentation/Haddock/Parser/Util"
109+ "Documentation/Haddock/Parser/UtilSpec"
110+ "Documentation/Haddock/ParserSpec"
111+ "Documentation/Haddock/Types"
112+ "Documentation/Haddock/Utf8"
113+ "Documentation/Haddock/Utf8Spec"
114+ ];
115+ hsSourceDirs = [ "test" "src" ];
116+ mainPath = [ "Spec.hs" ];
117+ };
118+ "fixtures" = {
119+ depends = [
120+ (hsPkgs."base" or (buildDepError "base"))
121+ (hsPkgs."base-compat" or (buildDepError "base-compat"))
122+ (hsPkgs."directory" or (buildDepError "directory"))
123+ (hsPkgs."filepath" or (buildDepError "filepath"))
124+ (hsPkgs."optparse-applicative" or (buildDepError "optparse-applicative"))
125+ (hsPkgs."tree-diff" or (buildDepError "tree-diff"))
126+ (hsPkgs."haddock-library" or (buildDepError "haddock-library"))
127+ ];
128+ buildable = true;
129+ hsSourceDirs = [ "fixtures" ];
130+ mainPath = [ "Fixtures.hs" ];
131+ };
132+ };
133+ };
134+ } // rec { src = (pkgs.lib).mkDefault ../lib/haddock-library-ghcjs; }
materialized/ghcjs/.plan.nix/template-haskell-ghcjs.nixnew file+85
@@ -0,0 +1,85 @@
1+let
2+ buildDepError = pkg:
3+ builtins.throw ''
4+ The Haskell package set does not contain the package: ${pkg} (build dependency).
5+
6+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
7+ '';
8+ sysDepError = pkg:
9+ builtins.throw ''
10+ The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
11+
12+ You may need to augment the system package mapping in haskell.nix so that it can be found.
13+ '';
14+ pkgConfDepError = pkg:
15+ builtins.throw ''
16+ The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
17+
18+ You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
19+ '';
20+ exeDepError = pkg:
21+ builtins.throw ''
22+ The local executable components do not include the component: ${pkg} (executable dependency).
23+ '';
24+ legacyExeDepError = pkg:
25+ builtins.throw ''
26+ The Haskell package set does not contain the package: ${pkg} (executable dependency).
27+
28+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
29+ '';
30+ buildToolDepError = pkg:
31+ builtins.throw ''
32+ Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
33+
34+ If this is a system dependency:
35+ You may need to augment the system package mapping in haskell.nix so that it can be found.
36+
37+ If this is a Haskell dependency:
38+ If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
39+ '';
40+in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
41+ {
42+ flags = {};
43+ package = {
44+ specVersion = "1.10";
45+ identifier = { name = "template-haskell-ghcjs"; version = "2.14.0.0"; };
46+ license = "BSD-3-Clause";
47+ copyright = "";
48+ maintainer = "libraries@haskell.org";
49+ author = "";
50+ homepage = "";
51+ url = "";
52+ synopsis = "Support library for Template Haskell (customized for GHCJS)";
53+ description = "This package provides modules containing facilities for manipulating\nHaskell source code using Template Haskell.\n\nSee <http://www.haskell.org/haskellwiki/Template_Haskell> for more\ninformation.";
54+ buildType = "Simple";
55+ isLocal = true;
56+ detailLevel = "FullDetails";
57+ licenseFiles = [ "LICENSE" ];
58+ dataDir = "";
59+ dataFiles = [];
60+ extraSrcFiles = [ "changelog.md" ];
61+ extraTmpFiles = [];
62+ extraDocFiles = [];
63+ };
64+ components = {
65+ "library" = {
66+ depends = [
67+ (hsPkgs."base" or (buildDepError "base"))
68+ (hsPkgs."ghc-boot-th" or (buildDepError "ghc-boot-th"))
69+ (hsPkgs."pretty" or (buildDepError "pretty"))
70+ ];
71+ buildable = true;
72+ modules = [
73+ "Language/Haskell/TH/Lib/Map"
74+ "Language/Haskell/TH"
75+ "Language/Haskell/TH/Lib"
76+ "Language/Haskell/TH/Ppr"
77+ "Language/Haskell/TH/PprLib"
78+ "Language/Haskell/TH/Quote"
79+ "Language/Haskell/TH/Syntax"
80+ "Language/Haskell/TH/LanguageExtensions"
81+ "Language/Haskell/TH/Lib/Internal"
82+ ];
83+ };
84+ };
85+ } // rec { src = (pkgs.lib).mkDefault ../lib/template-haskell-ghcjs; }
materialized/ghcjs/default.nixnew file+413
@@ -0,0 +1,413 @@
1+{
2+ pkgs = hackage:
3+ {
4+ packages = {
5+ "warp".revision = (((hackage."warp")."3.2.28").revisions).default;
6+ "warp".flags.allow-sendfilefd = true;
7+ "warp".flags.network-bytestring = false;
8+ "warp".flags.warp-debug = false;
9+ "test-framework-hunit".revision = (((hackage."test-framework-hunit")."0.3.0.2").revisions).default;
10+ "test-framework-hunit".flags.base4 = true;
11+ "test-framework-hunit".flags.base3 = false;
12+ "http-client".revision = (((hackage."http-client")."0.6.4").revisions).default;
13+ "http-client".flags.network-uri = true;
14+ "haddock-library".revision = (((hackage."haddock-library")."1.8.0").revisions).default;
15+ "wai-websockets".revision = (((hackage."wai-websockets")."3.0.1.2").revisions).default;
16+ "wai-websockets".flags.example = true;
17+ "cookie".revision = (((hackage."cookie")."0.4.5").revisions).default;
18+ "void".revision = (((hackage."void")."0.7.3").revisions).default;
19+ "void".flags.safe = false;
20+ "semigroupoids".revision = (((hackage."semigroupoids")."5.3.4").revisions).default;
21+ "semigroupoids".flags.comonad = true;
22+ "semigroupoids".flags.doctests = true;
23+ "semigroupoids".flags.unordered-containers = true;
24+ "semigroupoids".flags.distributive = true;
25+ "semigroupoids".flags.tagged = true;
26+ "semigroupoids".flags.containers = true;
27+ "semigroupoids".flags.contravariant = true;
28+ "byteorder".revision = (((hackage."byteorder")."1.0.4").revisions).default;
29+ "free".revision = (((hackage."free")."5.1.3").revisions).default;
30+ "tf-random".revision = (((hackage."tf-random")."0.5").revisions).default;
31+ "zip-archive".revision = (((hackage."zip-archive")."0.4.1").revisions).default;
32+ "zip-archive".flags.executable = false;
33+ "exceptions".revision = (((hackage."exceptions")."0.10.3").revisions).default;
34+ "ghc-paths".revision = (((hackage."ghc-paths")."0.1.0.12").revisions).default;
35+ "binary".revision = (((hackage."binary")."0.8.6.0").revisions).default;
36+ "ghc-boot".revision = (((hackage."ghc-boot")."8.6.5").revisions).default;
37+ "wl-pprint-text".revision = (((hackage."wl-pprint-text")."1.2.0.0").revisions).default;
38+ "tar".revision = (((hackage."tar")."0.5.1.1").revisions).default;
39+ "tar".flags.old-time = false;
40+ "tar".flags.old-bytestring = false;
41+ "ghc-prim".revision = (((hackage."ghc-prim")."0.5.3").revisions).default;
42+ "old-time".revision = (((hackage."old-time")."1.1.0.3").revisions).default;
43+ "bifunctors".revision = (((hackage."bifunctors")."5.5.6").revisions).default;
44+ "bifunctors".flags.semigroups = true;
45+ "bifunctors".flags.tagged = true;
46+ "split".revision = (((hackage."split")."0.2.3.3").revisions).default;
47+ "stm".revision = (((hackage."stm")."2.5.0.0").revisions).default;
48+ "unix-time".revision = (((hackage."unix-time")."0.4.7").revisions).default;
49+ "http2".revision = (((hackage."http2")."1.6.5").revisions).default;
50+ "http2".flags.devel = false;
51+ "appar".revision = (((hackage."appar")."0.1.8").revisions).default;
52+ "case-insensitive".revision = (((hackage."case-insensitive")."1.2.1.0").revisions).default;
53+ "network-byte-order".revision = (((hackage."network-byte-order")."0.1.2.0").revisions).default;
54+ "sop-core".revision = (((hackage."sop-core")."0.5.0.0").revisions).default;
55+ "extensible-exceptions".revision = (((hackage."extensible-exceptions")."0.1.1.4").revisions).default;
56+ "unix".revision = (((hackage."unix")."2.7.2.2").revisions).default;
57+ "SHA".revision = (((hackage."SHA")."1.6.4.4").revisions).default;
58+ "SHA".flags.exe = false;
59+ "ghc-heap".revision = (((hackage."ghc-heap")."8.6.5").revisions).default;
60+ "mtl".revision = (((hackage."mtl")."2.2.2").revisions).default;
61+ "lifted-async".revision = (((hackage."lifted-async")."0.10.0.4").revisions).default;
62+ "network-uri".revision = (((hackage."network-uri")."2.6.1.0").revisions).default;
63+ "regex-base".revision = (((hackage."regex-base")."0.94.0.0").revisions).default;
64+ "zlib".revision = (((hackage."zlib")."0.6.2.1").revisions).default;
65+ "zlib".flags.non-blocking-ffi = false;
66+ "zlib".flags.pkg-config = false;
67+ "rts".revision = (((hackage."rts")."1.0").revisions).default;
68+ "easy-file".revision = (((hackage."easy-file")."0.2.2").revisions).default;
69+ "th-expand-syns".revision = (((hackage."th-expand-syns")."0.4.5.0").revisions).default;
70+ "regex-posix".revision = (((hackage."regex-posix")."0.96.0.0").revisions).default;
71+ "regex-posix".flags._regex-posix-clib = false;
72+ "cryptonite".revision = (((hackage."cryptonite")."0.26").revisions).default;
73+ "cryptonite".flags.support_sse = false;
74+ "cryptonite".flags.integer-gmp = true;
75+ "cryptonite".flags.support_rdrand = true;
76+ "cryptonite".flags.support_aesni = true;
77+ "cryptonite".flags.support_deepseq = true;
78+ "cryptonite".flags.support_pclmuldq = false;
79+ "cryptonite".flags.check_alignment = false;
80+ "cryptonite".flags.old_toolchain_inliner = false;
81+ "alex".revision = (((hackage."alex")."3.2.5").revisions).default;
82+ "alex".flags.small_base = true;
83+ "clock".revision = (((hackage."clock")."0.8").revisions).default;
84+ "clock".flags.llvm = false;
85+ "system-fileio".revision = (((hackage."system-fileio")."0.3.16.4").revisions).default;
86+ "adjunctions".revision = (((hackage."adjunctions")."4.4").revisions).default;
87+ "invariant".revision = (((hackage."invariant")."0.5.3").revisions).default;
88+ "enclosed-exceptions".revision = (((hackage."enclosed-exceptions")."1.0.3").revisions).default;
89+ "th-orphans".revision = (((hackage."th-orphans")."0.13.9").revisions).default;
90+ "executable-path".revision = (((hackage."executable-path")."0.0.3.1").revisions).default;
91+ "syb".revision = (((hackage."syb")."0.7.1").revisions).default;
92+ "distributive".revision = (((hackage."distributive")."0.6.1").revisions).default;
93+ "distributive".flags.semigroups = true;
94+ "distributive".flags.tagged = true;
95+ "generics-sop".revision = (((hackage."generics-sop")."0.5.0.0").revisions).default;
96+ "system-filepath".revision = (((hackage."system-filepath")."0.4.14").revisions).default;
97+ "bytestring-builder".revision = (((hackage."bytestring-builder")."0.10.8.2.0").revisions).default;
98+ "bytestring-builder".flags.bytestring_has_builder = true;
99+ "QuickCheck".revision = (((hackage."QuickCheck")."2.13.2").revisions).default;
100+ "QuickCheck".flags.templatehaskell = true;
101+ "scientific".revision = (((hackage."scientific")."0.3.6.2").revisions).default;
102+ "scientific".flags.integer-simple = false;
103+ "scientific".flags.bytestring-builder = false;
104+ "time-manager".revision = (((hackage."time-manager")."0.0.0").revisions).default;
105+ "newtype-generics".revision = (((hackage."newtype-generics")."0.5.4").revisions).default;
106+ "hspec-discover".revision = (((hackage."hspec-discover")."2.7.1").revisions).default;
107+ "parallel".revision = (((hackage."parallel")."3.2.2.0").revisions).default;
108+ "deepseq".revision = (((hackage."deepseq")."1.4.4.0").revisions).default;
109+ "haskell-src-meta".revision = (((hackage."haskell-src-meta")."0.8.5").revisions).default;
110+ "random".revision = (((hackage."random")."1.1").revisions).default;
111+ "temporary".revision = (((hackage."temporary")."1.3").revisions).default;
112+ "uuid-types".revision = (((hackage."uuid-types")."1.0.3").revisions).default;
113+ "optparse-applicative".revision = (((hackage."optparse-applicative")."0.14.3.0").revisions).default;
114+ "network".revision = (((hackage."network")."3.1.1.1").revisions).default;
115+ "word8".revision = (((hackage."word8")."0.1.3").revisions).default;
116+ "splitmix".revision = (((hackage."splitmix")."0.0.3").revisions).default;
117+ "splitmix".flags.optimised-mixer = false;
118+ "splitmix".flags.random = true;
119+ "async".revision = (((hackage."async")."2.2.2").revisions).default;
120+ "async".flags.bench = false;
121+ "dlist".revision = (((hackage."dlist")."0.8.0.7").revisions).default;
122+ "websockets".revision = (((hackage."websockets")."0.12.6.1").revisions).default;
123+ "websockets".flags.example = false;
124+ "conduit".revision = (((hackage."conduit")."1.3.1.1").revisions).default;
125+ "constraints".revision = (((hackage."constraints")."0.11.2").revisions).default;
126+ "semigroups".revision = (((hackage."semigroups")."0.19.1").revisions).default;
127+ "semigroups".flags.bytestring = true;
128+ "semigroups".flags.unordered-containers = true;
129+ "semigroups".flags.text = true;
130+ "semigroups".flags.tagged = true;
131+ "semigroups".flags.containers = true;
132+ "semigroups".flags.binary = true;
133+ "semigroups".flags.hashable = true;
134+ "semigroups".flags.transformers = true;
135+ "semigroups".flags.deepseq = true;
136+ "semigroups".flags.bytestring-builder = false;
137+ "semigroups".flags.template-haskell = true;
138+ "data-default".revision = (((hackage."data-default")."0.7.1.1").revisions).default;
139+ "HUnit".revision = (((hackage."HUnit")."1.6.0.0").revisions).default;
140+ "lifted-base".revision = (((hackage."lifted-base")."0.2.3.12").revisions).default;
141+ "data-default-instances-old-locale".revision = (((hackage."data-default-instances-old-locale")."0.0.1").revisions).default;
142+ "tree-diff".revision = (((hackage."tree-diff")."0.0.2.1").revisions).default;
143+ "parsec".revision = (((hackage."parsec")."3.1.13.0").revisions).default;
144+ "th-reify-many".revision = (((hackage."th-reify-many")."0.1.9").revisions).default;
145+ "hsc2hs".revision = (((hackage."hsc2hs")."0.68.6").revisions).default;
146+ "hsc2hs".flags.in-ghc-tree = false;
147+ "directory".revision = (((hackage."directory")."1.3.3.0").revisions).default;
148+ "yaml".revision = (((hackage."yaml")."0.10.4.0").revisions).default;
149+ "yaml".flags.no-exe = true;
150+ "yaml".flags.no-examples = true;
151+ "yaml".flags.system-libyaml = false;
152+ "yaml".flags.no-unicode = false;
153+ "transformers-compat".revision = (((hackage."transformers-compat")."0.6.5").revisions).default;
154+ "transformers-compat".flags.five = false;
155+ "transformers-compat".flags.generic-deriving = true;
156+ "transformers-compat".flags.two = false;
157+ "transformers-compat".flags.five-three = true;
158+ "transformers-compat".flags.mtl = true;
159+ "transformers-compat".flags.four = false;
160+ "transformers-compat".flags.three = false;
161+ "template-haskell".revision = (((hackage."template-haskell")."2.14.0.0").revisions).default;
162+ "hspec-expectations".revision = (((hackage."hspec-expectations")."0.8.2").revisions).default;
163+ "mono-traversable".revision = (((hackage."mono-traversable")."1.0.13.0").revisions).default;
164+ "psqueues".revision = (((hackage."psqueues")."0.2.7.2").revisions).default;
165+ "vector".revision = (((hackage."vector")."0.12.0.3").revisions).default;
166+ "vector".flags.unsafechecks = false;
167+ "vector".flags.internalchecks = false;
168+ "vector".flags.wall = false;
169+ "vector".flags.boundschecks = true;
170+ "call-stack".revision = (((hackage."call-stack")."0.2.0").revisions).default;
171+ "primitive".revision = (((hackage."primitive")."0.7.0.0").revisions).default;
172+ "cryptohash".revision = (((hackage."cryptohash")."0.11.9").revisions).default;
173+ "profunctors".revision = (((hackage."profunctors")."5.5.1").revisions).default;
174+ "safe".revision = (((hackage."safe")."0.3.18").revisions).default;
175+ "blaze-builder".revision = (((hackage."blaze-builder")."0.4.1.0").revisions).default;
176+ "base-compat".revision = (((hackage."base-compat")."0.10.5").revisions).default;
177+ "time-compat".revision = (((hackage."time-compat")."1.9.2.2").revisions).default;
178+ "time-compat".flags.old-locale = false;
179+ "ansi-terminal".revision = (((hackage."ansi-terminal")."0.9.1").revisions).default;
180+ "ansi-terminal".flags.example = false;
181+ "tagged".revision = (((hackage."tagged")."0.8.6").revisions).default;
182+ "tagged".flags.transformers = true;
183+ "tagged".flags.deepseq = true;
184+ "parsers".revision = (((hackage."parsers")."0.12.10").revisions).default;
185+ "parsers".flags.parsec = true;
186+ "parsers".flags.binary = true;
187+ "parsers".flags.attoparsec = true;
188+ "haskell-src-exts".revision = (((hackage."haskell-src-exts")."1.20.3").revisions).default;
189+ "lens".revision = (((hackage."lens")."4.17.1").revisions).default;
190+ "lens".flags.j = false;
191+ "lens".flags.test-properties = true;
192+ "lens".flags.old-inline-pragmas = false;
193+ "lens".flags.test-templates = true;
194+ "lens".flags.trustworthy = true;
195+ "lens".flags.test-doctests = true;
196+ "lens".flags.benchmark-uniplate = false;
197+ "lens".flags.inlining = true;
198+ "lens".flags.dump-splices = false;
199+ "lens".flags.test-hunit = true;
200+ "lens".flags.safe = false;
201+ "unliftio-core".revision = (((hackage."unliftio-core")."0.1.2.0").revisions).default;
202+ "containers".revision = (((hackage."containers")."0.6.0.1").revisions).default;
203+ "integer-logarithms".revision = (((hackage."integer-logarithms")."1.0.3").revisions).default;
204+ "integer-logarithms".flags.check-bounds = false;
205+ "integer-logarithms".flags.integer-gmp = true;
206+ "reflection".revision = (((hackage."reflection")."2.1.5").revisions).default;
207+ "reflection".flags.slow = false;
208+ "reflection".flags.template-haskell = true;
209+ "streaming-commons".revision = (((hackage."streaming-commons")."0.2.1.1").revisions).default;
210+ "streaming-commons".flags.use-bytestring-builder = false;
211+ "shelly".revision = (((hackage."shelly")."1.8.1").revisions).default;
212+ "shelly".flags.build-examples = false;
213+ "shelly".flags.lifted = false;
214+ "bytestring".revision = (((hackage."bytestring")."0.10.8.2").revisions).default;
215+ "ansi-wl-pprint".revision = (((hackage."ansi-wl-pprint")."0.6.9").revisions).default;
216+ "ansi-wl-pprint".flags.example = false;
217+ "wai".revision = (((hackage."wai")."3.2.2.1").revisions).default;
218+ "basement".revision = (((hackage."basement")."0.0.11").revisions).default;
219+ "setenv".revision = (((hackage."setenv")."0.1.1.3").revisions).default;
220+ "test-framework".revision = (((hackage."test-framework")."0.8.2.0").revisions).default;
221+ "hostname".revision = (((hackage."hostname")."1.0").revisions).default;
222+ "old-locale".revision = (((hackage."old-locale")."1.0.0.7").revisions).default;
223+ "directory-tree".revision = (((hackage."directory-tree")."0.12.1").revisions).default;
224+ "StateVar".revision = (((hackage."StateVar")."1.2").revisions).default;
225+ "vault".revision = (((hackage."vault")."0.3.1.3").revisions).default;
226+ "vault".flags.useghc = true;
227+ "mime-types".revision = (((hackage."mime-types")."0.1.0.9").revisions).default;
228+ "charset".revision = (((hackage."charset")."0.3.7.1").revisions).default;
229+ "contravariant".revision = (((hackage."contravariant")."1.5.2").revisions).default;
230+ "contravariant".flags.semigroups = true;
231+ "contravariant".flags.tagged = true;
232+ "contravariant".flags.statevar = true;
233+ "data-default-instances-dlist".revision = (((hackage."data-default-instances-dlist")."0.0.1").revisions).default;
234+ "xhtml".revision = (((hackage."xhtml")."3000.2.2.1").revisions).default;
235+ "type-equality".revision = (((hackage."type-equality")."1").revisions).default;
236+ "blaze-markup".revision = (((hackage."blaze-markup")."0.8.2.3").revisions).default;
237+ "text".revision = (((hackage."text")."1.2.3.1").revisions).default;
238+ "Cabal".revision = (((hackage."Cabal")."2.4.0.1").revisions).default;
239+ "unordered-containers".revision = (((hackage."unordered-containers")."0.2.10.0").revisions).default;
240+ "unordered-containers".flags.debug = false;
241+ "base64-bytestring".revision = (((hackage."base64-bytestring")."1.0.0.2").revisions).default;
242+ "base".revision = (((hackage."base")."4.12.0.0").revisions).default;
243+ "comonad".revision = (((hackage."comonad")."5.0.6").revisions).default;
244+ "comonad".flags.distributive = true;
245+ "comonad".flags.test-doctests = true;
246+ "comonad".flags.containers = true;
247+ "hspec".revision = (((hackage."hspec")."2.7.1").revisions).default;
248+ "time".revision = (((hackage."time")."1.8.0.2").revisions).default;
249+ "data-default-class".revision = (((hackage."data-default-class")."0.1.2.0").revisions).default;
250+ "terminfo".revision = (((hackage."terminfo")."0.4.1.2").revisions).default;
251+ "base16-bytestring".revision = (((hackage."base16-bytestring")."0.1.1.6").revisions).default;
252+ "vector-algorithms".revision = (((hackage."vector-algorithms")."0.8.0.3").revisions).default;
253+ "vector-algorithms".flags.unsafechecks = false;
254+ "vector-algorithms".flags.internalchecks = false;
255+ "vector-algorithms".flags.llvm = false;
256+ "vector-algorithms".flags.boundschecks = true;
257+ "vector-algorithms".flags.bench = true;
258+ "vector-algorithms".flags.properties = true;
259+ "iproute".revision = (((hackage."iproute")."1.7.8").revisions).default;
260+ "transformers".revision = (((hackage."transformers")."0.5.6.2").revisions).default;
261+ "hashable".revision = (((hackage."hashable")."1.3.0.0").revisions).default;
262+ "hashable".flags.sse2 = true;
263+ "hashable".flags.integer-gmp = true;
264+ "hashable".flags.sse41 = false;
265+ "hashable".flags.examples = false;
266+ "quickcheck-io".revision = (((hackage."quickcheck-io")."0.2.0").revisions).default;
267+ "wai-extra".revision = (((hackage."wai-extra")."3.0.28").revisions).default;
268+ "wai-extra".flags.build-example = false;
269+ "data-default-instances-containers".revision = (((hackage."data-default-instances-containers")."0.0.1").revisions).default;
270+ "attoparsec".revision = (((hackage."attoparsec")."0.13.2.3").revisions).default;
271+ "attoparsec".flags.developer = false;
272+ "blaze-html".revision = (((hackage."blaze-html")."0.9.1.2").revisions).default;
273+ "digest".revision = (((hackage."digest")."0.0.1.2").revisions).default;
274+ "digest".flags.bytestring-in-base = false;
275+ "MemoTrie".revision = (((hackage."MemoTrie")."0.6.10").revisions).default;
276+ "MemoTrie".flags.examples = false;
277+ "colour".revision = (((hackage."colour")."2.3.5").revisions).default;
278+ "transformers-base".revision = (((hackage."transformers-base")."0.4.5.2").revisions).default;
279+ "transformers-base".flags.orphaninstances = true;
280+ "happy".revision = (((hackage."happy")."1.19.9").revisions).default;
281+ "happy".flags.small_base = true;
282+ "file-embed".revision = (((hackage."file-embed")."0.0.11").revisions).default;
283+ "byteable".revision = (((hackage."byteable")."0.1.1").revisions).default;
284+ "hpc".revision = (((hackage."hpc")."0.6.0.3").revisions).default;
285+ "entropy".revision = (((hackage."entropy")."0.4.1.5").revisions).default;
286+ "entropy".flags.halvm = false;
287+ "filepath".revision = (((hackage."filepath")."1.4.2.1").revisions).default;
288+ "auto-update".revision = (((hackage."auto-update")."0.1.6").revisions).default;
289+ "hspec-core".revision = (((hackage."hspec-core")."2.7.1").revisions).default;
290+ "stringsearch".revision = (((hackage."stringsearch")."0.3.6.6").revisions).default;
291+ "stringsearch".flags.base4 = true;
292+ "stringsearch".flags.base3 = false;
293+ "unix-compat".revision = (((hackage."unix-compat")."0.5.2").revisions).default;
294+ "unix-compat".flags.old-time = false;
295+ "monad-control".revision = (((hackage."monad-control")."1.0.2.3").revisions).default;
296+ "process".revision = (((hackage."process")."1.6.5.0").revisions).default;
297+ "kan-extensions".revision = (((hackage."kan-extensions")."5.2").revisions).default;
298+ "wai-logger".revision = (((hackage."wai-logger")."2.3.6").revisions).default;
299+ "th-lift".revision = (((hackage."th-lift")."0.8.1").revisions).default;
300+ "resourcet".revision = (((hackage."resourcet")."1.2.2").revisions).default;
301+ "webdriver".revision = (((hackage."webdriver")."0.8.5").revisions).default;
302+ "webdriver".flags.network-uri = true;
303+ "webdriver".flags.developer = false;
304+ "pretty".revision = (((hackage."pretty")."1.1.3.6").revisions).default;
305+ "cabal-doctest".revision = (((hackage."cabal-doctest")."1.0.8").revisions).default;
306+ "aeson".revision = (((hackage."aeson")."1.4.6.0").revisions).default;
307+ "aeson".flags.cffi = false;
308+ "aeson".flags.fast = false;
309+ "aeson".flags.bytestring-builder = false;
310+ "aeson".flags.developer = false;
311+ "wai-app-static".revision = (((hackage."wai-app-static")."3.1.6.3").revisions).default;
312+ "wai-app-static".flags.print = false;
313+ "http-types".revision = (((hackage."http-types")."0.12.3").revisions).default;
314+ "ghc-boot-th".revision = (((hackage."ghc-boot-th")."8.6.5").revisions).default;
315+ "th-lift-instances".revision = (((hackage."th-lift-instances")."0.1.14").revisions).default;
316+ "base-orphans".revision = (((hackage."base-orphans")."0.8.1").revisions).default;
317+ "http-date".revision = (((hackage."http-date")."0.0.8").revisions).default;
318+ "th-abstraction".revision = (((hackage."th-abstraction")."0.3.1.0").revisions).default;
319+ "memory".revision = (((hackage."memory")."0.15.0").revisions).default;
320+ "memory".flags.support_bytestring = true;
321+ "memory".flags.support_basement = true;
322+ "memory".flags.support_foundation = true;
323+ "memory".flags.support_deepseq = true;
324+ "fast-logger".revision = (((hackage."fast-logger")."3.0.0").revisions).default;
325+ "bsb-http-chunked".revision = (((hackage."bsb-http-chunked")."0.0.0.4").revisions).default;
326+ "array".revision = (((hackage."array")."0.5.3.0").revisions).default;
327+ "xml".revision = (((hackage."xml")."1.3.14").revisions).default;
328+ "simple-sendfile".revision = (((hackage."simple-sendfile")."0.2.30").revisions).default;
329+ "simple-sendfile".flags.allow-bsd = true;
330+ "integer-gmp".revision = (((hackage."integer-gmp")."1.0.2.0").revisions).default;
331+ };
332+ compiler = {
333+ version = "8.6.5";
334+ nix-name = "ghc865";
335+ packages = {
336+ "binary" = "0.8.6.0";
337+ "ghc-boot" = "8.6.5";
338+ "ghc-prim" = "0.5.3";
339+ "stm" = "2.5.0.0";
340+ "unix" = "2.7.2.2";
341+ "ghc-heap" = "8.6.5";
342+ "mtl" = "2.2.2";
343+ "rts" = "1.0";
344+ "deepseq" = "1.4.4.0";
345+ "parsec" = "3.1.13.0";
346+ "directory" = "1.3.3.0";
347+ "template-haskell" = "2.14.0.0";
348+ "containers" = "0.6.0.1";
349+ "bytestring" = "0.10.8.2";
350+ "xhtml" = "3000.2.2.1";
351+ "text" = "1.2.3.1";
352+ "Cabal" = "2.4.0.1";
353+ "base" = "4.12.0.0";
354+ "time" = "1.8.0.2";
355+ "terminfo" = "0.4.1.2";
356+ "transformers" = "0.5.6.2";
357+ "hpc" = "0.6.0.3";
358+ "filepath" = "1.4.2.1";
359+ "process" = "1.6.5.0";
360+ "pretty" = "1.1.3.6";
361+ "ghc-boot-th" = "8.6.5";
362+ "array" = "0.5.3.0";
363+ "integer-gmp" = "1.0.2.0";
364+ };
365+ };
366+ };
367+ extras = hackage:
368+ {
369+ packages = {
370+ haddock-library-ghcjs = ./.plan.nix/haddock-library-ghcjs.nix;
371+ ghcjs-th = ./.plan.nix/ghcjs-th.nix;
372+ ghc-api-ghcjs = ./.plan.nix/ghc-api-ghcjs.nix;
373+ ghci-ghcjs = ./.plan.nix/ghci-ghcjs.nix;
374+ ghcjs = ./.plan.nix/ghcjs.nix;
375+ haddock-api-ghcjs = ./.plan.nix/haddock-api-ghcjs.nix;
376+ template-haskell-ghcjs = ./.plan.nix/template-haskell-ghcjs.nix;
377+ };
378+ };
379+ modules = [
380+ ({ lib, ... }:
381+ {
382+ packages = {
383+ "haddock-library-ghcjs" = { flags = {}; };
384+ "ghcjs-th" = {
385+ flags = { "use-host-template-haskell" = lib.mkOverride 900 false; };
386+ };
387+ "ghc-api-ghcjs" = {
388+ flags = {
389+ "stage1" = lib.mkOverride 900 false;
390+ "stage2" = lib.mkOverride 900 true;
391+ "debug" = lib.mkOverride 900 false;
392+ "stage3" = lib.mkOverride 900 false;
393+ "use-host-template-haskell" = lib.mkOverride 900 false;
394+ "ghci" = lib.mkOverride 900 true;
395+ "terminfo" = lib.mkOverride 900 true;
396+ };
397+ };
398+ "ghci-ghcjs" = { flags = { "ghci" = lib.mkOverride 900 true; }; };
399+ "ghcjs" = {
400+ flags = {
401+ "compiler-only" = lib.mkOverride 900 false;
402+ "runtime-assertions" = lib.mkOverride 900 false;
403+ "no-wrapper-install" = lib.mkOverride 900 false;
404+ "use-host-template-haskell" = lib.mkOverride 900 false;
405+ "disable-optimizer" = lib.mkOverride 900 false;
406+ };
407+ };
408+ "haddock-api-ghcjs" = { flags = {}; };
409+ "template-haskell-ghcjs" = { flags = {}; };
410+ };
411+ })
412+ ];
413+ }
modules/cabal.nix+5
@@ -8,6 +8,11 @@ let
88
99 compiler = cabal.compiler // {
1010 isGhc = true;
11+ # this is partially a hack to support `impl(ghcjs)`.
12+ # We set GHC == true _and_ GHCJS == true.
13+ isGhcjs = hostMap.os == "Ghcjs";
14+ # maybe we need something for asterius here
15+ # as well.
1116 version = lib.mapAttrs (_: f: v: f (builtins.compareVersions config.compiler.version v)) {
1217 eq = c: c == 0;
1318 gt = c: c > 0;
modules/component-driver.nix+6−1
@@ -26,6 +26,11 @@ in
2626 default = false;
2727 description = "Is lib:ghc reinstallable?";
2828 };
29+ options.setup-depends = lib.mkOption {
30+ type = lib.types.listOf lib.types.unspecified;
31+ default = [];
32+ description = "pkgs to globally provide to Setup.hs builds";
33+ };
2934
3035 # Dependencies (with reinstallable-lib:ghc)
3136 #
@@ -83,6 +88,6 @@ in
8388 buildPackages = buildModules.config.hsPkgs;
8489 } //
8590 lib.mapAttrs
86− (name: pkg: if pkg == null then null else builder.build-package pkg)
91+ (name: pkg: if pkg == null then null else builder.build-package config pkg)
8792 (config.packages // lib.genAttrs (config.nonReinstallablePkgs ++ config.bootPkgs) (_: null));
8893}
overlays/bootstrap.nix+32−8
@@ -245,31 +245,55 @@ in {
245245
246246 ghc-patches = ghc-patches "8.8.2";
247247 };
248− } // self.lib.optionalAttrs (self.targetPlatform.isGhcjs or false) {
249− ghc865 = let ghcjs865 = self.callPackage ../compiler/ghcjs/ghcjs.nix {
248+ } // self.lib.optionalAttrs (self.targetPlatform.isGhcjs or false)
249+ # This will inject `exactDeps` and `envDeps` into the ghcjs
250+ # compiler defined below. This is crucial to build packages
251+ # with the current use of env and exact Deps.
252+ (builtins.mapAttrs
253+ (_: v: v // {
254+ isHaskellNixBootCompiler = true;
255+ })
256+ ({
257+ ghc865 = let buildGHC = self.buildPackages.haskell-nix.compiler.ghc865;
258+ in let ghcjs865 = self.callPackage ../compiler/ghcjs/ghcjs.nix {
250259 ghcjsSrcJson = ../compiler/ghcjs/ghcjs-src.json;
251260 ghcjsVersion = "8.6.0.1";
252− ghc = self.buildPackages.haskell-nix.compiler.ghc865;
261+ ghc = buildGHC;
262+ cabal-install = self.buildPackages.haskell-nix.cabal-install;
263+ # The alex from the bootstrap packages is apparently broken, and will fail with something like:
264+ # > alex: /nix/store/f7b78rg9pmqgvxvsqfzh1przp7pxii5a-alex-3.2.4-exe-alex/share/x86_64-osx-ghc-8.4.4/alex-3.2.4-1pf5faR9dBuJ8mryql0DoA-alex/AlexTemplate-ghc-nopred: openFile: does not exist (No such file or directory)
265+ # inherit (self.buildPackages.haskell-nix.bootstrap.packages) alex happy;
253266 }; in let targetPrefix = "js-unknown-ghcjs-"; in self.runCommand "${targetPrefix}ghc-8.6.5" {
254267 passthru = {
255268 inherit targetPrefix;
256269 version = "8.6.5";
270+ isHaskellNixCompiler = true;
271+ inherit (ghcjs865) configured-src;
272+ inherit buildGHC;
273+ extraConfigureFlags = [
274+ "--ghcjs"
275+ "--with-ghcjs=${targetPrefix}ghc" "--with-ghcjs-pkg=${targetPrefix}ghc-pkg"
276+ # setting gcc is stupid. non-emscripten ghcjs has no cc.
277+ # however cabal insists on compiling the c sources. m(
278+ "--with-gcc=${self.buildPackages.stdenv.cc}/bin/cc"
279+ ];
257280 };
258− } ''
281+ # note: we'll use the buildGHCs `hsc2hs`, ghcjss wrapper just horribly breaks in this nix setup.
282+ } (''
259283 mkdir -p $out/bin
260284 cd $out/bin
261285 ln -s ${ghcjs865}/bin/ghcjs ${targetPrefix}ghc
262286 ln -s ${ghcjs865}/bin/ghcjs-pkg ${targetPrefix}ghc-pkg
263− ln -s ${ghcjs865}/bin/hsc2hs-ghcjs ${targetPrefix}hsc2hs
287+ ln -s ${buildGHC}/bin/hsc2hs ${targetPrefix}hsc2hs
264288 cd ..
265289 mkdir lib
266290 cd lib
267291 cp -R ${ghcjs865}/lib/ghcjs-8.6.5 ${targetPrefix}ghc-8.6.5
268− '';
269− });
292+ '' + installDeps targetPrefix);
293+ })));
270294
271295 ghc = self.haskell-nix.compiler.ghc865;
272− cabal-install = self.buildPackages.haskell-nix.bootstrap.packages.cabal-install;
296+ inherit (self.buildPackages.haskell-nix.bootstrap.packages) cabal-install alex happy;
273297
274298 # WARN: The `import ../. {}` will prevent
275299 # any cross to work, as we will loose
overlays/haskell.nix+5
@@ -455,6 +455,11 @@ self: super: {
455455 shells.ghc = p.hsPkgs.shellFor {};
456456 };
457457
458+ # Like `cabalProject'`, but for building the GHCJS compiler.
459+ # This is exposed to allow GHCJS developers to work on the GHCJS
460+ # code in a nix-shell with `shellFor`.
461+ ghcjsProject = import ../lib/ghcjs-project.nix { pkgs = self; };
462+
458463 # The functions that return a plan-nix often have a lot of dependencies
459464 # that could be GCed and also will not make it into hydra cache.
460465 # Use this `withInputs` function to make sure your tests include