-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
58 lines (53 loc) · 1.65 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
{
description = "Kadena's Pact smart contract language";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?rev=4d2b37a84fad1091b9de401eb450aae66f1a741e";
# nixpkgs.follows = "haskellNix/nixpkgs-unstable";
haskellNix.url = "github:input-output-hk/haskell.nix";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, haskellNix }:
flake-utils.lib.eachSystem
[ "x86_64-linux" "x86_64-darwin"
"aarch64-linux" "aarch64-darwin" ] (system:
let
pkgs = import nixpkgs {
inherit system overlays;
inherit (haskellNix) config;
};
flake = pkgs.pact-lsp.flake {
# crossPlatforms = p: [ p.ghcjs ];
};
overlays = [ haskellNix.overlay
(final: prev: {
pact-lsp =
final.haskell-nix.project' {
src = ./.;
compiler-nix-name = "ghc962";
shell.tools = {
cabal = {};
haskell-language-server = {};
# hlint = {};
};
shell.buildInputs = with pkgs; [
zlib
z3
pkgconfig
python3 python3Packages.sphinx python3Packages.sphinx_rtd_theme
pandoc perl
];
# shell.crossPlatforms = p: [ p.ghcjs ];
};
})
];
in flake // rec {
packages.default = flake.packages."pact-lsp:exe:pact-lsp";
devShell = pkgs.haskellPackages.shellFor {
buildInputs = with pkgs.haskellPackages; [
cabal-install
haskell-language-server
];
withHoogle = true;
};
});
}