-
-
Save HoldenLucas/177fa32edd4995023db4e5427ebfc323 to your computer and use it in GitHub Desktop.
Flake for using Haskell in nix develop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:def hoogle \x -> return $ ":!hoogle --count=15 \"" ++ x ++ "\"" | |
:def doc \x -> return $ ":!hoogle --info \"" ++ x ++ "\"" | |
:set -Wall | |
:set -fno-warn-type-defaults -ferror-spans -freverse-errors -fprint-expanded-synonyms | |
:set prompt "\ESC[0;32m%s\n\ESC[m[ghci]\ESC[38;5;172mλ \ESC[m" | |
:set prompt-cont " \ESC[38;5;172m> \ESC[m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Simple haskell nix flake"; | |
nixConfig.bash-prompt = "[nix]\\e\[38;5;172mλ \\e\[m"; | |
inputs = { | |
nixpkgs.url = "nixpkgs/nixos-21.05"; | |
flake-utils = { | |
url = "github:numtide/flake-utils"; | |
inputs.nixpkgs.follows = "nixpkgs"; | |
}; | |
}; | |
outputs = { flake-utils, nixpkgs, self }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
config = {}; | |
overlays = []; | |
pkgs = import nixpkgs { inherit config overlays system; }; | |
in rec { | |
devShell = pkgs.haskellPackages.shellFor { | |
packages = p: [ | |
]; | |
buildInputs = with pkgs.haskellPackages; [ | |
cabal-install | |
# Helpful tools for `nix develop` shells | |
# | |
#ghcid # https://github.com/ndmitchell/ghcid | |
#haskell-language-server # https://github.com/haskell/haskell-language-server | |
#hlint # https://github.com/ndmitchell/hlint | |
#ormolu # https://github.com/tweag/ormolu | |
]; | |
withHoogle = true; | |
}; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment