Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooling Updates & Github actions #14

Merged
merged 2 commits into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@ jobs:

- name: Build the project
run: npm run build

- name: Build examples
run: find examples -maxdepth 2 -type f -iname package.json -execdir "npm install && npm build" \;
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/.psa*
/.vscode/
/.spago/
/.direnv/
43 changes: 43 additions & 0 deletions flake.lock

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

34 changes: 34 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
description = "Provide an environment for working in this repo";

# to handle mac and linux
inputs.flake-utils.url = "github:numtide/flake-utils";

# we want to use a consistent nixpkgs across developers.
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

outputs = all@{ self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
packages =
let
# everything we want available in our development environment that isn't managed by
# npm, spago
# we do not differentiate between libraries needed for building and tools at the moment.
sharedPackages = with pkgs; [
nodejs-16_x
];
in
sharedPackages;
in {
# produce our actual shell
devShell = pkgs.mkShell rec {
# make our packages available
buildInputs = packages;
};
}
);
}
32 changes: 32 additions & 0 deletions tools/publish-shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Universal shell for PureScript repos
{ pkgs ? import (builtins.fetchGit {
# https://github.com/NixOS/nixpkgs/releases/tag/21.11
url = "https://github.com/nixos/nixpkgs/";
ref = "refs/tags/21.11";
rev = "a7ecde854aee5c4c7cd6177f54a99d2c1ff28a31";
}) {}
}:
let
easy-ps-src = builtins.fetchGit {
url = "https://github.com/justinwoo/easy-purescript-nix.git";
ref = "master";
rev = "0ad5775c1e80cdd952527db2da969982e39ff592";
};
easy-ps = import easy-ps-src { inherit pkgs; };
in
pkgs.mkShell {
nativeBuildInputs = [
easy-ps.purs-0_15_0
easy-ps.spago
easy-ps.pulp-16_0_0-0
easy-ps.psc-package
easy-ps.purs-tidy
pkgs.nodejs-16_x
pkgs.nodePackages.bower
];
LC_ALL = "C.UTF-8"; # https://github.com/purescript/spago/issues/507
# https://github.com/purescript/spago#install-autocompletions-for-bash
shellHook = ''
source <(spago --bash-completion-script `which spago`)
'';
}