Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-build-hook receives a invalid (non-existing) drvPath when remotely building with Op::BuildDerivation #9272

Open
layus opened this issue Nov 1, 2023 · 0 comments
Labels

Comments

@layus
Copy link
Member

layus commented Nov 1, 2023

Describe the bug

When building with Op::BuildDerivation, the derivation is never written to the store. But the drvPath from the client is still available. It gets passed to pre-build-hook as first argument. So the hook ends up with a path to a nonexistent file, and no way to get information about the derivation.

Steps To Reproduce

Expected behavior

I would expect the content of the .drv file to be always available to the pre-build-hook. In this case writing the .drv to a temporary location, or to the store. I think it is not a problem to write it to the store.

Alternatively, if this is deemed unsafe, document the issue in pre-build-hook.

nix-env --version output

Additional context

NixOS/nixpkgs#256230 (comment)

Priorities

Add 👍 to issues you find important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant