-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
64 lines (55 loc) · 1.71 KB
/
flake.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
52
53
54
55
56
57
58
59
60
61
62
63
64
{
description = "slugger: Clean URI slugs for Haskell";
nixConfig = {
allow-import-from-derivation = "true";
bash-prompt = "[nix]λ ";
extra-substituters = [
"https://cache.iog.io"
"https://cache.zw3rk.com" # https://github.com/input-output-hk/haskell.nix/issues/1408
];
extra-trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk="
];
};
inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils, haskellNix }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ haskellNix.overlay
(final: prev: {
sluggerProject = final.haskell-nix.project' {
src = ./.;
compiler-nix-name = "ghc925";
shell.buildInputs = [
slugger-cli
];
#shell.tools = {
# cabal = "latest";
# hlint = "latest";
# haskell-language-server = "latest";
#};
};
})
];
pkgs = import nixpkgs {
inherit overlays system;
inherit (haskellNix) config;
};
flake = pkgs.sluggerProject.flake {};
executable = "slugger:exe:slugger";
slugger-cli = flake.packages.${executable};
in flake // rec {
apps = {
default = flake-utils.lib.mkApp {
drv = slugger-cli;
};
};
packages = {
default = slugger-cli;
};
}
);
}