Skip to content

Commit

Permalink
shell.nix: Set up ghc environment, add haskell-language-server
Browse files Browse the repository at this point in the history
Manually lists the nix dependencies required by cabal2nix; this of
course requires that the local <nixpkgs> version agrees with the
package versions of cabal2nix dependencies, so ymmv.
  • Loading branch information
Profpatsch committed Mar 4, 2022
1 parent 39da11f commit 31f19e3
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 31f19e3

Please sign in to comment.