shajra / direnv-nix-lorelei

Alternative Nix extension of Direnv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

direnv: error: attribute 'lorri-eval-patched' missing, at (string):1:2

vroad opened this issue · comments

commented

Stopped working after updating direnv-nix-lorelei to ba5f664 on my mac. Last version that worked on my machine is f81a6e7

I deleted my own home-manager module in my home-manager config repo and switched to the one created by you, but I guess this change is not relevant to the issue.

#4

direnv: loading ~/my-app/.envrc
direnv: initializing cache
direnv: rebuilding with Nix
direnv: error: attribute 'lorri-eval-patched' missing, at (string):1:2
direnv: ERROR: Nix build failed

I looked into generated shell scripts to see what's happening, and found the lines possibly caused build failure.
lorri-eval-patched no longer exists in current version of the package. (confirmed with auto completion of nix repl)

local auto_watch_eval=patched

--expr "((import ${buildSource} {}).lorri-eval-$auto_watch_eval)"

--expr "((import /nix/store/ra2fzvpx1il2qyx5lcxgwx5xw0l6lnn2-source {}).lorri-eval-$auto_watch_eval)"
nix-repl> lorelei = ((import /nix/store/ra2fzvpx1il2qyx5lcxgwx5xw0l6lnn2-source {}))

nix-repl> lorelei.
lorelei.distribution  lorelei.nix-project   lorelei.nixpkgs

Previous version did have lorri-eval-patched.

lorri-eval-patched

Shoot. I was making changes to the build that shouldn't have affected the script. I got a false confidence, and didn't test everything correctly, evidently.

I think this is an easy fix, I'll try to do it today.

As expected, this is on Linux as well as Mac. My testing missed this, sorry. As least it's reproduced. Working on it now.

@vroad the GitHub comment auto-closed this. I tested it out on my end, so I didn't feel as badly pushing it out to the main branch. But please comment back that the fix is working on your end as well.

@vroad Hey, I'll also be interested if the Home Manager module is working for you, because that's new code.

Man... there were multiple things errant with my manual testing. I always believe in testing, but for personal projects, I sometimes leave manual testing as an option, because the work to automate testing completely isn't always worth it. I have these supporting scripts, but they require too many assumptions that are easily broken.

I think I'm overthinking the complexity of testing this. I have a feeling it's pretty easy to test in a Nix expression. That will be a controlled environment.

commented

Thank you, home manager module from this repo is now working.

For testing, Something that ensures core functionality of lorelei is not broken at least might still be useful. Testing all combination of arguments is often difficult to achieve.