virtualbox: Change the virtualbox tests to not build the unfree tests by default #45415
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
This PR changes the VirtualBox tests not to build the unfree tests by default.
The problem was that cache.nixos.org was running the tests, which caused the VirtualBox Oracle Extension Pack to be downloaded and cached. cache.nixos.org was then serving the Extension Pack to people when they tried to download it.
However, the license for the Extension Pack explicitly states that it cannot be served by third parties.
This PR changes the code for the VirtualBox test to not build and run the unfree tests by default. This causes cache.nixos.org to not build and cache the Extension Pack.
The VirtualBox tests can be run like the following:
$ cd nixos/tests $ nix-build virtualbox.nix
This will only build and run the normal tests.
In order to build and run the unfree test, you must use the following command:
$ nix-build virtualbox.nix -A enable-extension-pack --arg enableUnfree true
If you try to run the
enable-extension-pack
test without setting theenableUnfree
argument totrue
, you will get the following error:Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)