{ compiler ? "default" , nixpkgs ? import {} }: let inherit (nixpkgs) lib pkgs; haskellPackages = if compiler == "default" then pkgs.haskellPackages else pkgs.haskell.packages.${compiler}; drv = haskellPackages.callPackage (import ./package.nix) {}; in lib.overrideDerivation drv.env (oldAttrs: { buildInputs = [ pkgs.cabal-install ]; shellHook = '' CABAL_BUILD_DIR=$HOME/tmp/cache/${drv.pname} cabal() { command=$1; shift ${pkgs.cabal-install}/bin/cabal \ "$command" \ --builddir="$CABAL_BUILD_DIR" \ "$@" } ''; })