Skip to content

fish: NixOS module is broken because of /share/fish/vendor_completions.d #16614

Closed

Description

@solson

Issue description

The fish NixOS module, enabled by programs.fish.enable = true; is broken for me on the nixos-unstable channel. I first commented over on the PR which I believe caused this: #14526 (comment).

Steps to reproduce

When I sudo nixos-rebuild switch I get this:

cannot create directory `/nix/store/m3rrr54qspwiwyzn4gjrys36km6jz1g6-system-path//share/fish/vendor_completions.d': No such file or directory at /nix/store/xz5k60frmvvrj16lf7b0d8h3p0l4l7xw-builder.pl line 186.
builder for ‘/nix/store/bm5q3hs3pnijrjx1yrr647pslmzl986g-system-path.drv’ failed with exit code 2
cannot build derivation ‘/nix/store/z8bwgpzs4wiiv72rm4anc4mx1ixph1w2-nixos-system-conway-16.09pre85931.125ffff.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/z8bwgpzs4wiiv72rm4anc4mx1ixph1w2-nixos-system-conway-16.09pre85931.125ffff.drv’ failed

There is a broken-looking path in there with a double slash: /nix/store/m3rrr54qspwiwyzn4gjrys36km6jz1g6-system-path//share/fish/vendor_completions.d.

I later realized this error only occurs if you have no packages with /share/fish/vendor_completions.d. So, technically, I can work around this error by adding docker to environment.systemPackages. This also means that to reproduce you must remove any packages with that path.

Technical details

  • System: NixOS 16.09pre85931.125ffff (Flounder)
  • Nix version: 1.11.2
  • Nixpkgs version: 16.09pre85931.125ffff

Activity

  1. Profpatsch commented on Jun 30, 2016

    @Profpatsch
    Member

    That doesn’t seem to be the fault of the fish module, as this minimal system shows, which builds just fine:

    nix-build -E '(import <nixpkgs/nixos> { configuration = { programs.fish.enable = true; }; }).vm'
    

    What is the last commit where it still works? Has it worked at all in the past?

  2. solson commented on Jun 30, 2016

    @solson
    MemberAuthor

    @Profpatsch Ah, nice example. Sorry for jumping to conclusions.

    I minimized my error-inducing config and ended up with this, which you should be able to reproduce the problem with:

    nix-build -E '(import <nixpkgs/nixos> { configuration = { programs.fish.enable = true;  services.xserver = { enable = true; desktopManager.kde5.enable = true; }; }; }).vm'

    I'm not sure yet what part of KDE5 triggers the problem.

    What is the last commit where it still works? Has it worked at all in the past?

    Not sure. I haven't tested older versions of nixpkgs and I am new to NixOS.

  3. rasendubi commented on Jul 3, 2016

    @rasendubi
    Member

    FYI: I have the same issue and I don't have kde5 enabled.

  4. Profpatsch commented on Jul 3, 2016

    @Profpatsch
    Member

    @rasendubi can you create an invocation like the ones above?

  5. rasendubi commented on Jul 3, 2016

    @rasendubi
    Member

    I've tried to do that yesterday but failed. I'll be busy during the week but will try again next weekend.

    FWIW, my full config is available at github -- adding programs.enable.fish = true; breaks it for me.

  6. dezgeg commented on Jul 3, 2016

    @dezgeg
    Contributor

    The problem seems environment.pathsToLink = [ "/share" ]; which is enabled by e.g. KDE and some others:

    nix-build -E '(import <nixpkgs/nixos> { configuration = { programs.fish.enable = true; environment.pathsToLink = ["/share"]; }; }).vm'
    
  7. rasendubi commented on Jul 4, 2016

    @rasendubi
    Member

    I confirm I have this in my config, too.

  8. added a commit that references this issue on Jul 9, 2016
    852c478
  9. rasendubi commented on Jul 9, 2016

    @rasendubi
    Member

    Found and fixed the issue. See #16821.

  10. added 3 commits that reference this issue on Jul 9, 2016
    556aba1
    8943249
  11. added a commit that references this issue on Jul 13, 2016
    0172558
  12. solson commented on Jul 13, 2016

    @solson
    MemberAuthor

    So I think this was ultimately fixed by #16828? I'll check it out later when I have access to NixOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions