From 3f35767016871886ce4c83a7469794a279e69c2f Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Fri, 8 Dec 2023 14:11:16 +0530 Subject: [PATCH] add devShell for haskell --- README.md | 5 +++++ flake.nix | 1 + haskell.nix | 8 ++++++++ 3 files changed, 14 insertions(+) create mode 100644 haskell.nix diff --git a/README.md b/README.md index 72325ba..fbfa3ad 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,8 @@ This repo contains a bunch of handy dev shells that can used on any system that - can be activated with `nix develop github:adtya/devshell#python` - can also be activated with direnv by adding `use flake github:adtya/devshell#python` to `.envrc` - additionally, adding `layout pipenv` to `.envrc` will also activate the pipenv shell based on Pipfile and Pipfile.lock + +### Haskell + - makes `ghc`, `haskell-language-server`, `cabal` and `stack` available in path + - can be activated with `nix develop github:adtya/devshell#haskell` + - can also be activated with direnv by adding `use flake github:adtya/devshell#haskell` to `.envrc` diff --git a/flake.nix b/flake.nix index 80441ef..6fa00a6 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,7 @@ devShells = { go = import ./go.nix { inherit pkgs; }; python = import ./python.nix { inherit pkgs; }; + haskell = import ./haskell.nix { inherit pkgs; }; }; } ); diff --git a/haskell.nix b/haskell.nix new file mode 100644 index 0000000..a493519 --- /dev/null +++ b/haskell.nix @@ -0,0 +1,8 @@ +{ pkgs }: pkgs.mkShell { + packages = with pkgs.haskellPackages; [ + ghc + haskell-language-server + cabal-install + stack + ]; +}