-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
48 lines (45 loc) · 1.37 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
{
description = "Basic purescript flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
purescript-overlay = {
url = "github:thomashoneyman/purescript-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
easy-purescript-nix.url = "github:justinwoo/easy-purescript-nix";
};
outputs = { self, nixpkgs, purescript-overlay, easy-purescript-nix }:
let
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
nixpkgsFor = forAllSystems(system: import nixpkgs {
inherit system;
overlays = [ self.overlay purescript-overlay.overlays.default ];
});
in
{
overlay = self: super: {};
devShells = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
easy-ps = easy-purescript-nix.packages.${system};
in
{
default = pkgs.mkShell {
buildInputs = [
easy-ps.purs-0_15_8
easy-ps.spago
easy-ps.purescript-language-server
easy-ps.purs-tidy
pkgs.nodejs-18_x
pkgs.esbuild
pkgs.treefmt
];
shellHook = ''
export PS1='[$PWD]\n❄ '
source <(spago --bash-completion-script `which spago`)
source <(node --completion-bash)
'';
};
});
};
}