Open LittleAmara opened 1 year ago
Just run into this too:
LSP[nil_ls] Flake input "home-manager" cannot be evaluated: `nix flake show path:/nix/store/1h8yz1jsh2pck91kfhrpxvkci6m0c1iy-source` failed with exit status: 1. Stderr:
copying '/nix/store/1h8yz1jsh2pck91kfhrpxvkci6m0c1iy-source'...
evaluating file '/nix/store/1h8yz1jsh2pck91kfhrpxvkci6m0c1iy-source/flake.nix'
downloading 'https://channels.nixos.org/flake-registry.json'...
downloading 'https://api.github.com/repos/NixOS/nixpkgs/commits/nixpkgs-unstable'...
downloading 'https://api.github.com/repos/NixOS/nixpkgs/tarball/0b6445b611472740f02eae9015150c07c5373340'...
evaluating file '/nix/store/bwps706g6ywl1811r7bwv32py12129ci-source/flake.nix'
warning: creating lock file '/nix/store/1h8yz1jsh2pck91kfhrpxvkci6m0c1iy-source/flake.lock'
error: opening file '/nix/store/1h8yz1jsh2pck91kfhrpxvkci6m0c1iy-source/flake.lock': Read-only file system
(use '--show-trace' to show detailed location information)
Seems we need --inputs-from <current-flake> <input_name>
instead of directly using the input store path. But this would dump the current flake more often (we don't have lazy dumping yet https://github.com/NixOS/nix/pull/6530), which is bad for big repo like nixpkgs.
BTW: You can temporarily disable the evaluation workspace-wide via nix.flake.autoEvalInputs = false
since 21d0870aaba406c41acaf602ce59d000fba7a27c
Hey, I don't know if it is the desired behaviour but if an input of a flake does not have a lock file then nil will throw this (see image below).
A simple flake to reproduce:
Edit: I'm on version 2023-05-02