Skip to content

nixos/installation-device: don’t include stdenv#418267

Merged
vcunat merged 1 commit intoNixOS:masterfrom
emilazy:push-oksrwrmuzzxx
Aug 4, 2025
Merged

nixos/installation-device: don’t include stdenv#418267
vcunat merged 1 commit intoNixOS:masterfrom
emilazy:push-oksrwrmuzzxx

Conversation

@emilazy
Copy link
Member

@emilazy emilazy commented Jun 19, 2025

A basic NixOS system shouldn’t require stdenv to install, and it adds something like 45 MiB of build tools to the installer closure. This doesn’t really help much at present since WebKitGTK(?!) has a dodgy reference to GCC, but it’s a step in the right direction.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@nix-owners nix-owners bot requested a review from ElvishJerricco June 19, 2025 20:57
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Jun 19, 2025
@github-actions github-actions bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jun 20, 2025
@vcunat
Copy link
Member

vcunat commented Jun 20, 2025

Unless I made some mistake, I see the ISO size decrease by 5 MiB just by this PR. (I assumed that some other parts still pulled almost all of it.)

@emilazy
Copy link
Member Author

emilazy commented Jun 20, 2025

It’s probably the WebKitGTK pulling in GCC thing. That should be fixed and then this should be something like a ~45 MiB uncompressed win I think.

@vcunat
Copy link
Member

vcunat commented Jun 20, 2025

Yes, it does pull it. And maybe other things. I also saw really lots of -dev packages on the ISO yesterday.

@emilazy
Copy link
Member Author

emilazy commented Jun 21, 2025

#418819 should make this a bigger win. Apparently it’s some ~80 MiB compressed savings to drop stdenv from the minimal ISO even without it. stdenv is currently required for NixOS installations, though (but it’s easy to move those cases to stdenvNoCC and offline installs aren’t currently possible yet anyway, so I don’t think it needs to block this).

@vcunat
Copy link
Member

vcunat commented Jun 26, 2025

Installer tests need fixing, e.g. nixosTests.installer.simpleUefiSystemdBoot, most likely simply by adding stdenv into extra inputs (don't recall where exactly off the top of my head).

A basic NixOS system shouldn’t require `stdenv` to install, and
it adds something like 45 MiB of build tools to the installer
closure. This doesn’t really help much at present since
WebKitGTK(?!) has a dodgy reference to GCC, but it’s a step in the
right direction.
@emilazy emilazy force-pushed the push-oksrwrmuzzxx branch from 603e68c to f5f4d6e Compare August 4, 2025 04:30
@emilazy
Copy link
Member Author

emilazy commented Aug 4, 2025

Should be fixed now. Haven’t measured the size difference now that GCC is out of the closure.

@vcunat
Copy link
Member

vcunat commented Aug 4, 2025

79 MiB for the minimal ISO size.

@vcunat vcunat merged commit 0b0c68c into NixOS:master Aug 4, 2025
24 of 27 checks passed
@emilazy emilazy deleted the push-oksrwrmuzzxx branch September 17, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants