git.iko.soy/rowtype-yoga/purescript-fixed-precision
on main help sign in
nix dev env for nodejs
commitf452e0f8f4e154a8f4363d65aaf6701de883596c authorMatthew Russell <matthew.russell@narvar.com> dateTue 24 May 2022, 16:35 (4 years ago) parent0ec555a
4 files changed+79
.envrc+1 .gitignore+1 flake.lock+43 flake.nix+34
.envrcnew file+1
@@ -0,0 +1 @@
1+use flake
.gitignore+1
@@ -8,3 +8,4 @@
88/.purs*
99/.psa*
1010.spago
11+.direnv
flake.locknew file+43
@@ -0,0 +1,43 @@
1+{
2+ "nodes": {
3+ "flake-utils": {
4+ "locked": {
5+ "lastModified": 1652776076,
6+ "narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=",
7+ "owner": "numtide",
8+ "repo": "flake-utils",
9+ "rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8",
10+ "type": "github"
11+ },
12+ "original": {
13+ "owner": "numtide",
14+ "repo": "flake-utils",
15+ "type": "github"
16+ }
17+ },
18+ "nixpkgs": {
19+ "locked": {
20+ "lastModified": 1653326962,
21+ "narHash": "sha256-W8feCYqKTsMre4nAEpv5Kx1PVFC+hao/LwqtB2Wci/8=",
22+ "owner": "NixOS",
23+ "repo": "nixpkgs",
24+ "rev": "41cc1d5d9584103be4108c1815c350e07c807036",
25+ "type": "github"
26+ },
27+ "original": {
28+ "owner": "NixOS",
29+ "ref": "nixpkgs-unstable",
30+ "repo": "nixpkgs",
31+ "type": "github"
32+ }
33+ },
34+ "root": {
35+ "inputs": {
36+ "flake-utils": "flake-utils",
37+ "nixpkgs": "nixpkgs"
38+ }
39+ }
40+ },
41+ "root": "root",
42+ "version": 7
43+}
flake.nixnew file+34
@@ -0,0 +1,34 @@
1+{
2+ description = "Provide an environment for working in this repo";
3+
4+ # to handle mac and linux
5+ inputs.flake-utils.url = "github:numtide/flake-utils";
6+
7+ # we want to use a consistent nixpkgs across developers.
8+ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
9+
10+ outputs = all@{ self, nixpkgs, flake-utils, ... }:
11+ flake-utils.lib.eachDefaultSystem (system:
12+ let
13+ pkgs = import nixpkgs {
14+ inherit system;
15+ };
16+ packages =
17+ let
18+ # everything we want available in our development environment that isn't managed by
19+ # npm, spago
20+ # we do not differentiate between libraries needed for building and tools at the moment.
21+ sharedPackages = with pkgs; [
22+ nodejs-16_x
23+ ];
24+ in
25+ sharedPackages;
26+ in {
27+ # produce our actual shell
28+ devShell = pkgs.mkShell rec {
29+ # make our packages available
30+ buildInputs = packages;
31+ };
32+ }
33+ );
34+}