-
Notifications
You must be signed in to change notification settings - Fork 0
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
Provide pnpm
via nix (again)?
#541
Comments
I agree it would be nice to provide
What directory? That could be relevant (see #531). |
That was a fast reply! I land in |
In general, I think all the issues with the shellhook stem from the fact that I wonder if it is worth being a bit more defensive: either
|
(this is getting a bit off topic, but just to close the book on why this happens) This is because I am running an incompatible fork of nix. If I use nix 2.8, then this works ok. |
I'm not opposed to making the bootstrap process more bulletproof, or adding better error handling in the event that a We've been burned several times, in several different ways, when trying to use The dream2nix project looks promising as a holy grail solution for the Node ecosystem in Nix, but it's still very early days. |
I'll get a pr up shortly (edit: #544)
Of course not, I didn't mean to suggest that
Fair enough |
We decided that we would prefer to keep the one-time bootstrap step than rely on nixpkgs providing |
Main issue
Now that upstream supports new versions of nodejs (NixOS/nixpkgs#132456 NixOS/nixpkgs#145432 NixOS/nixpkgs#193337 (this last is a PR which is included in our nixpkgs pin)), can we provide
pnpm
via nix, so one does not have to bootstrap manually?I have tested that adding
pnpm
to the inputs does provide the binary in the shell, and seems to work as well as the manual bootstrap (more below).A related issue is #138, about
prettier
innixpkgs
.Alternatively, it may be nice to change the shell hook to (either auto-install pnpm via npx or) detect if
pnpm
is available and if not halt and print a useful message, so one can nicely use this repo's devshell to bootstrap.Bootstrapping woes (ignore this -- it is a red herring caused by me running (for unrelated reasons) an incompatible fork of nix)
My testing of this idea has been somewhat curtailed by the fact I don't know how to get a successful devshell currently. The README states "To develop interactively, enter the Nix shell via
nix develop
... the first time you check out theprimer-app
repo, you'll need to runnpx pnpm install
... After the initial bootstrap, you'll be able to run justnix develop
and then all the standardpnpm
command should work". My procedure (on a clean checkout ofmain
) isnpx
in my normal shell (outside of any nix shell)npx
to installpnpm
nix develop
in this repo can provide the correct version ofnpx
nix develop
and seenpx
npx pnpm install
I am not sure what is wrong with this, but I see the same thing when (in a clean checkout) entering a devshell after adding
pnpm
to the dependencies (this time I don't have to do the manual install pnpm step)The text was updated successfully, but these errors were encountered: