tests.nixpkgs-check-by-name: Set evaluation system to x86_64-linux

This was previously a checking impurity that could produce different
results when run on different systems.
This commit is contained in:
Silvan Mosberger 2024-01-03 19:29:29 +01:00
parent 5b7ae79ef0
commit 66f29590c0
3 changed files with 7 additions and 0 deletions

View File

@ -28,6 +28,8 @@ These checks are performed by this tool:
- Each package directory must not refer to files outside itself using symlinks or Nix path expressions.
### Nix evaluation checks
Evaluate Nixpkgs with `system` set to `x86_64-linux` and check that:
- For each package directory, the `pkgs.${name}` attribute must be defined as `callPackage pkgs/by-name/${shard}/${name}/package.nix args` for some `args`.
- For each package directory, `pkgs.lib.isDerivation pkgs.${name}` must be `true`.

View File

@ -54,6 +54,9 @@ let
# Don't let the users home directory influence this result
config = { };
overlays = [ overlay ];
# We check evaluation and callPackage only for x86_64-linux.
# Not ideal, but hard to fix
system = "x86_64-linux";
};
attrInfo = name: value:

View File

@ -19,6 +19,8 @@ It returns a Nixpkgs-like function that can be auto-called and evaluates to an a
overlays ? [],
# Passed by the checker to make sure a real Nixpkgs isn't influenced by impurities
config ? {},
# Passed by the checker to make sure a real Nixpkgs isn't influenced by impurities
system ? null,
}:
let