Merge pull request #157283 from Valodim/rxvt-unicode-wideglyph

rxvt-unicode-emoji: variant of rxvt-unicode with emoji support
This commit is contained in:
Michele Guerini Rocco
2022-02-06 23:27:34 +01:00
committed by GitHub
2 changed files with 36 additions and 5 deletions
@@ -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" ];
+8
View File
@@ -1160,10 +1160,18 @@ with pkgs;
rxvt-unicode = callPackage ../applications/terminal-emulators/rxvt-unicode/wrapper.nix { };
rxvt-unicode-emoji = rxvt-unicode.override {
rxvt-unicode-unwrapped = rxvt-unicode-unwrapped-emoji;
};
rxvt-unicode-plugins = import ../applications/terminal-emulators/rxvt-unicode-plugins { inherit callPackage; };
rxvt-unicode-unwrapped = callPackage ../applications/terminal-emulators/rxvt-unicode { };
rxvt-unicode-unwrapped-emoji = rxvt-unicode-unwrapped.override {
emojiSupport = true;
};
sakura = callPackage ../applications/terminal-emulators/sakura { };
st = callPackage ../applications/terminal-emulators/st {