cabal2nix icon indicating copy to clipboard operation
cabal2nix copied to clipboard

Add option to use ghcWithHoogle

Open rdesfo opened this issue 8 years ago • 3 comments

something like --hoogle would be useful when generating shell.nix

rdesfo avatar Jul 01 '16 18:07 rdesfo

Note that with https://github.com/NixOS/nixpkgs/pull/33012 this will be easier

shlevy avatar Dec 24 '17 18:12 shlevy

For people not using the shell flag, I followed the pattern here https://mmhaskell.com/blog/2020/2/10/converting-cabal-to-nix, and was able to get hoogle working by passing withHoogle=true to envFunc:

# shell.nix
{ pkgs ? import <nixpkgs> { } }:

with pkgs;
let
    project = import ./release.nix; in
stdenv.mkDerivation {
    name = "shell";
   buildInputs = (project.envFunc { withHoogle = true; }).nativeBuildInputs;
}

joprice avatar Dec 03 '20 12:12 joprice

Note for anyone thinking of trying the above shell.nix, there's a good chance you'll run into NixOS/nixpkgs#82245 and it won't work.

carlfish avatar Jan 11 '21 06:01 carlfish