-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
51 lines (45 loc) · 1.37 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 ? "ghc965" }:
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: {
"hledger-locker" =
(hself.callCabal2nix "hledger-locker" (gitignore ./.) { }).overrideAttrs (
old: rec {
nativeBuildInputs = [ pkgs.git ] ++ old.nativeBuildInputs;
}
);
};
};
shell = myHaskellPackages.shellFor {
packages = p: [
p."hledger-locker"
];
buildInputs = [
myHaskellPackages.haskell-language-server
pkgs.haskellPackages.cabal-install
#pkgs.haskellPackages.ormolu
pkgs.haskellPackages.stylish-haskell
pkgs.haskellPackages.hlint
pkgs.haskellPackages.hpack
#pkgs.haskellPackages.stan # marked as broken and allowing broken packages does not fix the issue here
#pkgs.niv
pkgs.nixpkgs-fmt
];
withHoogle = true;
};
exe = pkgs.haskell.lib.justStaticExecutables (myHaskellPackages."hledger-locker");
#docker = pkgs.dockerTools.buildImage {
#name = "hledger-locker";
#config.Cmd = [ "${exe}/bin/hledger-locker" ];
#};
in
{
inherit shell;
inherit exe;
#inherit docker;
inherit myHaskellPackages;
"hledger-locker" = myHaskellPackages."hledger-locker";
}