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

(vimPlugins.vim-plug, potentially others) buildVimPluginFrom2Nix installs files to root #138644

Closed
iFreilicht opened this issue Sep 20, 2021 · 6 comments
Labels
0.kind: bug Something is broken 6.topic: vim

Comments

@iFreilicht
Copy link
Contributor

iFreilicht commented Sep 20, 2021

Describe the bug

On unstable, nixpkgs.vimPlugins.vim-plug installs all its files to the root. On 21.05, it installs them properly into `share/

Steps To Reproduce

Steps to reproduce the behavior:

  1. Add both the 21.05 and unstable channels with nix-channel
  2. Run nix-channel --update
  3. nix-env -f '<unstable>' -iA vimPlugins.vim-plug
  4. Run ls .nix-profile:
$ ls .nix-profile
bin  doc  etc  lib  LICENSE  manifest.nix  plug.png  plug.vim  README.md  share  test

Expected behavior

  1. nix-env -f '<21.05>' -iA vimPlugins.vim-plug
  2. Run ls .nix-profile and record the result
$ ls .nix-profile
bin  etc  lib  manifest.nix  share

Additional context

buildVimPluginFrom2Nix being the problem is an assumption from my side, as I looked into the code and no manual build steps seem to take place when vim-plug is being built.

I didn't test it, but this would mean that pretty much all vim plugins are affected.

Notify maintainers

@teto
@timokau
@siraben

I added you since you touched most of the codebase here, but maybe someone else needs to know about this, too?

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.12.19-1-MANJARO, Manjaro Linux, noversion`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.15`
 - channels(root): `"nixpkgs-21.05.3248.6120ac5cd20"`
 - channels(felix): `"21.05-21.05.3248.6120ac5cd20, unstable-21.11pre316684.79c444b5bde, nixos-21.05-21.05.3248.6120ac5cd20"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@iFreilicht iFreilicht added the 0.kind: bug Something is broken label Sep 20, 2021
@teto
Copy link
Member

teto commented Sep 20, 2021

doesn't #138349 solve this for you ?

@iFreilicht
Copy link
Contributor Author

If that change is live on unstable already, no. If it isn't, how could I test it?

@teto
Copy link
Member

teto commented Sep 20, 2021

you can clone the repo, git log origin/nixos-unstable then check if the commit is part of it. Seems like it is now.

@teto
Copy link
Member

teto commented Sep 24, 2021

did that work ?

@teto
Copy link
Member

teto commented Oct 22, 2021

should be good now

@teto teto closed this as completed Oct 22, 2021
@iFreilicht
Copy link
Contributor Author

So I got to try this now, and it isn't solved. I think the issue I had here might be that nothing from nixpkgs.vimPlugins is supposed to be installed directly via nix-env?

It seems like the plugins in vimPlugins are supposed to be installed with vim.customize?

But also, when looking at this implementation of vim-plug, I notice that it mentions vimPlugins.plug.rtp, which I've never seen before, I would expect that to be .out. And additionally, I saw that it seems to be possible to use vim.override { plug.plugins = with vimPlugins; [ <plugins> ] } to install plugins? Not sure what the intended way of doing this is, but it certainly seems like directly installing anything from vimPlugins is not intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: vim
Projects
None yet
Development

No branches or pull requests

2 participants