Skip to content

Commit

Permalink
Merge pull request #543 from Profpatsch/shell-nix-add-hls-and-ghc-deps
Browse files Browse the repository at this point in the history
shell.nix: Set up ghc environment, add haskell-language-server
  • Loading branch information
maralorn authored Mar 7, 2022
2 parents 880c049 + 31f19e3 commit c4bcf64
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if type -p lorri; then
echo "direnv: found lorri, using" 1>&2
eval "$(lorri direnv)"
else
echo "direnv: using direnv nix support" 1>&2
use nix;
fi
31 changes: 31 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{ pkgs ? import <nixpkgs> {} }:

let
haskellPackages = pkgs.haskellPackages;
ghc = haskellPackages.ghcWithHoogle (hps: [
hps.ansi-wl-pprint
hps.distribution-nixpkgs
hps.hackage-db
hps.hopenssl
hps.hpack
hps.language-nix
hps.lens
hps.optparse-applicative
hps.pretty
hps.split
hps.yaml
hps.monad-par
hps.monad-par-extras
hps.tasty
hps.tasty-golden
]);

in pkgs.stdenv.mkDerivation {
name = "shell";
buildInputs = [
ghc
haskellPackages.cabal-install
haskellPackages.haskell-language-server
(pkgs.lib.getLib pkgs.openssl)
];
}

0 comments on commit c4bcf64

Please sign in to comment.