-
Notifications
You must be signed in to change notification settings - Fork 267
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
Encountered "Failed to get cachix caches due to evaluation error" when running devenv shell
command
#1043
Comments
I read the code of generated flake file by the command, it uses most of the syntax not really supported by flake according to NixOS/nix#4945 or my previous experience with flake, did I miss something when installing devenv? Is there a flag I should turn on for my nix to be able to make devenv uses cache without a problem? |
That's really strange can you share devenv.lock? |
@domenkozar sure, here you go
|
FWIW, I think I’m experiencing the same issue - let me know if I can provide any details too. |
I'll look into this first thing in the morning tomorrow. |
I fixed the error by adding cachix to Not sure if related, but running |
I'm running into what I think is a related problem. I'm going the flake route, and get the following when trying to launch my shell
it then tries to build everything from source, but I think in my case I will resolve this when i figure out how to add myself as a trusted user in my host flake setup. |
Can you guys run |
sure
|
Ah that's the issue, for some reason it's not detecting your user isn't trusted. |
I just added my username in
pretty awesome. |
I'm working on a fix so this is properly detected, somehow it slipped in my testing. |
I'd appreciate if someone can install the dev version |
okay, despite that the cache is working now, I think the second eval command is always going to fail regardless: Lines 243 to 246 in 63c7109
because
as mentioned in the issue above, as far as I know |
devenv rewrites all nix command calls to it's own Nix that relaxes that constraint on flakes. It would be helpful if you run the command I mentioned that should print what it barfs on. |
oh, okay, interesting, I didn't know devenv is using its own nix implementation. looks like it's not really complaining anything about that indeed:
I think the problem is addressed, please feel free to close the issue. |
I'd still like to fix for devenv to warn what you have to do. For those that it doesn't work I'd appreciate running the development version and also paste the output of |
@domenkozar I've just started running $ nix profile install --accept-flake-config github:cachix/devenv/#devenv
warning: ignoring untrusted substituter 'https://devenv.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
error: interrupted by the user |
Yeah, you'll have to suffer through that until we fix this issue. |
OK, I'll come back to you once 782 packages have built! :) |
Alright, let me know, I'd like to fix this and then we can release 1.0.2 |
@tomtaylor I found a way to reproduce it myself, fix incoming. |
Thanks @domenkozar. So, I removed my existing ➜ ~ nix profile install github:cachix/devenv/v1.0.2
do you want to allow configuration setting 'extra-substituters' to be set to 'https://devenv.cachix.org' (y/N)? y
do you want to permanently mark this value as trusted (y/N)? y
do you want to allow configuration setting 'extra-trusted-public-keys' to be set to 'devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=' (y/N)? y
do you want to permanently mark this value as trusted (y/N)? y
warning: ignoring untrusted substituter 'https://devenv.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
[8/6/322 built, 0.4 MiB DL] building libgit2-1.7.2 (buildPhase): [ 27%] Building C object src/libgit2/CMakeFilerror: interrupted by the user
➜ ~ nix profile install github:cachix/devenv/v1.0.2
warning: ignoring untrusted substituter 'https://devenv.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
[8/5/316 built] building libpng-apng-1.6.40 (buildPhase): libtool: compile: clang -DHAVE_CONFIG_H -I. -g -O2 error: interrupted by the user |
nix profile install nixpkgs#devenv
…On Mon, Mar 25, 2024 at 1:04 PM Tom Taylor ***@***.***> wrote:
Thanks @domenkozar <https://github.com/domenkozar>. So, I removed my
existing devenv profile and ran the following, but it's still trying to
compile the world. Is that expected?
➜ ~ nix profile install github:cachix/devenv/v1.0.2do you want to allow configuration setting 'extra-substituters' to be set to 'https://devenv.cachix.org' (y/N)? ydo you want to permanently mark this value as trusted (y/N)? ydo you want to allow configuration setting 'extra-trusted-public-keys' to be set to 'devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=' (y/N)? ydo you want to permanently mark this value as trusted (y/N)? y
warning: ignoring untrusted substituter 'https://devenv.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
[8/6/322 built, 0.4 MiB DL] building libgit2-1.7.2 (buildPhase): [ 27%] Building C object src/libgit2/CMakeFilerror: interrupted by the user
➜ ~ nix profile install github:cachix/devenv/v1.0.2
warning: ignoring untrusted substituter 'https://devenv.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
[8/5/316 built] building libpng-apng-1.6.40 (buildPhase): libtool: compile: clang -DHAVE_CONFIG_H -I. -g -O2 error: interrupted by the user
—
Reply to this email directly, view it on GitHub
<#1043 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA63AYFI57JS6UR2FUO4NTY2AOGPAVCNFSM6AAAAABFED24VWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJXHE3DKMJWGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Just wanted to update in relation to my duplicate issue #1047. I've been able to get devenv v1.0.2 from the nixos-unstable channel, and was met with the warning about being an untrusted user once I ran Thanks for getting this fixed! 🎉 |
Describe the bug
I follow the getting started guide and try to run a minimal devenv sample file like this
But I saw output like this
While the devenv shell eventually built all the dependencies and enter the shell successfully, but it seems like the command is not using the cache as it supposes to be. I dug a bit deeper, and I realized that's caused by
let ... in
syntax used in the generated flake file by these lines:devenv/devenv/src/flake.tmpl.nix
Lines 3 to 5 in 63c7109
And if you looked at the generated flake file
.devenv.flake.nix
, it's like thisUnfortunately, it appears that
flake.nix
is not using real nix language:NixOS/nix#4945
As a result, if you take out the generated flake file at
.devenv.flake.nix
, renamed it asflake.nix
and run the same command as in the code.It will show an error like that. It's the root cause of error message like
Failed to get cachix caches due to evaluation error
.To reproduce
To reproduce, simply install devenv 1.0.1, then run
devenv shell
with sample file such asVersion
and the nix version is
The text was updated successfully, but these errors were encountered: