`nix-index` fails due to `mesos` not being found
OleMussmann opened this issue · comments
The package comma
fails for me, because nix-index
can't, well, index anymore. I'm not sure if nix-index
is choking, or if nix-env
is to blame.
$ nix-index
+ querying available packages
error: querying available packages failed
caused by: nix-env failed with error: nix-env failed with exit code 1:
error: attribute 'mesos' missing
at /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/development/haskell-modules/configuration-nix.nix:143:24:
142| # Pass _only_ mesos; the correct protobuf is propagated.
143| extraLibraries = [ pkgs.mesos ];
| ^
144| preConfigure = "sed -i -e /extra-lib-dirs/d -e 's|, /usr/include, /usr/local/include/mesos||' hs-mesos.cabal";
Did you mean one of meson, ecos, geos, less or memo?
(use '--show-trace' to show detailed location information)
$ nix-index --version
nix-index 0.1.5
$ nixos-version --json
{"nixosVersion":"22.11.20230524.99fe1b8","nixpkgsRevision":"99fe1b870522d6ee3e692c2b6e663d6868a3fde4"}
I was having this issue, because I was using Nix flakes without updating the Nix channels.
This problem happens because nix-index
expects an updated <nixpkgs> channel.
I fixed this issue by syncing the NIX_PATH
with the current version of my nixpkgs input (from flake.nix):
{
nix.nixPath = [ "nixpkgs=${nixpkgs.outPath}" ];
}
Note that you also need
nix.channel.enable
to be true (the default)
I am also getting this error. Aren't flakes a replacement for channels? Why are they still needed for this?
I am also getting this error. Aren't flakes a replacement for channels? Why are they still needed for this?
Flakes are an experimental feature, they are no replacement to channels today except if you know what you are doing.
I just wasn't aware that it's possible to use channels when using flakes. I got started with flakes directly and have never used channels.