Skip to content

Commit

Permalink
Update some tooling in the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mjrussell committed Jun 2, 2022
1 parent cec272f commit 89f254c
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 1 deletion.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
/.psc*
/.purs*
/.psa*
/.vscode/
/.vscode/
.direnv
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# react-basic-emotion

[Emotion](https://emotion.sh/) support for [react-basic](https://github.com/lumihq/purescript-react-basic)!

[![Build Status](https://github.com/lumihq/purescript-react-basic-emotion/actions/workflows/ci.yml/badge.svg)](https://github.com/lumihq/purescript-react-basic-emotion/actions/workflows/ci.yml)
<a href="https://pursuit.purescript.org/packages/purescript-react-basic-emotion">
<img src="https://pursuit.purescript.org/packages/purescript-react-basic-emotion/badge"
alt="Fixed Precision on Pursuit">
</img>
</a>

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;
};
}
);
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
},
"devDependencies": {
"bower": "^1.8.12",
"npm-check-updates": "^13.0.3",
"npm-run-all": "^4.1.5",
"pulp": "^15.0.0",
"purescript": "^0.14.0",
Expand Down
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`)
'';
}

0 comments on commit 89f254c

Please sign in to comment.