Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { nixpkgs ? import <nixpkgs> {}
- , compiler ? "default"
- , withHoogle ? true
- }:
- let
- inherit (nixpkgs) pkgs;
- packageSet = if compiler == "default"
- then pkgs.haskellPackages
- else pkgs.haskell.packages.${compiler};
- haskellPackages =
- if withHoogle
- then packageSet.override {
- overrides = (self: super: {
- ghc = super.ghc // { withPackages = super.ghc.withHoogle; };
- ghcWithPackages = self.ghc.withPackages;
- });
- }
- else packageSet;
- f = import ./default.nix;
- drv = haskellPackages.callPackage f {};
- in
- if pkgs.lib.inNixShell then drv.env else drv
Add Comment
Please, Sign In to add comment