From f8b7b030d293c17232753103564eba7e2f417a24 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 11 Apr 2021 14:03:58 +0530 Subject: Adds collection of shell files and new-shell command --- shell/haskell.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 shell/haskell.nix (limited to 'shell/haskell.nix') diff --git a/shell/haskell.nix b/shell/haskell.nix new file mode 100644 index 0000000..9f34468 --- /dev/null +++ b/shell/haskell.nix @@ -0,0 +1,31 @@ +{ nixpkgs ? import {}, haskellPackages ? nixpkgs.haskellPackages, compiler ? "default", doBenchmark ? false }: + +let + inherit (nixpkgs) pkgs; + systemPackages = [ + haskellPackages.haskell-language-server + haskellPackages.cabal-install + pkgs.entr # Re-run on file change + ]; + + commonHsPackages = with haskellPackages; [ + base + bytestring + containers + random + raw-strings-qq + ]; +in + with haskellPackages; mkDerivation { + pname = "hs-project"; + version = "0.1.0.0"; + src = ./.; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = commonHsPackages; + executableHaskellDepends = commonHsPackages; + executableSystemDepends = systemPackages; + testHaskellDepends = commonHsPackages ++ [ hspec ]; + license = "MIT"; + hydraPlatforms = stdenv.lib.platforms.none; + } -- cgit v1.3.1