-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
57 lines (48 loc) · 1.56 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
{
description = "Chez Scheme backend for PureScript";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
purescript-overlay.url = "github:thomashoneyman/purescript-overlay";
purescript-overlay.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, ... }@inputs:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
overlays = builtins.attrValues self.overlays;
});
in
{
overlays = {
purescript = inputs.purescript-overlay.overlays.default;
};
devShells = forAllSystems (system:
let pkgs = nixpkgsFor.${system};
in {
default = pkgs.mkShell {
name = "purescm";
packages = [
pkgs.purescript-language-server
pkgs.purs-backend-es
pkgs.purs-bin.purs-0_15_10
pkgs.purs-tidy
pkgs.spago-unstable
pkgs.nodejs-slim
pkgs.esbuild
pkgs.pkg-config
pkgs.icu
pkgs.chez
];
CHEZ_DYLD_LIBRARY_PATH="${pkgs.pcre2.out}/lib:${pkgs.icu.out}/lib";
LD_LIBRARY_PATH = "${pkgs.pcre2.out}/lib:${pkgs.icu.out}/lib";
};
});
formatter = forAllSystems (system: nixpkgsFor.${system}.nixpkgs-fmt);
};
}