{ pkgs ? import sources.nixpkgs { } , sources ? import ./nix/sources.nix }: let haskellPackages = pkgs.haskell.packages.ghc98.override { overrides = self: super: { astore = self.callCabal2nix "astore" sources.json2sql { }; autotypes = self.callCabal2nix "autotypes" ./autotypes { }; backend = self.callCabal2nix "backend" ./backend { }; common = self.callCabal2nix "common" ./common { }; frontend = self.callCabal2nix "frontend" ./frontend { }; cli = self.callCabal2nix "cli" ./cli { }; sh = pkgs.haskell.lib.dontCheck (self.callCabal2nix "sh" sources.sh { }); websockets = pkgs.haskell.lib.doJailbreak super.websockets; }; }; jsHaskellPackages = pkgs.pkgsCross.ghcjs.haskell.packages.ghc98.override { overrides = self: super: { backend = self.callCabal2nix "backend" ./backend { }; common = self.callCabal2nix "common" ./common { }; frontend = self.callCabal2nix "frontend" ./frontend { }; }; }; in rec { inherit (haskellPackages) backend; inherit (jsHaskellPackages) frontend; shell = haskellPackages.shellFor { packages = _: [ haskellPackages.autotypes haskellPackages.backend haskellPackages.cli haskellPackages.common haskellPackages.cli haskellPackages.frontend ]; buildInputs = [ haskellPackages.astore haskellPackages.autotypes haskellPackages.cabal-install haskellPackages.ormolu pkgs.niv (pkgs.writeScriptBin "reload" '' set -efu ${haskellPackages.ghcid.bin}/bin/ghcid -c \ '${haskellPackages.cabal-install}/bin/cabal new-repl' \ -T ':run Main.main' '') ]; withHoogle = true; withHaddock = true; }; }