20 gdkPixbufSupport ? true,
21 unicode3Support ? true,
27 pname = "rxvt-unicode";
29 description = "A clone of the well-known terminal emulator rxvt";
31 desktopItem = makeDesktopItem {
34 icon = "utilities-terminal";
35 comment = description;
36 desktopName = "URxvt";
52 url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=${package}&id=${rev}";
59 name = "${pname}-unwrapped-${version}";
60 inherit pname version;
63 url = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${version}.tar.bz2";
64 sha256 = "qqE/y8FJ/g8/OR+TMnlYD3Spb9MS1u0GuP8DwtRmcug=";
67 nativeBuildInputs = [ pkg-config ];
73 ncurses # required to build the terminfo file
79 ++ lib.optionals perlSupport [
83 ++ lib.optional gdkPixbufSupport gdk-pixbuf;
94 # the required patches to libXft are in nixpkgs by default, see
95 # ../../../servers/x11/xorg/overrides.nix
97 name = "enable-wide-glyphs.patch";
98 package = "rxvt-unicode-truecolor-wide-glyphs";
99 rev = "69701a09c2c206233952b84bc966407f6774f1dc";
100 sha256 = "0jfcj0ahky4dxdfrhqvh1v83mblhf5nak56dk1vq3bhyifdg7ffq";
103 name = "improve-font-rendering.patch";
104 package = "rxvt-unicode-truecolor-wide-glyphs";
105 rev = "69701a09c2c206233952b84bc966407f6774f1dc";
106 sha256 = "1jj5ai2182nq912279adihi4zph1w4dvbdqa1pwacy4na6y0fz9y";
111 ./patches/9.06-font-width.patch
115 ./patches/256-color-resources.patch
117 ++ lib.optional (perlSupport && lib.versionAtLeast perl.version "5.38") (fetchpatch {
118 name = "perl538-locale-c.patch";
119 url = "https://github.com/exg/rxvt-unicode/commit/16634bc8dd5fc4af62faf899687dfa8f27768d15.patch";
120 excludes = [ "Changes" ];
121 sha256 = "sha256-JVqzYi3tcWIN2j5JByZSztImKqbbbB3lnfAwUXrumHM=";
123 ++ lib.optional stdenv.hostPlatform.isDarwin ./patches/makefile-phony.patch;
126 "--with-terminfo=${placeholder "terminfo"}/share/terminfo"
128 (lib.enableFeature perlSupport "perl")
129 (lib.enableFeature unicode3Support "unicode3")
130 ] ++ lib.optional emojiSupport "--enable-wide-glyphs";
137 CFLAGS = [ "-I${freetype.dev}/include/freetype2" ];
141 # without this the terminfo won't be compiled by tic, see man tic
142 mkdir -p $terminfo/share/terminfo
143 export TERMINFO=$terminfo/share/terminfo
145 + lib.optionalString perlSupport ''
146 # make urxvt find its perl file lib/perl5/site_perl
147 # is added to PERL5LIB automatically
148 mkdir -p $out/$(dirname ${perl.libPrefix})
149 ln -s $out/lib/urxvt $out/${perl.libPrefix}
153 mkdir -p $out/nix-support
154 echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
155 cp -r ${desktopItem}/share/applications/ $out/share/
158 passthru.tests.test = nixosTests.terminal-emulators.urxvt;
162 homepage = "http://software.schmorp.de/pkg/rxvt-unicode.html";
163 downloadPage = "http://dist.schmorp.de/rxvt-unicode/Attic/";
164 maintainers = with maintainers; [ rnhmjoj ];
165 platforms = platforms.unix;
166 license = licenses.gpl3;