{ pkgs ? import sources.nixpkgs { overlays = [ (import "${sources.acms}/pkgs" { }) (import ./pkgs { }) (self: super: { haskell = super.haskell // { packageOverrides = self.lib.composeManyExtensions [ super.haskell.packageOverrides (self: super: { ghcWithPackages = super.ghcWithPackages.override { installDocumentation = false; # XXX true (default) }; }) ]; }; }) ]; } , sources ? import ./nix/sources.nix }: let ghc = "ghc910"; in rec { frontend = pkgs.pkgsCross.ghcjs.haskell.packages.${ghc}.achat; backend = pkgs.haskell.packages.${ghc}.achat; shell = pkgs.mkShell { inputsFrom = [ (pkgs.pkgsCross.ghcjs.haskell.packages.${ghc}.shellFor { packages = haskellPackages: [ haskellPackages.achat ]; }) (pkgs.haskell.packages.${ghc}.shellFor { packages = haskellPackages: [ haskellPackages.achat ]; }) (pkgs.mkShell { buildInputs = [ pkgs.haskell.packages.${ghc}.cabal-install pkgs.haskell.packages.${ghc}.ormolu (pkgs.writers.writeDashBin "build-frontend" '' set -efu cabal \ --with-compiler=javascript-unknown-ghcjs-ghc \ --with-hc-pkg=javascript-unknown-ghcjs-ghc-pkg \ build '') (pkgs.writers.writeDashBin "build-backend" '' set -efu cabal build '') (pkgs.writers.writeDashBin "build" '' set -efu build-frontend build-backend '') pkgs.python3 ]; shellHook = '' export EM_CACHE="${toString ./.}/.emcache" # nixos/nixpkgs#282509 ''; }) ]; }; }