Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix-index fails due to mesos not being found #212

Open
OleMussmann opened this issue May 26, 2023 · 4 comments
Open

nix-index fails due to mesos not being found #212

OleMussmann opened this issue May 26, 2023 · 4 comments

Comments

@OleMussmann
Copy link

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"}
@shiryel
Copy link

shiryel commented Aug 10, 2023

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)

@e-nikolov
Copy link

e-nikolov commented Aug 31, 2023

I am also getting this error. Aren't flakes a replacement for channels? Why are they still needed for this?

@RaitoBezarius
Copy link
Member

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.

@e-nikolov
Copy link

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.

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

No branches or pull requests

4 participants