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

recursive-nix example fails to build #10385

Open
2 tasks done
fricklerhandwerk opened this issue Apr 2, 2024 · 0 comments
Open
2 tasks done

recursive-nix example fails to build #10385

fricklerhandwerk opened this issue Apr 2, 2024 · 0 comments
Labels
bug documentation recursive-nix The recursive-nix experimental feature

Comments

@fricklerhandwerk
Copy link
Contributor

fricklerhandwerk commented Apr 2, 2024

Problem

Using Nix 2.21.0 on the only example in the manual fails to build:

with import <nixpkgs> {};
runCommand "foo"
{
buildInputs = [ nix jq ];
NIX_PATH = "nixpkgs=${<nixpkgs>}";
}
''
hello=$(nix-build -E '(import <nixpkgs> {}).hello.overrideDerivation (args: { name = "recursive-hello"; })')
mkdir -p $out/bin
ln -s $hello/bin/hello $out/bin/hello
''

nix-build recursive.nix -I nixpkgs=channel:nixpkgs-unstable --extra-experimental-features recursive-nix
building '/nix/store/mjq5z8z7rp04avbjya9qlfc3xhimnlyz-foo.drv'...
error: creating directory '/nix/var': Permission denied
error: builder for '/nix/store/mjq5z8z7rp04avbjya9qlfc3xhimnlyz-foo.drv' failed with exit code 1;

Proposal

Document everything required to make it work, as done in a Nixpkgs test.

Related:

Checklist

Priorities

Add 👍 to issues you find important.

@fricklerhandwerk fricklerhandwerk added bug documentation recursive-nix The recursive-nix experimental feature labels Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug documentation recursive-nix The recursive-nix experimental feature
Projects
None yet
Development

No branches or pull requests

1 participant