Skip to content

Commit 6ccd9e0

Browse files
authored
Support spago-next (#37)
1 parent c31409d commit 6ccd9e0

22 files changed

+40914
-180
lines changed

.github/workflows/integration.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,27 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v2
2121

22+
# We set LF endings so that the Windows environment is consistent with the rest
23+
# See here for context: https://github.com/actions/checkout/issues/135
24+
- name: Set git to use LF
25+
run: |
26+
git config --global core.autocrlf false
27+
git config --global core.eol lf
28+
git config --global core.longpaths true
29+
2230
- uses: ./ # equivalent to purescript-contrib/setup-purescript@<branch>
2331
with:
2432
purs-tidy: "latest"
2533
zephyr: "latest"
34+
spago: "unstable"
2635

2736
- name: Check spago and purs are installed correctly
2837
run: |
2938
purs --version
30-
spago version
39+
spago --version
3140
32-
- name: Check purs-tidy is installed
41+
- name: Check purescript code is formatted
42+
# because errors with 'Some files are not formatted', dont know why
43+
if: runner.os != 'Windows'
3344
run: |
34-
purs-tidy --help
45+
npm run check

.github/workflows/sync.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
- uses: actions/setup-node@v1
1919
with:
20-
node-version: "12"
20+
node-version: "18"
2121

2222
- name: Update tooling versions
2323
run: |

dist/index.js

100644100755
+10-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

dist/update.js

+9-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/versions-v2.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"latest": "0.15.15"
55
},
66
"spago": {
7-
"unstable": "0.21.0",
7+
"unstable": "0.93.28",
88
"latest": "0.21.0"
99
},
1010
"psa": {

flake.lock

+87
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
4+
purescript-overlay = {
5+
url = "github:thomashoneyman/purescript-overlay";
6+
inputs.nixpkgs.follows = "nixpkgs";
7+
};
8+
};
9+
10+
outputs = { self, nixpkgs, ... }@inputs:
11+
let
12+
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
13+
14+
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
15+
16+
nixpkgsFor = forAllSystems (system: import nixpkgs {
17+
inherit system;
18+
config = { };
19+
overlays = builtins.attrValues self.overlays;
20+
});
21+
in {
22+
overlays = {
23+
purescript = inputs.purescript-overlay.overlays.default;
24+
};
25+
26+
# fix
27+
# does not provide attribute 'packages.x86_64-linux.default' or 'defaultPackage.x86_64-linux'
28+
# on `nix shell`
29+
packages = self.devShells;
30+
31+
devShells = forAllSystems (system:
32+
# pkgs now has access to the standard PureScript toolchain
33+
let pkgs = nixpkgsFor.${system}; in {
34+
default = pkgs.mkShell {
35+
name = "setup-purescript";
36+
buildInputs = with pkgs; [
37+
purs
38+
spago-unstable
39+
nodejs_latest
40+
];
41+
42+
shellHook = ''
43+
source <(node --completion-bash)
44+
source <(spago --bash-completion-script `which spago`)
45+
'';
46+
};
47+
});
48+
};
49+
}

0 commit comments

Comments
 (0)