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

nix-build --store only finds NIX_PATH locations cached locally (2.1.1) #2521

Open
LisannaAtHome opened this issue Nov 7, 2018 · 3 comments
Labels

Comments

@LisannaAtHome
Copy link

Attempting to build a nix expression with nix-build --store will fail if the expression references a <path> that has not been cached on the local machine. For example:

NIX_PATH=foobar=https://example.com/nixexprs.tar.xz nix-build --store ssh-ng://root@example.com -E 'with import <foobar> {}; baz'

Will result in something like:

error: file 'foobar' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:13

Workaround: first run the nix-build command without the --store option, so that the <path> is downloaded and cached on the local machine. After this finishes and it starts building, interrupt the build and re-run the command with the --store option added.

This seems similar to #2053

@lheckemann
Copy link
Member

Dup of #2085 (fixed for chroot stores and deemed "not easy to fix" for remote stores)?

@stale
Copy link

stale bot commented Feb 21, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 21, 2021
@stale
Copy link

stale bot commented Apr 28, 2022

I closed this issue due to inactivity. → More info

@stale stale bot closed this as completed Apr 28, 2022
@thufschmitt thufschmitt reopened this Feb 24, 2023
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

3 participants