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

use latest spago@next #230

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions docs/spago.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package:
name: docs
dependencies:
- effect
- console
- prelude
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
72 changes: 58 additions & 14 deletions flake.lock

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

76 changes: 48 additions & 28 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,34 +1,54 @@
{
description = "Provide an environment for working in this repo";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
purescript-overlay = {
url = "github:thomashoneyman/purescript-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};

# to handle mac and linux
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, ... }@inputs:
let
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];

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

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
nixpkgsFor = forAllSystems (system: import nixpkgs {
inherit system;
config = { };
overlays = builtins.attrValues self.overlays;
});
in {
overlays = {
purescript = inputs.purescript-overlay.overlays.default;
};

packages = forAllSystems (system:
let pkgs = nixpkgsFor.${system}; in {
default = pkgs.hello; # your package here
});

devShells = forAllSystems (system:
# pkgs now has access to the standard PureScript toolchain
let pkgs = nixpkgsFor.${system}; in {
default = pkgs.mkShell {
name = "my-purescript-project";
inputsFrom = builtins.attrValues self.packages.${system};
buildInputs = with pkgs; [
purs
spago-unstable
purs-tidy-bin.purs-tidy-0_10_0
purs-backend-es
# nodejs-16_x
nodejs-18_x
# nodejs_latest
];
in
sharedPackages;
in {
# produce our actual shell
devShell = pkgs.mkShell rec {
# make our packages available
buildInputs = packages;
};
}
);

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