diff options
author | Vincent Breitmoser <look@my.amazin.horse> | 2022-01-29 12:36:58 +0100 |
---|---|---|
committer | Vincent Breitmoser <look@my.amazin.horse> | 2022-02-06 21:47:43 +0100 |
commit | 7b937e9152989c6f6e8c7a44f014cbc84aed640f (patch) | |
tree | 9cf569446900ecc7cb81eca2f6a0ccd19afaed71 /pkgs/applications/terminal-emulators/rxvt-unicode | |
parent | 03e099b564ea6f78513a89c0c30b68d010e26b3e (diff) |
rxvt-unicode-emoji: init as variant of rxvt-unicode, with wide glyph (emoji) support
Patches adapted from https://aur.archlinux.org/packages/rxvt-unicode-truecolor-wide-glyphs/ See also https://github.com/blueyed/PKGBUILD-rxvt-unicode-wide/commit/a7241b714da18259621a8d404817ac60f8849ee8
Diffstat (limited to 'pkgs/applications/terminal-emulators/rxvt-unicode')
-rw-r--r-- | pkgs/applications/terminal-emulators/rxvt-unicode/default.nix | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/pkgs/applications/terminal-emulators/rxvt-unicode/default.nix b/pkgs/applications/terminal-emulators/rxvt-unicode/default.nix index 70ff4a4555d75..0e9402cf49539 100644 --- a/pkgs/applications/terminal-emulators/rxvt-unicode/default.nix +++ b/pkgs/applications/terminal-emulators/rxvt-unicode/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, makeDesktopItem +{ lib, stdenv, fetchurl, fetchpatch, makeDesktopItem , libX11, libXt, libXft, libXrender , ncurses, fontconfig, freetype , pkg-config, gdk-pixbuf, perl @@ -6,6 +6,7 @@ , perlSupport ? true , gdkPixbufSupport ? true , unicode3Support ? true +, emojiSupport ? false }: let @@ -22,6 +23,13 @@ let genericName = pname; categories = "System;TerminalEmulator;"; }; + + fetchPatchFromAUR = { package, name, rev, sha256 }: + fetchpatch rec { + url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=${package}&id=${rev}"; + extraPrefix = ""; + inherit name sha256; + }; in with lib; @@ -44,18 +52,33 @@ stdenv.mkDerivation { outputs = [ "out" "terminfo" ]; - patches = [ + patches = (if emojiSupport then [ + # the required patches to libXft are in nixpkgs by default, see + # ../../../servers/x11/xorg/overrides.nix + (fetchPatchFromAUR { + name = "enable-wide-glyphs.patch"; + package = "rxvt-unicode-truecolor-wide-glyphs"; + rev = "69701a09c2c206233952b84bc966407f6774f1dc"; + sha256 = "0jfcj0ahky4dxdfrhqvh1v83mblhf5nak56dk1vq3bhyifdg7ffq"; + }) + (fetchPatchFromAUR { + name = "improve-font-rendering.patch"; + package = "rxvt-unicode-truecolor-wide-glyphs"; + rev = "69701a09c2c206233952b84bc966407f6774f1dc"; + sha256 = "1jj5ai2182nq912279adihi4zph1w4dvbdqa1pwacy4na6y0fz9y"; + }) + ] else [ ./patches/9.06-font-width.patch + ]) ++ [ ./patches/256-color-resources.patch - ] ++ optional stdenv.isDarwin ./patches/makefile-phony.patch; - + ]++ optional stdenv.isDarwin ./patches/makefile-phony.patch; configureFlags = [ "--with-terminfo=${placeholder "terminfo"}/share/terminfo" "--enable-256-color" (enableFeature perlSupport "perl") (enableFeature unicode3Support "unicode3") - ]; + ] ++ optional emojiSupport "--enable-wide-glyphs"; LDFLAGS = [ "-lfontconfig" "-lXrender" "-lpthread" ]; CFLAGS = [ "-I${freetype.dev}/include/freetype2" ]; |