diff options
Diffstat (limited to 'Biz/Bild.nix')
-rw-r--r-- | Biz/Bild.nix | 77 |
1 files changed, 39 insertions, 38 deletions
diff --git a/Biz/Bild.nix b/Biz/Bild.nix index 44c500a..bcb1940 100644 --- a/Biz/Bild.nix +++ b/Biz/Bild.nix @@ -3,7 +3,7 @@ with nixpkgs; let - ghcCompiler = "ghc865"; + ghcCompiler = "ghc884"; ghcjsCompiler = "ghcjs86"; # provided by .envrc @@ -26,7 +26,7 @@ let haskellDeps = hpkgs: import ./Bild/Deps/Haskell.nix hpkgs; mkGhcPackageSet = pkgs.haskell.packages.${ghcCompiler}.ghcWithHoogle; - mkGhcjsPackageSet = pkgs.haskell.packages.${ghcjsCompiler}.ghcWithPackages; + #mkGhcjsPackageSet = pkgs.haskell.packages.${ghcjsCompiler}.ghcWithPackages; in rec { # gather data needed for compiling by analyzing the main module @@ -87,30 +87,30 @@ in rec { installPhase = "exit 0"; } // { env = ghc; }; - ghcjs = main: - let - data = analyze main; - ghcjs = mkGhcjsPackageSet (hp: selectAttrs data.deps hp); - in stdenv.mkDerivation { - name = data.module; - src = ../.; - nativeBuildInputs = [ ghcjs ]; - strictDeps = true; - buildPhase = '' - mkdir -p $out/static - # compile with ghcjs - ${ghcjs}/bin/ghcjs \ - -Werror \ - -i. \ - --make ${main} \ - -main-is ${data.module} \ - -o ${data.out} - # optimize js output - ${pkgs.closurecompiler}/bin/closure-compiler \ - ${data.out}/all.js > $out/static/${data.out} - ''; - installPhase = "exit 0"; - } // { env = ghcjs; }; + #ghcjs = main: + # let + # data = analyze main; + # ghcjs = mkGhcjsPackageSet (hp: selectAttrs data.deps hp); + # in stdenv.mkDerivation { + # name = data.module; + # src = ../.; + # nativeBuildInputs = [ ghcjs ]; + # strictDeps = true; + # buildPhase = '' + # mkdir -p $out/static + # # compile with ghcjs + # ${ghcjs}/bin/ghcjs \ + # -Werror \ + # -i. \ + # --make ${main} \ + # -main-is ${data.module} \ + # -o ${data.out} + # # optimize js output + # ${pkgs.closurecompiler}/bin/closure-compiler \ + # ${data.out}/all.js > $out/static/${data.out} + # ''; + # installPhase = "exit 0"; + # } // { env = ghcjs; }; env = mkShell { name = "bizdev"; @@ -118,18 +118,17 @@ in rec { # haskell deps (mkGhcPackageSet haskellDeps) # ghcjs doesn't need everything, and many things fail to build - (mkGhcjsPackageSet (hp: with hp; [ - aeson - clay - containers - miso - protolude - servant - split - string-quote - text - ghcjs-base - ])) + #(mkGhcjsPackageSet (hp: with hp; [ + # aeson + # clay + # containers + # miso + # protolude + # servant + # split + # text + # ghcjs-base + #])) # python deps (nixpkgs.python38.withPackages (p: @@ -164,4 +163,6 @@ in rec { }; os = cfg: (nixos (args: cfg)).toplevel; + + sources = nixpkgs.sources; } |