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

termite: add patch to fix handling nix urls #32862

Merged
merged 1 commit into from Dec 20, 2017

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Dec 19, 2017

(Builds on #32860 since patch is slightly different on v13 vs v12)

Motivation for this change

Nix-provided terminal shouldn't break on URL patterns commonly used in *.nix files!
This PR includes a patch addressing this.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Anecdotally: I've been using termite patched in this manner for months (tracking git, more or less) and I haven't experienced any problems.

@jtojnar
Copy link
Contributor

jtojnar commented Dec 20, 2017

Can you mention the pull request in the comment next to the patch?

Patch based on:
thestinger/termite#516

While this might "break" some URL's in the wild,
in return this fixes matching of URL's in Nix code.
Without this patch the trailing semicolon is included as part of the
URL, which creates invalid URL's for nearly all meta.homepage values.
@dtzWill
Copy link
Member Author

dtzWill commented Dec 20, 2017

Good catch, added mention of the PR in the nix expression and patch file.

@jtojnar
Copy link
Contributor

jtojnar commented Dec 20, 2017

@GrahamcOfBorg build termite

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Success for system: aarch64-linux

shrinking RPATHs of ELF executables and libraries in /nix/store/z09d7gzpp3xhr5jqpa620z4wq5cwky7b-termite-13
shrinking /nix/store/z09d7gzpp3xhr5jqpa620z4wq5cwky7b-termite-13/bin/.termite-wrapped
gzipping man pages under /nix/store/z09d7gzpp3xhr5jqpa620z4wq5cwky7b-termite-13/share/man/
stripping (with flags -S) in /nix/store/z09d7gzpp3xhr5jqpa620z4wq5cwky7b-termite-13/bin
patching script interpreter paths in /nix/store/z09d7gzpp3xhr5jqpa620z4wq5cwky7b-termite-13
checking for references to /build in /nix/store/z09d7gzpp3xhr5jqpa620z4wq5cwky7b-termite-13...
shrinking RPATHs of ELF executables and libraries in /nix/store/f6v716r7h5mqbmjpsmnx6afy87dfv9mf-termite-13-terminfo
patching script interpreter paths in /nix/store/f6v716r7h5mqbmjpsmnx6afy87dfv9mf-termite-13-terminfo
checking for references to /build in /nix/store/f6v716r7h5mqbmjpsmnx6afy87dfv9mf-termite-13-terminfo...
/nix/store/z09d7gzpp3xhr5jqpa620z4wq5cwky7b-termite-13

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Success for system: x86_64-linux

shrinking RPATHs of ELF executables and libraries in /nix/store/rslax7svi9asrdxs76xm4ixa5zicggzl-termite-13
shrinking /nix/store/rslax7svi9asrdxs76xm4ixa5zicggzl-termite-13/bin/.termite-wrapped
gzipping man pages under /nix/store/rslax7svi9asrdxs76xm4ixa5zicggzl-termite-13/share/man/
stripping (with flags -S) in /nix/store/rslax7svi9asrdxs76xm4ixa5zicggzl-termite-13/bin 
patching script interpreter paths in /nix/store/rslax7svi9asrdxs76xm4ixa5zicggzl-termite-13
checking for references to /tmp/nix-build-termite-13.drv-0 in /nix/store/rslax7svi9asrdxs76xm4ixa5zicggzl-termite-13...
shrinking RPATHs of ELF executables and libraries in /nix/store/3n0wwzdjazdds1a0rn092lphw6va9ssg-termite-13-terminfo
patching script interpreter paths in /nix/store/3n0wwzdjazdds1a0rn092lphw6va9ssg-termite-13-terminfo
checking for references to /tmp/nix-build-termite-13.drv-0 in /nix/store/3n0wwzdjazdds1a0rn092lphw6va9ssg-termite-13-terminfo...
/nix/store/rslax7svi9asrdxs76xm4ixa5zicggzl-termite-13

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: x86_64-darwin

checking if clang++ -std=gnu++11 supports flag -Wstrict-null-sentinel in envvar CXXFLAGS... no
checking if clang++ -std=gnu++11 supports flag -fno-rtti in envvar CXXFLAGS... yes
checking if clang++ -std=gnu++11 supports flag -fno-exceptions in envvar CXXFLAGS... yes
checking if clang++ -std=gnu++11 supports flag -fvisibility=hidden in envvar CXXFLAGS... yes
checking if clang++ -std=gnu++11 supports flag -fvisibility-inlines-hidden in envvar CXXFLAGS... yes
checking if clang supports "-Wl,-Bsymbolic-functions" flag... 
configure: error: -Bsymbolic requested but not supported by ld. Use --disable-Bsymbolic to disable
builder for ‘/nix/store/qkw167nbgm7dd9kljw306mcvznbx1fnr-vte-ng-0.50.2.a.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/2m6wb4h3icn66ck9rf4r03psrg33sdbb-termite-13.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/2m6wb4h3icn66ck9rf4r03psrg33sdbb-termite-13.drv’ failed

@jtojnar
Copy link
Contributor

jtojnar commented Dec 20, 2017

How is that supposed to work? If I run echo 'https://github.com/thestinger/termite/pull/516', it does not seem to be recognized as an URL. Or is it just not that overt like in GNOME Terminal, which changes the mouse pointer and underlines the link when hovering over it?

@dtzWill
Copy link
Member Author

dtzWill commented Dec 20, 2017

Note that v13 also adds support for fancy hyperlinks, see: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

@jtojnar check your config, maybe? I thought the default was clickable_url = true but might be worth setting explicitly to see if that helps.

Mouse-over should underline and then be clickable (using browser config, probably falls back to $BROWSER or somethiing?)

@jtojnar
Copy link
Contributor

jtojnar commented Dec 20, 2017

Okay, creating ~/.config/termite/config with the following content worked:

[options]
clickable_url = true

@jtojnar
Copy link
Contributor

jtojnar commented Dec 20, 2017

Thanks.

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