JordanMartinez / purescript-cookbook

An unofficial Cookbook for PureScript
MIT License
198 stars 30 forks source link

`nix-shell` is broken #299

Open pete-murphy opened 1 year ago

pete-murphy commented 1 year ago

Describe the bug

Running nix-shell fails with

❯ nix-shell
error: Package ‘nodejs-10.24.1’ in /nix/store/5za5gvhd0yadn08mawndbkhdbh2ky2vn-nixpkgs-22.05pre363272.4d600814942/nixpkgs/pkgs/development/web/nodejs/v10.nix:11 is marked as insecure, refusing to evaluate.

Known issues:
 - This NodeJS release has reached its end of life. See https://nodejs.org/en/about/releases/.

You can install it anyway by allowing this package, using the
following methods:

a) To temporarily allow all insecure packages, you can use an environment
   variable for a single invocation of the nix tools:

     $ export NIXPKGS_ALLOW_INSECURE=1

 Note: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+
 (Flake) command, `--impure` must be passed in order to read this
 environment variable.

b) for `nixos-rebuild` you can add ‘nodejs-10.24.1’ to
   `nixpkgs.config.permittedInsecurePackages` in the configuration.nix,
   like so:

     {
       nixpkgs.config.permittedInsecurePackages = [
         "nodejs-10.24.1"
       ];
     }

c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
   ‘nodejs-10.24.1’ to `permittedInsecurePackages` in
   ~/.config/nixpkgs/config.nix, like so:

     {
       permittedInsecurePackages = [
         "nodejs-10.24.1"
       ];
     }

(use '--show-trace' to show detailed location information)

I think even if NIXPKGS_ALLOW_INSECURE were enabled, this shell.nix references a version of the compiler that is out of date with the rest of the repo (hasn't been maintained since 0.14.2 release of the compiler https://github.com/JordanMartinez/purescript-cookbook/commit/9b59c3e41d2e8b86e0afd770539cbb8ca463d250).

To Reproduce

Steps to reproduce the behavior:

  1. Run nix-shell from root directory of this repo

Expected behavior

Would expect to have a nix shell with a version of PureScript that is capable of compiling the cookbook recipes.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment:

Additional context

Add any other context about the problem here.