-
Notifications
You must be signed in to change notification settings - Fork 227
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
Cannot fetch input 'path:./glibc-patch' because it uses a relative path #2481
Comments
So I tried using an absolute path to see if it would work and it did. I replaced
with
and ran
and it worked with no problems. Relative paths in flake inputs seems to be the problem but my research on it hasn't yielded much good advise. If that was being used for 2 years and no one seems to have had a problem with it then it has to be a recent change to nix flakes to be causing the problem. |
See this comment instead. |
I’m having the same issue, and the fix @dwayne suggested was also what worked for me. |
Actually, reading further down in the documentation under the
where path is an absolute path to a directory in the file system containing a file named If the flake at path is not inside a git repository, the path generally must be an absolute path. However, on the command line, it can be a relative path (e.g. For example, these are valid path flake references:
|
#2421 |
Almost certainly related: NixOS/nix#12248 |
Even after the proposed (albeit temporary) fix, |
On my side, upgrading nix with
|
I can try a downgrade, but for me the same is still happening on 2.25.4 vagrant in 🌐 ubuntu in app on main [✘!?] via 🐍 v3.13.1
❯ devbox version
0.13.7
vagrant in 🌐 ubuntu in app on main [✘!?] via 🐍 v3.13.1
❯ nix --version
nix (Nix) 2.25.4
vagrant in 🌐 ubuntu in app on main [✘!?] via 🐍 v3.13.1
❯ bat devbox.json
───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: devbox.json
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ {
2 ~ │ "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.7/.schema/devbox.schema.json",
3 ~ │ "packages": [
4 ~ │ "python@latest",
5 │ ],
6 ~ │ "shell": {
7 ~ │ "init_hook": [
8 ~ │ "echo 'Welcome to devbox!' > /dev/null"
9 ~ │ ],
10 ~ │ "scripts": {
11 ~ │ "test": [
12 ~ │ "echo \"Error: no test specified\" && exit 1"
13 ~ │ ]
14 ~ │ }
15 │ }
16 │ }
17 ~ │
───────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
vagrant in 🌐 ubuntu in app on main [✘!?] via 🐍 v3.13.1
❯ devbox shell
Info: Ensuring packages are installed.
✓ Computed the Devbox environment.
Error: nix: command error: nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' print-dev-env --json path:/home/vagrant/code/app/.devbox/gen/flake: cannot fetch input 'path:./glibc-patch' because it uses a relative path: exit code 1
Error: There was an internal error. Run with DEVBOX_DEBUG=1 for a detailed error message, and consider reporting it at https://github.com/jetify-com/devbox/issues |
What happened?
Trying to open a Devbox shell with Python version 3.13.1 (but the version doesn't seem to matter) I get the following error:
Other relevant details
The file at
.devbox/gen/flake/flake.nix
seems to be the issue:Specifically,
glibc-patch.url = "path:./glibc-patch";
.The template used is: https://github.com/jetify-com/devbox/blob/0.13.7/internal/shellgen/tmpl/flake.nix.tmpl
The
glibc-patch.url
value comes from: https://github.com/jetify-com/devbox/blob/0.13.7/internal/shellgen/flake_input.go#L16When I use the following
devbox.json
instead everything works fine.Steps to reproduce
devbox shell
.Command
shell
devbox.json
Devbox version
0.13.7
Nix version
nix (Nix) 2.25.4
What system does this bug occur on?
Linux (x86-64)
Debug logs
The text was updated successfully, but these errors were encountered: