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