{ nixpkgs ? import {} , compiler ? "default" , doBenchmark ? false }: let # cabal2nix . > regfish.nix packageFile = ./regfish.nix; inherit (nixpkgs) lib pkgs; haskellPackages = if compiler == "default" then pkgs.haskellPackages else pkgs.haskell.packages.${compiler}; hoogle = haskellPackages.callPackage { packages = (haskellPackages.callPackage packageFile { mkDerivation = pkgs.lib.id; }).executableHaskellDepends; }; variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id; drv = variant (haskellPackages.callPackage packageFile { }); in pkgs.lib.overrideDerivation drv.env (oldAttrs: { buildInputs = [ pkgs.cabal-install ]; shellHook = '' cd ${lib.escapeShellArg (toString ./.)} alias ghci='ghci -flocal-ghci-history -odir ~/tmp/regfish -hidir ~/tmp/regfish' export HISTFILE=.bash_history HISTSIZE=100000 if test -e .profile; then . ./.profile fi ''; })