Closed srid closed 3 years ago
If I put spago
in the nix-shell:
Using the following shell.nix
,
{ pkgs ? import <nixpkgs> {} }:
let
easy-ps = import ./dep/easy-purescript-nix { inherit pkgs; };
in
pkgs.mkShell {
buildInputs = [
easy-ps.purs-0_14_0
easy-ps.psc-package
easy-ps.spago
# `npm install` builds PS using its stack.yml which is on lts-13.26 (ghc 8.6.5)
pkgs.stack
pkgs.haskell.compiler.ghc865
];
}
I get (the log file has nothing useful):
If you’re using a Nix shell for the compiler and Spago then I would remove the PureScript and spago dependencies from the package.json file.
I’m not exactly sure why PureScript fails to build, but that wouldn’t be specific to this template.
Ah, right, I should have taken a peek at package.json.
So it looks like with my shell.nix, I can just use spago build
(or npm run-script build
) followed by npm run-script serve
(after manually installing parcel
, which isn't available in nixpkgs or easy-purescript-nix). That worked for me ... though I'm not 100% clear what Nix workflow Nix'ers use for this project, and PureScript web projects in general.
My understanding is that folks either:
yarn2nix
and spago2nix
generate derivations for NPM / PureScript dependencies, orshell.nix
for PureScript dev dependencies with a hook to install NPM dependencies.We can keep discussing, but I'm going to close the issue as this isn't an error specific to this template but rather to PureScript installation on NixOS generally.
The error message unfortunately is not totally clear on the cause of the crash, but I can't seem to use this template on NixOS following the README instructions.