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 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.
@doronbehar doronbehar force-pushed the doronbehar:vim-nogui-fix branch from 3f9ce24 to bacaad0 Jun 20, 2020
@doronbehar doronbehar mentioned this pull request Jun 20, 2020
4 of 10 tasks complete
@ofborg ofborg bot added the 6.topic: vim label Jun 20, 2020
@ofborg ofborg bot requested review from equirosa and lovek323 Jun 20, 2020
@teto
Copy link
Contributor

teto commented Jun 21, 2020

shouldn't it be guiSupport = false; ?

@doronbehar
Copy link
Contributor Author

doronbehar commented Jun 21, 2020

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") ''

This comment has been minimized.

Copy link
@doronbehar

doronbehar Jun 21, 2020

Author Contributor

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

@doronbehar doronbehar force-pushed the doronbehar:vim-nogui-fix branch from bacaad0 to 0e3b0ef Jun 21, 2020
@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 doronbehar force-pushed the doronbehar:vim-nogui-fix branch from 0e3b0ef to aec4992 Jun 26, 2020
@doronbehar
Copy link
Contributor Author

doronbehar commented Jun 26, 2020

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

doronbehar commented Jun 26, 2020

@doronbehar
Copy link
Contributor Author

doronbehar commented Jun 26, 2020

@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!

@arcnmx
arcnmx approved these changes Jun 26, 2020
Copy link
Member

arcnmx left a comment

Tested and fixes the issue for me!

if `guiSupport` is either `gtk3` or `gtk2`, then gvim shouldn't be
patchelf'ed.
@doronbehar doronbehar force-pushed the doronbehar:vim-nogui-fix branch from aec4992 to ffeb13f Jul 1, 2020
@doronbehar
Copy link
Contributor Author

doronbehar commented Jul 1, 2020

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

@doronbehar
Copy link
Contributor Author

doronbehar commented Jul 12, 2020

@doronbehar doronbehar closed this Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.