cabal2nix
cabal2nix copied to clipboard
Add option to use ghcWithHoogle
something like --hoogle would be useful when generating shell.nix
Note that with https://github.com/NixOS/nixpkgs/pull/33012 this will be easier
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;
}
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.