Skip to content

Commit 39f7ebb

Browse files
authored
Merge pull request #2 from Unisay/chore/normalize-tooling
chore: normalize build tooling (nix CI, fail-fast scripts, fresh flake)
2 parents 395c4b6 + e63561b commit 39f7ebb

4 files changed

Lines changed: 81 additions & 44 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ jobs:
1818
extra-substituters = https://cache.iog.io https://purescript-lua.cachix.org
1919
extra-trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= purescript-lua.cachix.org-1:yLs4ei2HtnuPtzLekOrW3xdfm95+Etw15gwgyIGTayA=
2020
21+
- name: Build
22+
run: nix develop -c ./scripts/build
23+
2124
- name: Test
22-
run: nix develop -c ./scripts/test
25+
run: if [ -f scripts/test ]; then nix develop -c ./scripts/test; fi
2326

2427
- name: Luacheck
2528
run: nix develop -c luacheck --quiet --std min src/

flake.lock

Lines changed: 44 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,45 @@
44
inputs = {
55
flake-utils.url = "github:numtide/flake-utils";
66
nixpkgs.url = "nixpkgs/nixos-unstable";
7-
easyps = {
8-
url = "github:justinwoo/easy-purescript-nix";
9-
flake = false;
7+
purescript-overlay = {
8+
url = "github:thomashoneyman/purescript-overlay";
9+
inputs.nixpkgs.follows = "nixpkgs";
1010
};
1111
pslua.url = "github:Unisay/purescript-lua";
1212
};
1313

14-
outputs = { self, nixpkgs, flake-utils, easyps, pslua }:
14+
outputs = { self, nixpkgs, flake-utils, purescript-overlay, pslua }:
1515
flake-utils.lib.eachDefaultSystem (system:
1616
let
17-
p = nixpkgs.legacyPackages.${system};
18-
e = import easyps { pkgs = p; };
19-
l = p.lua51Packages;
17+
pkgs = import nixpkgs {
18+
inherit system;
19+
overlays = [ purescript-overlay.overlays.default ];
20+
};
2021
in {
21-
devShell = p.mkShell {
22-
buildInputs = [
23-
p.dhall
24-
l.lua
25-
l.luacheck
26-
p.luaformatter
27-
p.nixfmt
28-
pslua.packages.${system}.default
29-
e.purs-0_15_15
30-
e.spago
31-
p.treefmt
32-
];
22+
devShell = pkgs.mkShell {
23+
buildInputs = with pkgs; [
24+
dhall
25+
lua51Packages.lua
26+
lua51Packages.luacheck
27+
luaformatter
28+
nixfmt-rfc-style
29+
pslua.packages.${system}.default
30+
purs-bin.purs-0_15_16
31+
spago-bin.spago-0_21_0
32+
treefmt
33+
];
3334
};
3435
});
35-
}
3636

37+
# --- Flake Local Nix Configuration ----------------------------
38+
nixConfig = {
39+
extra-substituters = [
40+
"https://cache.iog.io"
41+
"https://purescript-lua.cachix.org"
42+
];
43+
extra-trusted-public-keys = [
44+
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
45+
"purescript-lua.cachix.org-1:yLs4ei2HtnuPtzLekOrW3xdfm95+Etw15gwgyIGTayA="
46+
];
47+
};
48+
}

scripts/build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
set -euo pipefail
23

34
echo "Building..."
45

0 commit comments

Comments
 (0)