Without the change the eval fails as:
$ nix build --no-link -f. tests.cross.sanity
error: attribute 'qutebrowser' missing
at pkgs/test/cross/default.nix:157:5:
156| # Two web browsers -- exercises almost the entire packageset
157| pkgs.pkgsCross.aarch64-multiplatform.qt5.qutebrowser
| ^
158| pkgs.pkgsCross.aarch64-multiplatform.firefox
Stops enforcing that packages whose evaluation gets fixed have to be
moved to `pkgs/by-name`.
This didn't really cause problems before, but I don't think it's great
behavior, and now that NonApplicable is a thing, we can easily make this
work, whereas before it would've been a larger change.
Introduces NonApplicable as a state of a ratchet, to be used when the
ratchet doesn't make sense to have.
This fixes an odd problem where before, changing an attribute to use
e.g. `callPackage` suddenly requires moving it to `pkgs/by-name`, when that
shouldn't have been required.
- Renames EmptyNonAutoCalled to ManualDefinition and add some docs to
better explain what it's for
- Don't conflate the Ratchet type with the Context type, keep them
apart, making the code a bit cleaner, but also allows adding
additional context for a Tight ratchet in the future
- Change the signature of to_nixpkgs_problem to align with the other
ratchet function signatures
Since https://github.com/NixOS/nixpkgs/pull/279892, there's a separate
check that makes sure all changed Nix files evaluate. To not trigger
that, we need to remove all invalid Nix expressions from the tests.
Since https://github.com/NixOS/nixpkgs/pull/281374, the
nixpkgs-check-by-name tooling is pinned to a specific /nix/store path to
avoid having to evaluate Nixpkgs in CI.
The same path is used for local runs, but that doesn't actually work
when you're trying to run it on a platform different from CI.
This commit makes it work by being clearer about platforms and making
local runs check out the correct Nixpkgs to evaluate the tool from.
Before this, the tool for CI would update when nixos-unstable updated,
which is kind of terrible because you don't know when it happens, and it
might break master.
In fact, the tooling _right now_ has a serious bug and shouldn't be used!
This PR addresses this by _pinning_ the tooling in Nixpkgs itself.
Updating the tooling now requires two PRs:
- The first PR to update the tooling source
- (wait for Hydra to build and publish it in nixos-unstable)
- The second PR to update the pinned tooling
In turn you know exactly when the changes are going to take effect.
This change however has additional benefits:
- It makes CI more reproducible, because it doesn't depend on the state
of nixos-unstable anymore
- Updates to the tooling can be tested with the workflow itself,
because PRs that update the pinned tool will be tested on the updated
version
- CI gets a sizable speed boost, because there's no need to download and
evaluate a channel anymore
- It makes it more realistic to move the source of the tool into a
separate repository
- It removes the brittle branch-specific logic that was previously
needed to ensure that release branches use their own version of the
tooling.
nix-build failed because the tests assume to run in a CWD equal to the
project root, which is not the case in the derivation build.
This commit fixes it by not using hacky `..` references to paths,
and instead uses NIX_PATH for all implicit Nix testing path
dependencies.
Also the root of the `lib` path gets passed in from the `default.nix`
file, so all the relative path handling is done by Nix during evaluation
already, and in the Nix store when possible.
- Typo
- Rename AttributeRatchet to ToNixpkgsProblem
- Make the compare trait method into a RatchetState method
Co-Authored-By: Philip Taron <philip.taron@gmail.com>
All other functions are in the form of `*{c,C}heckpointBuild*`, so we
deprecate the `mkCheckpointedBuild` function in favor of `mkCheckpointBuild`.
Also address some inconsistencies in the docs: some `buildOutput` should
actually be `incrementalBuildArtifacts`.