aboutsummaryrefslogtreecommitdiff
path: root/shell/haskell.nix
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2021-04-11 14:03:58 +0530
committerAkshay Nair <phenax5@gmail.com>2021-04-11 14:03:58 +0530
commitf8b7b030d293c17232753103564eba7e2f417a24 (patch)
tree7abbccfea61558b90b4ebd67e9cc787c09ac0055 /shell/haskell.nix
parent23dc78eff4857942a1af3cdf86fddb9fb0404607 (diff)
downloadnixos-config-f8b7b030d293c17232753103564eba7e2f417a24.tar.gz
nixos-config-f8b7b030d293c17232753103564eba7e2f417a24.zip
Adds collection of shell files and new-shell command
Diffstat (limited to '')
-rw-r--r--shell/haskell.nix31
1 files changed, 31 insertions, 0 deletions
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 <nixpkgs> {}, 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;
+ }