Skip to content

Commit

Permalink
Support spago-next (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
srghma authored Apr 11, 2024
1 parent c31409d commit 6ccd9e0
Show file tree
Hide file tree
Showing 22 changed files with 40,914 additions and 180 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,27 @@ jobs:
steps:
- uses: actions/checkout@v2

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

- name: Check spago and purs are installed correctly
run: |
purs --version
spago version
spago --version
- name: Check purs-tidy is installed
- name: Check purescript code is formatted
# because errors with 'Some files are not formatted', dont know why
if: runner.os != 'Windows'
run: |
purs-tidy --help
npm run check
2 changes: 1 addition & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-node@v1
with:
node-version: "12"
node-version: "18"

- name: Update tooling versions
run: |
Expand Down
11 changes: 10 additions & 1 deletion dist/index.js
100644 → 100755

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
10 changes: 9 additions & 1 deletion dist/update.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/versions-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"latest": "0.15.15"
},
"spago": {
"unstable": "0.21.0",
"unstable": "0.93.28",
"latest": "0.21.0"
},
"psa": {
Expand Down
87 changes: 87 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
purescript-overlay = {
url = "github:thomashoneyman/purescript-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, ... }@inputs:
let
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];

forAllSystems = nixpkgs.lib.genAttrs supportedSystems;

nixpkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
config = { };
overlays = builtins.attrValues self.overlays;
});
in {
overlays = {
purescript = inputs.purescript-overlay.overlays.default;
};

# fix
# does not provide attribute 'packages.x86_64-linux.default' or 'defaultPackage.x86_64-linux'
# on `nix shell`
packages = self.devShells;

devShells = forAllSystems (system:
# pkgs now has access to the standard PureScript toolchain
let pkgs = nixpkgsFor.${system}; in {
default = pkgs.mkShell {
name = "setup-purescript";
buildInputs = with pkgs; [
purs
spago-unstable
nodejs_latest
];

shellHook = ''
source <(node --completion-bash)
source <(spago --bash-completion-script `which spago`)
'';
};
});
};
}
Loading

0 comments on commit 6ccd9e0

Please sign in to comment.