-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
error: file 'REPEAT' was not found in the Nix search path #163374
Comments
The full error for me:
and that file says:
I note that REPEAT shows up only once:
And if I replace |
Got similar problem after executing |
Might be related to this piece of code NixOS/nix@e9c04c3 That is the only thing I found with "" keywords in it. |
@bonds on |
Don't use nix-env |
@ppenguin I was able to get around this by adding ~/empty.nix with just
or
Also worth noting that after I did this and upgraded my user profile and system, I no longer have |
Dunno...I just used |
@bonds I take it you're not on |
That’s right, I’m on MacOS.
… On Mar 17, 2022, at 1:02 AM, ppenguin ***@***.***> wrote:
@bonds on nixos obviously all files under nix/... are read-only, so how to change the offending ?
Dunno...I just used vi and ignored the warning that the file was read-only. root can do what he wants. ;)
@bonds I take it you're not on nixos, there the nix-store itself is read-only (also for root), but the solution of @corngood works like a charm and is probably a more "idiomatic" workaround.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.
|
As a minimal fix for this, I ran the following and after that
|
Let's reopen this until the fix hits nixpkgs master at least. |
Wow, many thanks for your help 💯 really great community help here ❤️ 💟 😍 totally awesome 😄
|
@Artturin what should I use instead? |
@edolstra Correct me if I'm wrong, but my understanding of NixOS/nix#6296 is that it fixes generating the So anyone who used
EDIT2: disregard above, that was quite far off from the right understanding, see #163374 (comment). |
The fix is neither released nor in nixpkgs AFAICT. |
This comment was marked as outdated.
This comment was marked as outdated.
The repl has used this notation already prior to this patch which is not part of any Nix release nor applied as a patch in nixpkgs. |
Alright, I was quite wrong, but also after spending a few hours being confused it makes sense now. (click to open some ramblings)So I decided to check the most direct way I can thing of: $ nix build $(nix show-derivation $(which nix-env) | jq -r 'values[].env.src')
$ grep -n -C2 -R '<REPEAT>' result/
result/src/libexpr/eval.cc-127- case tAttrs: {
result/src/libexpr/eval.cc-128- if (!v.attrs->empty() && !seen.insert(v.attrs).second)
result/src/libexpr/eval.cc:129: str << "<REPEAT>";
result/src/libexpr/eval.cc-130- else {
result/src/libexpr/eval.cc-131- str << "{ ";
--
result/src/libexpr/eval.cc-143- case tListN:
result/src/libexpr/eval.cc-144- if (v.listSize() && !seen.insert(v.listElems()).second)
result/src/libexpr/eval.cc:145: str << "<REPEAT>";
result/src/libexpr/eval.cc-146- else {
result/src/libexpr/eval.cc-147- str << "[ ";
After every system upgrade, I run But why is everything I did since Best guess right now is the In short, I didn't notice the original repro had two installed packages and apparently the only multi-package operation I ever did was the bulk upgrade (after the system-level After the move to $ cd $(mktemp -d)
$ ln -s . profile
$ NIX_PROFILE=$PWD/profile nix-env -iA nixos.gnumake nixos.gnupg
installing 'gnumake-4.3'
installing 'gnupg-2.3.4'
$ grep '<REPEAT>' ./profile/manifest.nix # most of the output replaced with "..." for brevity
... license = <REPEAT>; ...
... maintainers = [ ... <REPEAT> ]; ...
... platforms = <REPEAT>; ...
$ NIX_PROFILE=$PWD/profile nix-env -iA nixos.hello
installing 'hello-2.12'
error: file 'REPEAT' was not found in the Nix search path (add it using $NIX_PATH or -I)
at /nix/store/a8fqrf8j3sv7fngmx0zzix22508fggrd-env-manifest.nix:1:2758: |
I use nix on macOS. I have For a month or so now, I get this error whenever running
I know from the above that I can work around it with |
Upgrading in a root shell fixed it for me. I also use the unstable channel and am on Fedora 35 however. I reinstalled Nix and rebooted twice just to fix this issue. I was pretty sure I had messed up something, and obviously I had the freshest packages on my user profile, so I don't understand what I did right to fix it. |
@jbg what version of nix are you running? I had the same issue and was able to fix it by running a stable version of nix-env once: Problem example
SolutionInstall stable version of nix:
Install a single derivation with the stable version of nixpkgs. After that, the old version works as well.
Afterwards, you can even |
The bug is only triggered when installing/upgrading multiple packages, which share some attributes (the sharing comes from evaluating So you only need the workaround once (to "repair" the profile manifest), then either:
|
Describe the bug
Can not install an simple expression with
nix-env
. I always get the errorerror: file 'REPEAT' was not found in the Nix search path (add it using $NIX_PATH or -I)
Steps To Reproduce
Steps to reproduce the behavior:
Create two files:
Dockerfile
expression.nix
And run
docker build .
Expected behavior
The simple script is installed in the env :)
Metadata
The text was updated successfully, but these errors were encountered: