-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
42 lines (36 loc) · 1.07 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
{ 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: {
"trynocular" = hself.callCabal2nix "trynocular" (gitignore ./.) { };
};
};
shell = myHaskellPackages.shellFor {
packages = p: [ p."trynocular" ];
buildInputs = [
myHaskellPackages.haskell-language-server
pkgs.haskellPackages.cabal-install
pkgs.haskellPackages.ghcid
pkgs.haskellPackages.ormolu
pkgs.haskellPackages.hlint
pkgs.haskellPackages.hasktags
pkgs.niv
pkgs.nixpkgs-fmt
];
withHoogle = true;
};
exe = pkgs.haskell.lib.justStaticExecutables (myHaskellPackages."trynocular");
docker = pkgs.dockerTools.buildImage {
name = "trynocular";
config.Cmd = [ "${exe}/bin/trynocular" ];
};
in {
inherit shell;
inherit exe;
inherit docker;
inherit myHaskellPackages;
"trynocular" = myHaskellPackages."trynocular";
}