summaryrefslogtreecommitdiffstats
path: root/env.nix
blob: b0f5c056166bdbecf41968b55fabca1556b97cea (plain)
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
{ pkgs ? import <nixpkgs> {} }:

let
  pname = "cgserver";
  version = "2";

  buildInputs = with pkgs; [
    hsEnv
  ];

  extraCmds = ''
    $(grep export ${hsEnv.outPath}/bin/ghc)
  '';

  hsEnv = pkgs.haskellngPackages.ghcWithPackages
    (self: with self;
      (callPackage ./cgserver.nix {}).nativeBuildInputs ++
      [
        cabal-install
      ]
    );

in pkgs.myEnvFun {
  name = "${pname}-${version}";
  inherit buildInputs extraCmds;
}