-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
65 lines (63 loc) · 2.11 KB
/
flake.nix
File metadata and controls
65 lines (63 loc) · 2.11 KB
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
65
{
description = "Hamlet-free Lucid Yesod app";
inputs = {
haskellNix.url = "github:input-output-hk/haskell.nix";
nixpkgs.follows = "haskellNix/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs@{ self
, nixpkgs
, flake-utils
, haskellNix
}:
let
overlays =
[ haskellNix.overlay
(final: prev: {
nixTalk = final.haskell-nix.stackProject {
src = final.haskell-nix.cleanSourceHaskell {
src = ./.;
name = "nixTalk";
};
shell.buildInputs = with pkgs; [
ghcid
haskell-language-server
haskellPackages.yesod-bin
hlint
stack
stylish-haskell
];
shell.additional = hsPkgs: with hsPkgs; [ Cabal ];
};
nixTalk-wrapper = pkgs.writeShellApplication {
name = "nixTalk-wrapped";
runtimeInputs = [ self.packages.x86_64-linux.default ];
text = ''
cd ~/nixTalk
${self.packages.x86_64-linux.default}/bin/nixTalk
'';
};
})
];
pkgs = import nixpkgs {
system = "x86_64-linux";
inherit overlays;
inherit (haskellNix) config;
};
flake = pkgs.nixTalk.flake{};
in
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: flake //{
packages = flake.packages // {
default = flake.packages."nixTalk:exe:nixTalk";
nixTalk-wrapper = pkgs.nixTalk-wrapper;
};
apps = flake.apps // { default = flake.apps."nixTalk:exe:nixTalk"; };
# legacyPackages = flake.legacyPackages;
});
# --- Flake Local Nix Configuration ----------------------------
nixConfig = {
extra-substituters = ["https://cache.iog.io"];
extra-trusted-public-keys = ["hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="];
allow-import-from-derivation = "true";
};
}