Skip to content

replace "path:" with "./"#12

Merged
rapenne-s merged 1 commit intorapenne-s:mainfrom
gador:fix-path
Oct 26, 2024
Merged

replace "path:" with "./"#12
rapenne-s merged 1 commit intorapenne-s:mainfrom
gador:fix-path

Conversation

@gador
Copy link
Contributor

@gador gador commented Oct 26, 2024

On newer nix versions (> 2.18) the "path:" settings will lead to evaluation errors when the flake uses symbolic links.

a typical error message would be:

error: access to absolute path '/lib' is forbidden in pure evaluation mode (use '--impure' to override)

when /lib actually is ./lib.

When "path:" is replaced by just using the flake's path no evaluation error is shown. As per the man page of nix flake the "path" attribute reffers to the local path of the flake.

This can just be removed (AFAIK) by referencing to the path as a positional argument.

Possible related issues:
NixOS/nix#11030
original PR introducing the error message NixOS/nix#9497

on newer nix versions (> 2.18) the "path:" settings
will lead to evaluation errors when the flake uses
symbolic links.

a typical error message would be:

`error: access to absolute path '/lib' is forbidden in pure evaluation
mode (use '--impure' to override)`

when `/lib` actually is `./lib`.

When "path:" is replaced by just using the flake's path
no evaluation error is shown. As per the man page of `nix flake`
the "path" attribute reffers to the local path of the flake.

This can just be removed (AFAIK) by referencing to the path as a
positional argument.

Possible related issues:
NixOS/nix#11030
original PR introducing the error message NixOS/nix#9497

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
@rapenne-s rapenne-s merged commit c0b0b93 into rapenne-s:main Oct 26, 2024
@rapenne-s
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants