1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-08 02:38:11 +09:00
nixpkgs/ci/nixpkgs-vet.nix
Wolfgang Walther 3dd14d8a51
ci/nixpkgs-vet: fix random errors
Every now and then, the nixpkgs-vet CI job currently fails with one of:

  error: creating symlink
'/build/.local/share/nix/root/nix/var/nix/gcroots/profiles' ->
'/build/.local/share/nix/root/nix/var/nix/profiles': File exists

  error: SQLite database
'/build/.local/share/nix/root/nix/var/nix/db/db.sqlite' is busy

It's hard to reproduce for me, so just taking a guess with the required
changes.
2025-06-02 15:50:32 +02:00

33 lines
456 B
Nix

{
lib,
nix,
nixpkgs-vet,
runCommand,
}:
{
base ? ../.,
head ? ../.,
}:
let
filtered =
with lib.fileset;
path:
toSource {
fileset = (gitTracked path);
root = path;
};
in
runCommand "nixpkgs-vet"
{
nativeBuildInputs = [
nixpkgs-vet
];
env.NIXPKGS_VET_NIX_PACKAGE = nix;
}
''
export NIX_STATE_DIR=$(mktemp -d)
nixpkgs-vet --base ${filtered base} ${filtered head}
touch $out
''