2019-02-03 15:30:35 +00:00
|
|
|
{ stdenv, fetchurl, makeDesktopItem, perlSupport ? true, libX11, libXt, libXft,
|
2016-11-11 17:29:46 +00:00
|
|
|
ncurses, perl, fontconfig, freetype, pkgconfig, libXrender,
|
2019-02-03 15:30:35 +00:00
|
|
|
gdkPixbufSupport ? true, gdk_pixbuf, unicode3Support ? true }:
|
2010-07-28 19:01:17 +01:00
|
|
|
|
2013-09-27 21:30:49 +01:00
|
|
|
let
|
2016-05-16 08:18:27 +01:00
|
|
|
pname = "rxvt-unicode";
|
2016-05-04 15:38:47 +01:00
|
|
|
version = "9.22";
|
2016-11-11 17:29:46 +00:00
|
|
|
description = "A clone of the well-known terminal emulator rxvt";
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "${pname}";
|
|
|
|
exec = "urxvt";
|
|
|
|
icon = "utilities-terminal";
|
|
|
|
comment = description;
|
|
|
|
desktopName = "URxvt";
|
|
|
|
genericName = "${pname}";
|
|
|
|
categories = "System;TerminalEmulator;";
|
|
|
|
};
|
2009-09-10 17:57:47 +01:00
|
|
|
in
|
2010-07-28 19:01:17 +01:00
|
|
|
|
2009-09-10 17:57:47 +01:00
|
|
|
stdenv.mkDerivation (rec {
|
2008-02-17 18:40:53 +00:00
|
|
|
|
2016-05-16 08:18:27 +01:00
|
|
|
name = "${pname}${if perlSupport then "-with-perl" else ""}${if unicode3Support then "-with-unicode3" else ""}-${version}";
|
2008-02-17 18:40:53 +00:00
|
|
|
|
2009-09-10 17:57:47 +01:00
|
|
|
src = fetchurl {
|
2011-03-18 05:55:37 +00:00
|
|
|
url = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${version}.tar.bz2";
|
2016-05-04 15:38:47 +01:00
|
|
|
sha256 = "1pddjn5ynblwfrdmskylrsxb9vfnk3w4jdnq2l8xn2pspkljhip9";
|
2007-10-31 12:17:14 +00:00
|
|
|
};
|
2008-02-17 18:40:53 +00:00
|
|
|
|
2010-07-28 19:01:17 +01:00
|
|
|
buildInputs =
|
2013-09-27 21:30:49 +01:00
|
|
|
[ libX11 libXt libXft ncurses /* required to build the terminfo file */
|
2011-03-18 05:55:37 +00:00
|
|
|
fontconfig freetype pkgconfig libXrender ]
|
2013-07-26 14:03:18 +01:00
|
|
|
++ stdenv.lib.optional perlSupport perl
|
|
|
|
++ stdenv.lib.optional gdkPixbufSupport gdk_pixbuf;
|
2009-06-30 22:45:15 +01:00
|
|
|
|
2013-10-09 08:02:13 +01:00
|
|
|
outputs = [ "out" "terminfo" ];
|
|
|
|
|
2014-04-26 00:48:04 +01:00
|
|
|
patches = [
|
|
|
|
./rxvt-unicode-9.06-font-width.patch
|
|
|
|
./rxvt-unicode-256-color-resources.patch
|
2015-01-13 09:11:02 +00:00
|
|
|
]
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin ./rxvt-unicode-makefile-phony.patch;
|
2014-02-03 13:30:29 +00:00
|
|
|
|
2010-07-28 19:01:17 +01:00
|
|
|
preConfigure =
|
|
|
|
''
|
2013-10-09 08:02:13 +01:00
|
|
|
mkdir -p $terminfo/share/terminfo
|
2014-05-22 22:13:25 +01:00
|
|
|
configureFlags="--with-terminfo=$terminfo/share/terminfo --enable-256-color ${if perlSupport then "--enable-perl" else "--disable-perl"} ${if unicode3Support then "--enable-unicode3" else "--disable-unicode3"}";
|
2013-10-09 08:02:13 +01:00
|
|
|
export TERMINFO=$terminfo/share/terminfo # without this the terminfo won't be compiled by tic, see man tic
|
2016-04-16 17:52:29 +01:00
|
|
|
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype.dev}/include/freetype2"
|
2019-01-05 07:47:15 +00:00
|
|
|
NIX_LDFLAGS="$NIX_LDFLAGS -lfontconfig -lXrender -lpthread "
|
2010-07-28 19:01:17 +01:00
|
|
|
''
|
|
|
|
# make urxvt find its perl file lib/perl5/site_perl is added to PERL5LIB automatically
|
|
|
|
+ stdenv.lib.optionalString perlSupport ''
|
2019-01-05 07:47:15 +00:00
|
|
|
mkdir -p $out/$(dirname ${perl.libPrefix})
|
2018-12-15 03:50:31 +00:00
|
|
|
ln -s $out/lib/urxvt $out/${perl.libPrefix}
|
2010-07-28 19:01:17 +01:00
|
|
|
'';
|
2008-02-17 18:40:53 +00:00
|
|
|
|
2015-05-26 05:36:26 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/nix-support
|
|
|
|
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
|
2016-11-11 17:29:46 +00:00
|
|
|
cp -r ${desktopItem}/share/applications/ $out/share/
|
2015-05-26 05:36:26 +01:00
|
|
|
'';
|
|
|
|
|
2016-11-11 17:29:46 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
inherit description;
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://software.schmorp.de/pkg/rxvt-unicode.html;
|
2016-10-03 16:40:18 +01:00
|
|
|
downloadPage = "http://dist.schmorp.de/rxvt-unicode/Attic/";
|
2018-01-17 05:13:23 +00:00
|
|
|
maintainers = [ ];
|
2016-11-11 17:29:46 +00:00
|
|
|
platforms = platforms.unix;
|
2018-08-04 18:09:20 +01:00
|
|
|
license = licenses.gpl3;
|
2007-10-31 12:17:14 +00:00
|
|
|
};
|
2008-02-17 18:40:53 +00:00
|
|
|
})
|