Skip to content

nix-store --query --deriver returns wrong path for store paths substituted from a binary cache #7562

@symphorien

Description

@symphorien

Describe the bug

Paths substituted with nix-store --realise (without local instantiation) get a wrong deriver

Steps To Reproduce

Consider https://hydra.nixos.org/build/202354188#tabs-details

It has output /nix/store/fk7cnblfry8359ikkg1p2v7kkbb4g19k-crosvm-107.1 and the displayed deriver is /nix/store/psrykallrszjazb4h1kzixazypgagryk-crosvm-107.1.drv

If I download the output: nix-store --realise /nix/store/fk7cnblfry8359ikkg1p2v7kkbb4g19k-crosvm-107.1, nix claims the deriver is another one:

$  nix-store --query --deriver /nix/store/fk7cnblfry8359ikkg1p2v7kkbb4g19k-crosvm-107.1
/nix/store/l4hml94mpq6l0iw6ddmalpra56d9vqsg-crosvm-107.1.drv

If I checkout nixpkgs at the right commit:

$  git checkout 40f79f003b6377bd2f4ed4027dde1f8f922995dd
HEAD est maintenant sur 40f79f003b6 Merge pull request #206297 from andersk/mozillavpn

then we see that hydra is right

$  nix-instantiate -A crosvm                                                
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/psrykallrszjazb4h1kzixazypgagryk-crosvm-107.1.drv

Expected behavior

nix-store --query --deriver reports the same deriver as nix-instantiate and nix-store --realise

nix-env --version output
nix-env (Nix) 2.11.1

Additional context

Add any other context about the problem here.

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions