I've been hacking on this today "in anger" because I was trying to get nix-index working on my m1 mac but it doesn't due to haskellPackages not evaluating:
$ nix-env -qa -f '<nixpkgs>' -A haskellPackages --xml
error: attribute 'streamly_0_8_1_1' missing
at /nix/store/1plvwhmv48whaypzixdlahjvwv19nz7h-nixpkgs/nixpkgs/pkgs/development/haskell-modules/configuration-darwin.nix:259:6:
258| ] ++ (drv.libraryFrameworkDepends or []);
259| }) super.streamly_0_8_1_1;
| ^
260|
I figured I could quickly jump in and make nix-index ignore sets that don't evaluate however, it ends up in an infinite loop when the parser fails.
I've been hacking on this today "in anger" because I was trying to get nix-index working on my m1 mac but it doesn't due to haskellPackages not evaluating:
I figured I could quickly jump in and make nix-index ignore sets that don't evaluate however, it ends up in an infinite loop when the parser fails.
I'm not sure exactly what the intention here was:
https://github.com/bennofs/nix-index/blob/e7c66ba52fcfba6bfe51adb5400c29a9622664a2/src/nixpkgs.rs#L112-L136
But in case of an error, it returns
Some(Err)
, which tells rust there are more items in the iter.as a quick hack to test my theory I added something like
which works, but I'm not sure what the proper solution is.