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

spago test --no-install in checkPhase fails #52

Open
paulyoung opened this issue Jun 3, 2022 · 4 comments
Open

spago test --no-install in checkPhase fails #52

paulyoung opened this issue Jun 3, 2022 · 4 comments

Comments

@paulyoung
Copy link
Contributor

I'm running into the error described in the README despite using the --no-install flag. Is there something else I need to do?

spago: security: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)

https://github.com/justinwoo/spago2nix#i-dont-know-how-to-compile-my-project-in-a-derivation

{
  packages.purescript = pkgs.stdenv.mkDerivation {
    name = "purescript-spago-build";
    buildInputs = [
      spagoPkgs.installSpagoStyle
      spagoPkgs.buildSpagoStyle
    ];
    nativeBuildInputs = [
      easy-ps.purs
      easy-ps.spago
      easy-ps.zephyr
    ];
    src = ./frontend;
    unpackPhase = ''
      cp $src/spago.dhall .
      cp $src/packages.dhall .
      install-spago-style
    '';
    buildPhase = ''
      cp -R $src/src .
      build-spago-style "./src/**/*.purs" --codegen corefn
      zephyr -f Main.main
    '';
    doCheck = true;
    checkPhase = ''
      HOME=$TMP
      cp -R $src/test .
      build-spago-style "./test/**/*.purs" --codegen js
      spago --global-cache skip test --no-install
    '';
    installPhase = ''
      mkdir $out
      mv dce-output $out/
      mv output $out/
    '';
  };
}
@paulyoung
Copy link
Contributor Author

I'm apparently pulling in spago version 0.20.3 via easy-purescript-nix.

@paulyoung
Copy link
Contributor Author

The changelog entry for purescript/spago#866 says "Fix spago run and spago test to accept command line arguments correctly, by writing a JS file to run" but I'm not sure if that relates to the --no-install flag.

@paulyoung
Copy link
Contributor Author

With 0.20.9 I get spago: security: createProcess: posix_spawnp: does not exist (No such file or directory)

@szg251
Copy link

szg251 commented Nov 17, 2022

Putting this here for reference, if anyone else bumps into this later:
purescript/spago#888

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants