Skip to content

NixOS: add system.checks#231316

Merged
roberth merged 2 commits intoNixOS:masterfrom
hercules-ci:nixos-system.checks
May 15, 2023
Merged

NixOS: add system.checks#231316
roberth merged 2 commits intoNixOS:masterfrom
hercules-ci:nixos-system.checks

Conversation

@roberth
Copy link
Member

@roberth roberth commented May 11, 2023

Description of changes

Adds an option for configuration checks.
Drops a few unnecessary store paths from the built system configurations.
Manually tested.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
    • tested by hand because we don't have test infrastructure for asserting about failures in dependencies of derivations.
    • NixOS test(s) (look inside nixos/tests)
    • and/or package tests
    • or, for functions and "core" functionality, tests in lib/tests or pkgs/test
    • made sure NixOS tests are linked to the relevant packages
  • 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/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (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.

@roberth roberth added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: closure size The final size of a derivation, including its dependencies labels May 11, 2023
@github-actions github-actions bot added the 8.has: module (update) This PR changes an existing module in `nixos/` label May 11, 2023
@roberth
Copy link
Member Author

roberth commented May 11, 2023

@ofborg test simple

@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 11, 2023
@roberth roberth force-pushed the nixos-system.checks branch from cb2c844 to 23feac0 Compare May 11, 2023 19:13
roberth added 2 commits May 11, 2023 21:18
Note that this does not add to the `forbiddenDependenciesRegex`
code because that code check should be unaffected as it only checks
output dependencies, not build dependencies.
Build deps are added after that check, if those are enabled in the
first place.
... as appropriate.

This drops a few unnecessary store paths from the system closure.
@roberth roberth force-pushed the nixos-system.checks branch from 23feac0 to 2e2f0d2 Compare May 11, 2023 19:18
Copy link
Member

@RaitoBezarius RaitoBezarius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; untested yet

@roberth
Copy link
Member Author

roberth commented May 15, 2023

untested yet

Don't worry, I've done that.
Wish we had something for asserting a dependency failure, but alas, manual testing it is.

@roberth roberth merged commit 25f227f into NixOS:master May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: closure size The final size of a derivation, including its dependencies 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: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants