~yoctocell/flaskell

flaskell/overlay.nix -rw-r--r-- 935 bytes
34a243b0Xinglu Chen .gitignore: Ignore etags 1 year, 7 months ago
                                                                                
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
32
33
34
35
36
37
38
39
40
41
self: super:
let
  myEnv = super.haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [
    optparse-applicative
    regex
    ansi-terminal
    base
    cabal-install
  ]);
in
{
  haskellPackages = super.haskellPackages.override {
    overrides = self: super: {
      flaskell = self.callPackage ./. { };
    };
  };

  flaskellHaskellPkgs = self.haskell.packages.ghc884.override {
    overrides = hself: hsuper: {
      flaskell = hself.callCabal2nix "flaskell" ./. { };

      flaskellLocalPkgs = [ hself.flaskell ];
    };
  };
  flaskellShell = self.flaskellHaskellPkgs.shellFor {
    packages = pkgs: pkgs.flaskellLocalPkgs;
    buildInputs = [
      myEnv
      self.haskellPackages.ghcWithPackages
      (hpkgs: with hpkgs; [
        flaskell
      ])
    ];
  };

  flaskellExe = self.buildEnv {
    name = "flaskell";
    paths = self.flaskellHaskellPkgs.flaskellLocalPkgs;
    extraOutputsToInstall = [ "dev" "out" ];
  };
}