-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
99 lines (95 loc) · 2.77 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
inputs = {
haskellNix.url = "github:input-output-hk/haskell.nix";
nixpkgs.follows = "haskellNix/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
easy-purescript-nix.url = "github:justinwoo/easy-purescript-nix";
};
outputs =
{
self,
nixpkgs,
flake-utils,
haskellNix,
easy-purescript-nix,
}:
let
supportedSystems = [ "x86_64-linux" ];
in
flake-utils.lib.eachSystem supportedSystems (
system:
let
easy-ps = easy-purescript-nix.packages.${system};
pkgs = import nixpkgs {
inherit system overlays;
inherit (haskellNix) config;
};
overlays = [
haskellNix.overlay
(final: prev: {
psluaProject = final.haskell-nix.project' {
src = ./.;
compiler-nix-name = "ghc98";
evalSystem = "x86_64-linux";
modules =
let
prof = false;
in
[
{
doHaddock = false;
doHoogle = false;
enableProfiling = prof;
enableLibraryProfiling = prof;
}
];
name = "purescript-lua";
shell = {
tools = {
cabal = { };
fourmolu = { };
hlint = { };
haskell-language-server = { };
};
buildInputs = with pkgs; [
cachix
easy-ps.purs-0_15_15
easy-ps.spago
lua51Packages.lua
lua51Packages.luacheck
nil
treefmt
upx
yamlfmt
];
};
crossPlatforms =
p:
pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86_64 (
pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [ p.musl64 ]
);
};
})
];
flake = pkgs.psluaProject.flake { };
in
flake
// {
legacyPackages = pkgs;
packages.default = flake.packages."pslua:exe:pslua";
packages.static = flake.ciJobs.x86_64-unknown-linux-musl.packages."pslua:exe:pslua";
}
);
# --- Flake Local Nix Configuration ----------------------------
nixConfig = {
extra-substituters = [
"https://cache.iog.io"
"https://purescript-lua.cachix.org"
];
extra-trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"purescript-lua.cachix.org-1:yLs4ei2HtnuPtzLekOrW3xdfm95+Etw15gwgyIGTayA="
];
allow-import-from-derivation = "true";
};
}