Skip to content

Commit c4bcf64

Browse files
authored
Merge pull request #543 from Profpatsch/shell-nix-add-hls-and-ghc-deps
shell.nix: Set up ghc environment, add haskell-language-server
2 parents 880c049 + 31f19e3 commit c4bcf64

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.envrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
if type -p lorri; then
2+
echo "direnv: found lorri, using" 1>&2
3+
eval "$(lorri direnv)"
4+
else
5+
echo "direnv: using direnv nix support" 1>&2
6+
use nix;
7+
fi

shell.nix

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{ pkgs ? import <nixpkgs> {} }:
2+
3+
let
4+
haskellPackages = pkgs.haskellPackages;
5+
ghc = haskellPackages.ghcWithHoogle (hps: [
6+
hps.ansi-wl-pprint
7+
hps.distribution-nixpkgs
8+
hps.hackage-db
9+
hps.hopenssl
10+
hps.hpack
11+
hps.language-nix
12+
hps.lens
13+
hps.optparse-applicative
14+
hps.pretty
15+
hps.split
16+
hps.yaml
17+
hps.monad-par
18+
hps.monad-par-extras
19+
hps.tasty
20+
hps.tasty-golden
21+
]);
22+
23+
in pkgs.stdenv.mkDerivation {
24+
name = "shell";
25+
buildInputs = [
26+
ghc
27+
haskellPackages.cabal-install
28+
haskellPackages.haskell-language-server
29+
(pkgs.lib.getLib pkgs.openssl)
30+
];
31+
}

0 commit comments

Comments
 (0)