numtide / devshell

Per project developer environments
https://numtide.github.io/devshell/
MIT License
1.22k stars 87 forks source link

Add inputDerivation to enable binary caching #226

Closed amarshall closed 1 year ago

amarshall commented 1 year ago

Same rationale as upstream, see https://github.com/NixOS/nixpkgs/pull/95536

brianmcgee commented 1 year ago

@amarshall is this ready for review if it was updated with latest main?

amarshall commented 1 year ago

@brianmcgee should be, yes, I have rebased off latest and force-pushed. There were no conflicts.

zimbatm commented 1 year ago

Sorry, I should have reacted earlier; this change is not needed. Unlike upstream's mkShell, mkNakedShell was designed to be built or loaded as a nix-shell. This was part of the design, so you can nix-build the devshell, which has references to all the inputs. So instead of nix-build shell.nix -A inputDerivation | cachix push, you can already nix-build shell.nix | cachix push.

amarshall commented 1 year ago

@zimbatm Hmm, I remember I did this because some things weren’t getting uploaded to the cache as expected, but we’ve since changed to using a post-build hook instead anyway. I’ll try to reproduce.

zimbatm commented 1 year ago

Ok, let me know if you can build a repro

zimbatm commented 1 year ago

I'm going to assume that it was fine :)