NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.66k stars 13.11k forks source link

`developmentInputs` derivation attribute #298084

Open Pandapip1 opened 4 months ago

Pandapip1 commented 4 months ago

Is your feature request related to a problem? Please describe.

What prompted me to suggest this is that I wanted to allow the monado shell.nix to piggyback off of the fact that all the required packages for building monado are already there in nixpkgs. However, I would also like all the packages that are required for developing monado to also be present in the nixpkgs derivation.

Describe the solution you'd like

An additional derivation attribute, developmentInputs, that acts like nativeBuildInputs but for required or "you really shouldn't be trying to develop without this" tooling.

Describe alternatives you've considered

Currently, the PR is storing them in passthru.devTools, but a standard solution would be obviously preferable.

Additional context

Priorities

Add :+1: to issues you find important.

thufschmitt commented 4 months ago

Relates to https://github.com/NixOS/nix/issues/7501.

The most likely approach would be to rather move all the “build the development shell” logic out of Nix itself and have it be the responsibility of either the derivation or some 3d-party piece of code. That would allow for something like that indeed – which seems very unlikely as a builtin Nix feature because Nix itself isn't supposed to know about things like buildInputs and all, they are just a Nixpkgs convention/encoding.

roberth commented 4 months ago

3rd party code

In practical terms, Nixpkgs could facilitate this well, but indeed Nix won't care what source the expressions come from.

Pandapip1 commented 4 months ago

That would allow for something like that indeed – which seems very unlikely as a builtin Nix feature because Nix itself isn't supposed to know about things like buildInputs and all, they are just a Nixpkgs convention/encoding.

Can I request that this issue be transferred to nixpkgs then?