NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.9k stars 1.53k forks source link

First CTRL-C as graceful stop #10559

Open thomaslepoix opened 7 months ago

thomaslepoix commented 7 months ago

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

I remember a small quality of life feature that I miss from Yocto/Bitbake for interrupting a build.

Describe the solution you'd like

The first CTRL-C received will trigger a graceful stop which means no more derivation build will begin, but the in progress ones will complete before stopping the process.

Only the second CTRL-C received will force a shutdown (current Nix behavior).

Describe alternatives you've considered

Additional context

This is nice to have in context of cross compilation or tweaking with build flags, where there is no binary cache anymore and building a whole system can take several hours, with some huge derivations inside. It is worth to complete a 75%-built LLVM before pausing the build, for example.

Priorities

Add :+1: to issues you find important.

edolstra commented 5 months ago

Team discussion:

nixos-discourse commented 5 months ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-06-19-nix-team-meeting-minutes-154/47265/1