Infer devShell deps, provide smaller one#14489
Conversation
Ericson2314
left a comment
There was a problem hiding this comment.
Thank you so much, @roberth! This is the exact sort of thing I was hoping for during the meeting. Glad you understood me.
I will leave this up a bit for the others to see also, but I hope we can merge it very soon.
|
Can we document this? Also which devshell do we want to recommend here? |
FWIW ultimately I hope the functionality can go in Nixpkgs, as I think better multi-package dev shells is a very useful thing I've wanted there for years. |
So far I treat this as an internal refactor that adds an unimportant
The usual one. The
|
a6baaa5 to
067944f
Compare
Get rid of some manual package set resolution in favor of splicing again, too. Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
067944f to
cb5b0c3
Compare
I think the way it should work is that the shell would generate the root For me a very good sign is if one can use the hypothetical generalized version to easily also develop on Hydra at the same time, and skip building nix just because hydra depends on it. |
Ericson2314
left a comment
There was a problem hiding this comment.
Fixed the two things that @xokdvium found
This is a port of NixOS/nix@cb5b0c3 from NixOS/nix#14489 but adopted to preserve dependency order, and this not cause rebuilds. We only need the one commit of that PR because we don't care about a dev shell for Nix in Nixpkgs.
This is a port of NixOS/nix@cb5b0c3 from NixOS/nix#14489 but adopted to preserve dependency order, and this not cause rebuilds. We only need the one commit of that PR because we don't care about a dev shell for Nix in Nixpkgs. (cherry picked from commit 8f72b28)
Motivation
For contributors with slow connections, small disks, or high standards, provide a smaller shell.
Uses carousel pattern with
overrideAttrs/passthru(easy to apply locally, single fixpoint) but that could be refactored to work differently, e.g. package function arguments.Usage:
nix develop .#native-clangStdenv.smallThis makes the packages simpler, but loses a tiny little bit in eval laziness by having to evaluate all components to figure out the devShell, instead of just the ones listed. Not significant.
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.