aboutsummaryrefslogtreecommitdiff
path: root/shell/haskell.nix
blob: 9f3446862d62f06c3f73b8ccae76ae111bf87625 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
  }