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

vim_configurable: fix error of gvim when guiSupport = false #91150

Closed
wants to merge 1 commit into from

Conversation

doronbehar
Copy link
Contributor

@doronbehar doronbehar commented Jun 20, 2020

Motivation for this change

Otherwise, with the following overlay:

self: super:
{
  vim_configurable = super.vim_configurable.override {
    guiSupport = "false";
  };
}

The build fails for me with:

make[1]: Leaving directory '/build/source/src'
patchelf: getting info about '/nix/store/lqzr05k54c9g9dq3x84savln6l0gvbmd-vim_configurable-8.2.0701/bin/gvim': No such file or directory
builder for '/nix/store/rlillrjcg6isab31j30z6nvgxn7yz248-vim_configurable-8.2.0701.drv' failed with exit code 1
error: build of '/nix/store/rlillrjcg6isab31j30z6nvgxn7yz248-vim_configurable-8.2.0701.drv' failed
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@teto
Copy link
Member

teto commented Jun 21, 2020

shouldn't it be guiSupport = false; ?

@doronbehar
Copy link
Contributor Author

shouldn't it be guiSupport = false; ?

Where?

@@ -154,7 +154,11 @@ in stdenv.mkDerivation rec {
'' + stdenv.lib.optionalString stdenv.isLinux ''
patchelf --set-rpath \
"$(patchelf --print-rpath $out/bin/vim):${stdenv.lib.makeLibraryPath buildInputs}" \
"$out"/bin/{vim,gvim}
"$out"/bin/vim
'' + stdenv.lib.optionalString (guiSupport != "false") ''
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If gui support is enabled, the condition will be true, and then we do need to run that patchelf command.

@arcnmx
Copy link
Member

arcnmx commented Jun 25, 2020

Hm, my current use of this command is guiSupport = "no", so this patch doesn't work for me as-is. The patch expects a "false" string and @teto mentions false bool. What's the canon/proper value here?

Alternatively, sidestep the issue: [[ ! -e $out/bin/gvim ]] || patchelf?

@doronbehar
Copy link
Contributor Author

my current use of this command is guiSupport = "no", so this patch doesn't work for me as-is. The patch expects a "false" string and @teto mentions false bool. What's the canon/proper value here?

A false as a boolean doesn't evaluate, but certainly anything different then "gtk2" or "gtk3" will disable gui support so you are correct that != "false" wasn't good. I've updated the patch to check for either "gtk2" or "gtk3".

@doronbehar
Copy link
Contributor Author

@GrahamcOfBorg eval

@doronbehar
Copy link
Contributor Author

@teto I can confirm once again, that this issue is blocking me from updating to latest unstable. It still perplexes me that I didn't experience this in the past, when I disabled gui support. @arcnmx do you experience this error as well?

patchelf: getting info about '/nix/store/sjfqj8zhj0qrp01w53j35raj822ry8la-vim_configurable-8.2.0701/bin/gvim': No such file or directory

@arcnmx
Copy link
Member

arcnmx commented Jun 26, 2020

do you experience this error as well?

Yeah, though I (locally) patched nixpkgs last week to work around it so my system wouldn't break. It wasn't until yesterday that I had a chance to check to see if there were any PRs/issues addressing it.

I haven't had a chance to test aec4992 yet but looks like it should fix the problem!

Copy link
Member

@arcnmx arcnmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and fixes the issue for me!

if `guiSupport` is either `gtk3` or `gtk2`, then gvim shouldn't be
patchelf'ed.
@doronbehar
Copy link
Contributor Author

Still getting this error, rebased and pushed on top of the nixos-unstable channel branch.

@doronbehar
Copy link
Contributor Author

@doronbehar doronbehar closed this Jul 12, 2020
@doronbehar doronbehar deleted the vim-nogui-fix branch March 2, 2023 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants