-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
51 lines (45 loc) · 1.15 KB
/
default.nix
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
42
43
44
45
46
47
48
49
50
51
{ compiler ? "ghc928" }:
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs {};
gitignore = pkgs.nix-gitignore.gitignoreSourcePure [ ./.gitignore ];
myHaskellPackages = pkgs.haskell.packages.${compiler}.override {
overrides = hself: hsuper: {
"karmaDM" =
hself.callCabal2nix
"karmaDM"
(gitignore ./.)
{};
};
};
shell = myHaskellPackages.shellFor {
packages = p: [
p."karmaDM"
];
buildInputs = [
myHaskellPackages.haskell-language-server
pkgs.haskellPackages.cabal-install
pkgs.haskellPackages.stylish-haskell
pkgs.haskellPackages.ghcid
pkgs.haskellPackages.fourmolu
pkgs.haskellPackages.hlint
pkgs.niv
pkgs.nixpkgs-fmt
];
withHoogle = true;
withHaskellDoc = true;
withHaddock = true;
};
exe = pkgs.haskell.lib.justStaticExecutables (myHaskellPackages."karmaDM");
docker = pkgs.dockerTools.buildImage {
name = "karmaDM";
config.Cmd = [ "${exe}/bin/karmaDM" ];
};
in
{
inherit shell;
inherit exe;
inherit docker;
inherit myHaskellPackages;
"karmaDM" = myHaskellPackages."karmaDM";
}