From 7a15db35d808000df2e98425e4acebb380e1c0d6 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 8 Jan 2020 22:55:08 +0100 Subject: rxvt-unicode: cleanup --- pkgs/applications/misc/rxvt-unicode/default.nix | 88 +++++++ .../rxvt-unicode/patches/256-color-resources.patch | 255 +++++++++++++++++++++ .../rxvt-unicode/patches/9.06-font-width.patch | 21 ++ .../misc/rxvt-unicode/patches/makefile-phony.patch | 10 + pkgs/applications/misc/rxvt_unicode/default.nix | 72 ------ .../rxvt-unicode-256-color-resources.patch | 255 --------------------- .../rxvt-unicode-9.06-font-width.patch | 21 -- .../rxvt_unicode/rxvt-unicode-makefile-phony.patch | 10 - 8 files changed, 374 insertions(+), 358 deletions(-) create mode 100644 pkgs/applications/misc/rxvt-unicode/default.nix create mode 100644 pkgs/applications/misc/rxvt-unicode/patches/256-color-resources.patch create mode 100644 pkgs/applications/misc/rxvt-unicode/patches/9.06-font-width.patch create mode 100644 pkgs/applications/misc/rxvt-unicode/patches/makefile-phony.patch delete mode 100644 pkgs/applications/misc/rxvt_unicode/default.nix delete mode 100644 pkgs/applications/misc/rxvt_unicode/rxvt-unicode-256-color-resources.patch delete mode 100644 pkgs/applications/misc/rxvt_unicode/rxvt-unicode-9.06-font-width.patch delete mode 100644 pkgs/applications/misc/rxvt_unicode/rxvt-unicode-makefile-phony.patch (limited to 'pkgs') diff --git a/pkgs/applications/misc/rxvt-unicode/default.nix b/pkgs/applications/misc/rxvt-unicode/default.nix new file mode 100644 index 000000000000..6512f402ffbd --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode/default.nix @@ -0,0 +1,88 @@ +{ stdenv, fetchurl, makeDesktopItem +, libX11, libXt, libXft, libXrender +, ncurses, fontconfig, freetype +, pkgconfig, gdk-pixbuf, perl +, perlSupport ? true +, gdkPixbufSupport ? true +, unicode3Support ? true +}: + +let + pname = "rxvt-unicode"; + version = "9.22"; + 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;"; + }; +in + +with stdenv.lib; + +stdenv.mkDerivation { + name = "${pname}-unwrapped-${version}"; + inherit pname version; + + src = fetchurl { + url = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${version}.tar.bz2"; + sha256 = "1pddjn5ynblwfrdmskylrsxb9vfnk3w4jdnq2l8xn2pspkljhip9"; + }; + + buildInputs = + [ libX11 libXt libXft ncurses # required to build the terminfo file + fontconfig freetype pkgconfig libXrender + ] ++ optional perlSupport perl + ++ optional gdkPixbufSupport gdk-pixbuf; + + outputs = [ "out" "terminfo" ]; + + patches = [ + ./patches/9.06-font-width.patch + ./patches/256-color-resources.patch + ] ++ optional stdenv.isDarwin ./patches/makefile-phony.patch; + + + configureFlags = [ + "--with-terminfo=$terminfo/share/terminfo" + "--enable-256-color" + (enableFeature perlSupport "perl") + (enableFeature unicode3Support "unicode3") + ]; + + LDFLAGS = [ "-lfontconfig" "-lXrender" "-lpthread" ]; + CFLAGS = [ "-I${freetype.dev}/include/freetype2" ]; + + preConfigure = + '' + # without this the terminfo won't be compiled by tic, see man tic + mkdir -p $terminfo/share/terminfo + export TERMINFO=$terminfo/share/terminfo + '' + + stdenv.lib.optionalString perlSupport '' + # make urxvt find its perl file lib/perl5/site_perl + # is added to PERL5LIB automatically + mkdir -p $out/$(dirname ${perl.libPrefix}) + ln -s $out/lib/urxvt $out/${perl.libPrefix} + ''; + + postInstall = '' + mkdir -p $out/nix-support + echo "$terminfo" >> $out/nix-support/propagated-user-env-packages + cp -r ${desktopItem}/share/applications/ $out/share/ + ''; + + meta = { + inherit description; + homepage = "http://software.schmorp.de/pkg/rxvt-unicode.html"; + downloadPage = "http://dist.schmorp.de/rxvt-unicode/Attic/"; + maintainers = with maintainers; [ rnhmjoj ]; + platforms = platforms.unix; + license = licenses.gpl3; + }; +} diff --git a/pkgs/applications/misc/rxvt-unicode/patches/256-color-resources.patch b/pkgs/applications/misc/rxvt-unicode/patches/256-color-resources.patch new file mode 100644 index 000000000000..c8d2acfbdc51 --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode/patches/256-color-resources.patch @@ -0,0 +1,255 @@ +diff --git a/src/xdefaults.C b/src/xdefaults.C +index 23b6822..382f3b1 100644 +--- a/src/xdefaults.C ++++ b/src/xdefaults.C +@@ -155,6 +155,250 @@ optList[] = { + RSTRG (Rs_color + minCOLOR + 5, "color5", "color"), + RSTRG (Rs_color + minCOLOR + 6, "color6", "color"), + RSTRG (Rs_color + minCOLOR + 7, "color7", "color"), ++ // 88 xterm colors ++ RSTRG (Rs_color + minCOLOR + 16, "color16", "color"), ++ RSTRG (Rs_color + minCOLOR + 17, "color17", "color"), ++ RSTRG (Rs_color + minCOLOR + 18, "color18", "color"), ++ RSTRG (Rs_color + minCOLOR + 19, "color19", "color"), ++ RSTRG (Rs_color + minCOLOR + 20, "color20", "color"), ++ RSTRG (Rs_color + minCOLOR + 21, "color21", "color"), ++ RSTRG (Rs_color + minCOLOR + 22, "color22", "color"), ++ RSTRG (Rs_color + minCOLOR + 23, "color23", "color"), ++ RSTRG (Rs_color + minCOLOR + 24, "color24", "color"), ++ RSTRG (Rs_color + minCOLOR + 25, "color25", "color"), ++ RSTRG (Rs_color + minCOLOR + 26, "color26", "color"), ++ RSTRG (Rs_color + minCOLOR + 27, "color27", "color"), ++ RSTRG (Rs_color + minCOLOR + 28, "color28", "color"), ++ RSTRG (Rs_color + minCOLOR + 29, "color29", "color"), ++ RSTRG (Rs_color + minCOLOR + 30, "color30", "color"), ++ RSTRG (Rs_color + minCOLOR + 31, "color31", "color"), ++ RSTRG (Rs_color + minCOLOR + 32, "color32", "color"), ++ RSTRG (Rs_color + minCOLOR + 33, "color33", "color"), ++ RSTRG (Rs_color + minCOLOR + 34, "color34", "color"), ++ RSTRG (Rs_color + minCOLOR + 35, "color35", "color"), ++ RSTRG (Rs_color + minCOLOR + 36, "color36", "color"), ++ RSTRG (Rs_color + minCOLOR + 37, "color37", "color"), ++ RSTRG (Rs_color + minCOLOR + 38, "color38", "color"), ++ RSTRG (Rs_color + minCOLOR + 39, "color39", "color"), ++ RSTRG (Rs_color + minCOLOR + 40, "color40", "color"), ++ RSTRG (Rs_color + minCOLOR + 41, "color41", "color"), ++ RSTRG (Rs_color + minCOLOR + 42, "color42", "color"), ++ RSTRG (Rs_color + minCOLOR + 43, "color43", "color"), ++ RSTRG (Rs_color + minCOLOR + 44, "color44", "color"), ++ RSTRG (Rs_color + minCOLOR + 45, "color45", "color"), ++ RSTRG (Rs_color + minCOLOR + 46, "color46", "color"), ++ RSTRG (Rs_color + minCOLOR + 47, "color47", "color"), ++ RSTRG (Rs_color + minCOLOR + 48, "color48", "color"), ++ RSTRG (Rs_color + minCOLOR + 49, "color49", "color"), ++ RSTRG (Rs_color + minCOLOR + 50, "color50", "color"), ++ RSTRG (Rs_color + minCOLOR + 51, "color51", "color"), ++ RSTRG (Rs_color + minCOLOR + 52, "color52", "color"), ++ RSTRG (Rs_color + minCOLOR + 53, "color53", "color"), ++ RSTRG (Rs_color + minCOLOR + 54, "color54", "color"), ++ RSTRG (Rs_color + minCOLOR + 55, "color55", "color"), ++ RSTRG (Rs_color + minCOLOR + 56, "color56", "color"), ++ RSTRG (Rs_color + minCOLOR + 57, "color57", "color"), ++ RSTRG (Rs_color + minCOLOR + 58, "color58", "color"), ++ RSTRG (Rs_color + minCOLOR + 59, "color59", "color"), ++ RSTRG (Rs_color + minCOLOR + 60, "color60", "color"), ++ RSTRG (Rs_color + minCOLOR + 61, "color61", "color"), ++ RSTRG (Rs_color + minCOLOR + 62, "color62", "color"), ++ RSTRG (Rs_color + minCOLOR + 63, "color63", "color"), ++ RSTRG (Rs_color + minCOLOR + 64, "color64", "color"), ++ RSTRG (Rs_color + minCOLOR + 65, "color65", "color"), ++ RSTRG (Rs_color + minCOLOR + 66, "color66", "color"), ++ RSTRG (Rs_color + minCOLOR + 67, "color67", "color"), ++ RSTRG (Rs_color + minCOLOR + 68, "color68", "color"), ++ RSTRG (Rs_color + minCOLOR + 69, "color69", "color"), ++ RSTRG (Rs_color + minCOLOR + 70, "color70", "color"), ++ RSTRG (Rs_color + minCOLOR + 71, "color71", "color"), ++ RSTRG (Rs_color + minCOLOR + 72, "color72", "color"), ++ RSTRG (Rs_color + minCOLOR + 73, "color73", "color"), ++ RSTRG (Rs_color + minCOLOR + 74, "color74", "color"), ++ RSTRG (Rs_color + minCOLOR + 75, "color75", "color"), ++ RSTRG (Rs_color + minCOLOR + 76, "color76", "color"), ++ RSTRG (Rs_color + minCOLOR + 77, "color77", "color"), ++ RSTRG (Rs_color + minCOLOR + 78, "color78", "color"), ++ RSTRG (Rs_color + minCOLOR + 79, "color79", "color"), ++ RSTRG (Rs_color + minCOLOR + 80, "color80", "color"), ++ RSTRG (Rs_color + minCOLOR + 81, "color81", "color"), ++ RSTRG (Rs_color + minCOLOR + 82, "color82", "color"), ++ RSTRG (Rs_color + minCOLOR + 83, "color83", "color"), ++ RSTRG (Rs_color + minCOLOR + 84, "color84", "color"), ++ RSTRG (Rs_color + minCOLOR + 85, "color85", "color"), ++ RSTRG (Rs_color + minCOLOR + 86, "color86", "color"), ++ RSTRG (Rs_color + minCOLOR + 87, "color87", "color"), ++#if USE_256_COLORS ++ // 256 xterm colors ++ RSTRG (Rs_color + minCOLOR + 88, "color88", "color"), ++ RSTRG (Rs_color + minCOLOR + 89, "color89", "color"), ++ RSTRG (Rs_color + minCOLOR + 90, "color90", "color"), ++ RSTRG (Rs_color + minCOLOR + 91, "color91", "color"), ++ RSTRG (Rs_color + minCOLOR + 92, "color92", "color"), ++ RSTRG (Rs_color + minCOLOR + 93, "color93", "color"), ++ RSTRG (Rs_color + minCOLOR + 94, "color94", "color"), ++ RSTRG (Rs_color + minCOLOR + 95, "color95", "color"), ++ RSTRG (Rs_color + minCOLOR + 96, "color96", "color"), ++ RSTRG (Rs_color + minCOLOR + 97, "color97", "color"), ++ RSTRG (Rs_color + minCOLOR + 98, "color98", "color"), ++ RSTRG (Rs_color + minCOLOR + 99, "color99", "color"), ++ RSTRG (Rs_color + minCOLOR + 100, "color100", "color"), ++ RSTRG (Rs_color + minCOLOR + 101, "color101", "color"), ++ RSTRG (Rs_color + minCOLOR + 102, "color102", "color"), ++ RSTRG (Rs_color + minCOLOR + 103, "color103", "color"), ++ RSTRG (Rs_color + minCOLOR + 104, "color104", "color"), ++ RSTRG (Rs_color + minCOLOR + 105, "color105", "color"), ++ RSTRG (Rs_color + minCOLOR + 106, "color106", "color"), ++ RSTRG (Rs_color + minCOLOR + 107, "color107", "color"), ++ RSTRG (Rs_color + minCOLOR + 108, "color108", "color"), ++ RSTRG (Rs_color + minCOLOR + 109, "color109", "color"), ++ RSTRG (Rs_color + minCOLOR + 110, "color110", "color"), ++ RSTRG (Rs_color + minCOLOR + 111, "color111", "color"), ++ RSTRG (Rs_color + minCOLOR + 112, "color112", "color"), ++ RSTRG (Rs_color + minCOLOR + 113, "color113", "color"), ++ RSTRG (Rs_color + minCOLOR + 114, "color114", "color"), ++ RSTRG (Rs_color + minCOLOR + 115, "color115", "color"), ++ RSTRG (Rs_color + minCOLOR + 116, "color116", "color"), ++ RSTRG (Rs_color + minCOLOR + 117, "color117", "color"), ++ RSTRG (Rs_color + minCOLOR + 118, "color118", "color"), ++ RSTRG (Rs_color + minCOLOR + 119, "color119", "color"), ++ RSTRG (Rs_color + minCOLOR + 120, "color120", "color"), ++ RSTRG (Rs_color + minCOLOR + 121, "color121", "color"), ++ RSTRG (Rs_color + minCOLOR + 122, "color122", "color"), ++ RSTRG (Rs_color + minCOLOR + 123, "color123", "color"), ++ RSTRG (Rs_color + minCOLOR + 124, "color124", "color"), ++ RSTRG (Rs_color + minCOLOR + 125, "color125", "color"), ++ RSTRG (Rs_color + minCOLOR + 126, "color126", "color"), ++ RSTRG (Rs_color + minCOLOR + 127, "color127", "color"), ++ RSTRG (Rs_color + minCOLOR + 128, "color128", "color"), ++ RSTRG (Rs_color + minCOLOR + 129, "color129", "color"), ++ RSTRG (Rs_color + minCOLOR + 130, "color130", "color"), ++ RSTRG (Rs_color + minCOLOR + 131, "color131", "color"), ++ RSTRG (Rs_color + minCOLOR + 132, "color132", "color"), ++ RSTRG (Rs_color + minCOLOR + 133, "color133", "color"), ++ RSTRG (Rs_color + minCOLOR + 134, "color134", "color"), ++ RSTRG (Rs_color + minCOLOR + 135, "color135", "color"), ++ RSTRG (Rs_color + minCOLOR + 136, "color136", "color"), ++ RSTRG (Rs_color + minCOLOR + 137, "color137", "color"), ++ RSTRG (Rs_color + minCOLOR + 138, "color138", "color"), ++ RSTRG (Rs_color + minCOLOR + 139, "color139", "color"), ++ RSTRG (Rs_color + minCOLOR + 140, "color140", "color"), ++ RSTRG (Rs_color + minCOLOR + 141, "color141", "color"), ++ RSTRG (Rs_color + minCOLOR + 142, "color142", "color"), ++ RSTRG (Rs_color + minCOLOR + 143, "color143", "color"), ++ RSTRG (Rs_color + minCOLOR + 144, "color144", "color"), ++ RSTRG (Rs_color + minCOLOR + 145, "color145", "color"), ++ RSTRG (Rs_color + minCOLOR + 146, "color146", "color"), ++ RSTRG (Rs_color + minCOLOR + 147, "color147", "color"), ++ RSTRG (Rs_color + minCOLOR + 148, "color148", "color"), ++ RSTRG (Rs_color + minCOLOR + 149, "color149", "color"), ++ RSTRG (Rs_color + minCOLOR + 150, "color150", "color"), ++ RSTRG (Rs_color + minCOLOR + 151, "color151", "color"), ++ RSTRG (Rs_color + minCOLOR + 152, "color152", "color"), ++ RSTRG (Rs_color + minCOLOR + 153, "color153", "color"), ++ RSTRG (Rs_color + minCOLOR + 154, "color154", "color"), ++ RSTRG (Rs_color + minCOLOR + 155, "color155", "color"), ++ RSTRG (Rs_color + minCOLOR + 156, "color156", "color"), ++ RSTRG (Rs_color + minCOLOR + 157, "color157", "color"), ++ RSTRG (Rs_color + minCOLOR + 158, "color158", "color"), ++ RSTRG (Rs_color + minCOLOR + 159, "color159", "color"), ++ RSTRG (Rs_color + minCOLOR + 160, "color160", "color"), ++ RSTRG (Rs_color + minCOLOR + 161, "color161", "color"), ++ RSTRG (Rs_color + minCOLOR + 162, "color162", "color"), ++ RSTRG (Rs_color + minCOLOR + 163, "color163", "color"), ++ RSTRG (Rs_color + minCOLOR + 164, "color164", "color"), ++ RSTRG (Rs_color + minCOLOR + 165, "color165", "color"), ++ RSTRG (Rs_color + minCOLOR + 166, "color166", "color"), ++ RSTRG (Rs_color + minCOLOR + 167, "color167", "color"), ++ RSTRG (Rs_color + minCOLOR + 168, "color168", "color"), ++ RSTRG (Rs_color + minCOLOR + 169, "color169", "color"), ++ RSTRG (Rs_color + minCOLOR + 170, "color170", "color"), ++ RSTRG (Rs_color + minCOLOR + 171, "color171", "color"), ++ RSTRG (Rs_color + minCOLOR + 172, "color172", "color"), ++ RSTRG (Rs_color + minCOLOR + 173, "color173", "color"), ++ RSTRG (Rs_color + minCOLOR + 174, "color174", "color"), ++ RSTRG (Rs_color + minCOLOR + 175, "color175", "color"), ++ RSTRG (Rs_color + minCOLOR + 176, "color176", "color"), ++ RSTRG (Rs_color + minCOLOR + 177, "color177", "color"), ++ RSTRG (Rs_color + minCOLOR + 178, "color178", "color"), ++ RSTRG (Rs_color + minCOLOR + 179, "color179", "color"), ++ RSTRG (Rs_color + minCOLOR + 180, "color180", "color"), ++ RSTRG (Rs_color + minCOLOR + 181, "color181", "color"), ++ RSTRG (Rs_color + minCOLOR + 182, "color182", "color"), ++ RSTRG (Rs_color + minCOLOR + 183, "color183", "color"), ++ RSTRG (Rs_color + minCOLOR + 184, "color184", "color"), ++ RSTRG (Rs_color + minCOLOR + 185, "color185", "color"), ++ RSTRG (Rs_color + minCOLOR + 186, "color186", "color"), ++ RSTRG (Rs_color + minCOLOR + 187, "color187", "color"), ++ RSTRG (Rs_color + minCOLOR + 188, "color188", "color"), ++ RSTRG (Rs_color + minCOLOR + 189, "color189", "color"), ++ RSTRG (Rs_color + minCOLOR + 190, "color190", "color"), ++ RSTRG (Rs_color + minCOLOR + 191, "color191", "color"), ++ RSTRG (Rs_color + minCOLOR + 192, "color192", "color"), ++ RSTRG (Rs_color + minCOLOR + 193, "color193", "color"), ++ RSTRG (Rs_color + minCOLOR + 194, "color194", "color"), ++ RSTRG (Rs_color + minCOLOR + 195, "color195", "color"), ++ RSTRG (Rs_color + minCOLOR + 196, "color196", "color"), ++ RSTRG (Rs_color + minCOLOR + 197, "color197", "color"), ++ RSTRG (Rs_color + minCOLOR + 198, "color198", "color"), ++ RSTRG (Rs_color + minCOLOR + 199, "color199", "color"), ++ RSTRG (Rs_color + minCOLOR + 200, "color200", "color"), ++ RSTRG (Rs_color + minCOLOR + 201, "color201", "color"), ++ RSTRG (Rs_color + minCOLOR + 202, "color202", "color"), ++ RSTRG (Rs_color + minCOLOR + 203, "color203", "color"), ++ RSTRG (Rs_color + minCOLOR + 204, "color204", "color"), ++ RSTRG (Rs_color + minCOLOR + 205, "color205", "color"), ++ RSTRG (Rs_color + minCOLOR + 206, "color206", "color"), ++ RSTRG (Rs_color + minCOLOR + 207, "color207", "color"), ++ RSTRG (Rs_color + minCOLOR + 208, "color208", "color"), ++ RSTRG (Rs_color + minCOLOR + 209, "color209", "color"), ++ RSTRG (Rs_color + minCOLOR + 210, "color210", "color"), ++ RSTRG (Rs_color + minCOLOR + 211, "color211", "color"), ++ RSTRG (Rs_color + minCOLOR + 212, "color212", "color"), ++ RSTRG (Rs_color + minCOLOR + 213, "color213", "color"), ++ RSTRG (Rs_color + minCOLOR + 214, "color214", "color"), ++ RSTRG (Rs_color + minCOLOR + 215, "color215", "color"), ++ RSTRG (Rs_color + minCOLOR + 216, "color216", "color"), ++ RSTRG (Rs_color + minCOLOR + 217, "color217", "color"), ++ RSTRG (Rs_color + minCOLOR + 218, "color218", "color"), ++ RSTRG (Rs_color + minCOLOR + 219, "color219", "color"), ++ RSTRG (Rs_color + minCOLOR + 220, "color220", "color"), ++ RSTRG (Rs_color + minCOLOR + 221, "color221", "color"), ++ RSTRG (Rs_color + minCOLOR + 222, "color222", "color"), ++ RSTRG (Rs_color + minCOLOR + 223, "color223", "color"), ++ RSTRG (Rs_color + minCOLOR + 224, "color224", "color"), ++ RSTRG (Rs_color + minCOLOR + 225, "color225", "color"), ++ RSTRG (Rs_color + minCOLOR + 226, "color226", "color"), ++ RSTRG (Rs_color + minCOLOR + 227, "color227", "color"), ++ RSTRG (Rs_color + minCOLOR + 228, "color228", "color"), ++ RSTRG (Rs_color + minCOLOR + 229, "color229", "color"), ++ RSTRG (Rs_color + minCOLOR + 230, "color230", "color"), ++ RSTRG (Rs_color + minCOLOR + 231, "color231", "color"), ++ RSTRG (Rs_color + minCOLOR + 232, "color232", "color"), ++ RSTRG (Rs_color + minCOLOR + 233, "color233", "color"), ++ RSTRG (Rs_color + minCOLOR + 234, "color234", "color"), ++ RSTRG (Rs_color + minCOLOR + 235, "color235", "color"), ++ RSTRG (Rs_color + minCOLOR + 236, "color236", "color"), ++ RSTRG (Rs_color + minCOLOR + 237, "color237", "color"), ++ RSTRG (Rs_color + minCOLOR + 238, "color238", "color"), ++ RSTRG (Rs_color + minCOLOR + 239, "color239", "color"), ++ RSTRG (Rs_color + minCOLOR + 240, "color240", "color"), ++ RSTRG (Rs_color + minCOLOR + 241, "color241", "color"), ++ RSTRG (Rs_color + minCOLOR + 242, "color242", "color"), ++ RSTRG (Rs_color + minCOLOR + 243, "color243", "color"), ++ RSTRG (Rs_color + minCOLOR + 244, "color244", "color"), ++ RSTRG (Rs_color + minCOLOR + 245, "color245", "color"), ++ RSTRG (Rs_color + minCOLOR + 246, "color246", "color"), ++ RSTRG (Rs_color + minCOLOR + 247, "color247", "color"), ++ RSTRG (Rs_color + minCOLOR + 248, "color248", "color"), ++ RSTRG (Rs_color + minCOLOR + 249, "color249", "color"), ++ RSTRG (Rs_color + minCOLOR + 250, "color250", "color"), ++ RSTRG (Rs_color + minCOLOR + 251, "color251", "color"), ++ RSTRG (Rs_color + minCOLOR + 252, "color252", "color"), ++ RSTRG (Rs_color + minCOLOR + 253, "color253", "color"), ++ RSTRG (Rs_color + minCOLOR + 254, "color254", "color"), ++ RSTRG (Rs_color + minCOLOR + 255, "color255", "color"), ++#endif + RSTRG (Rs_color + minBrightCOLOR + 0, "color8", "color"), + RSTRG (Rs_color + minBrightCOLOR + 1, "color9", "color"), + RSTRG (Rs_color + minBrightCOLOR + 2, "color10", "color"), diff --git a/pkgs/applications/misc/rxvt-unicode/patches/9.06-font-width.patch b/pkgs/applications/misc/rxvt-unicode/patches/9.06-font-width.patch new file mode 100644 index 000000000000..636083218fa5 --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode/patches/9.06-font-width.patch @@ -0,0 +1,21 @@ +--- a/src/rxvtfont.C 2008-07-09 12:21:45.000000000 +0400 ++++ b/src/rxvtfont.C 2009-10-30 14:32:53.000000000 +0300 +@@ -1195,12 +1195,14 @@ + XGlyphInfo g; + XftTextExtents16 (disp, f, &ch, 1, &g); + +- g.width -= g.x; +- ++/* ++ * bukind: don't use g.width as a width of a character! ++ * instead use g.xOff, see e.g.: http://keithp.com/~keithp/render/Xft.tutorial ++ */ + int wcw = WCWIDTH (ch); +- if (wcw > 0) g.width = (g.width + wcw - 1) / wcw; ++ if (wcw > 1) g.xOff = g.xOff / wcw; ++ if (width < g.xOff) width = g.xOff; + +- if (width < g.width ) width = g.width; + if (height < g.height ) height = g.height; + if (glheight < g.height - g.y) glheight = g.height - g.y; + } \ No newline at end of file diff --git a/pkgs/applications/misc/rxvt-unicode/patches/makefile-phony.patch b/pkgs/applications/misc/rxvt-unicode/patches/makefile-phony.patch new file mode 100644 index 000000000000..5e42e17c156a --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode/patches/makefile-phony.patch @@ -0,0 +1,10 @@ +--- a/Makefile.in 2015-01-13 08:52:30.000000000 +0100 ++++ b/Makefile.in 2015-01-13 08:52:58.000000000 +0100 +@@ -30,6 +30,7 @@ + subdirs = src doc + + RECURSIVE_TARGETS = all allbin alldoc tags clean distclean realclean install ++.PHONY: $(RECURSIVE_TARGETS) + + #------------------------------------------------------------------------- + diff --git a/pkgs/applications/misc/rxvt_unicode/default.nix b/pkgs/applications/misc/rxvt_unicode/default.nix deleted file mode 100644 index 7c239a9b7543..000000000000 --- a/pkgs/applications/misc/rxvt_unicode/default.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ stdenv, fetchurl, makeDesktopItem, perlSupport ? true, libX11, libXt, libXft, - ncurses, perl, fontconfig, freetype, pkgconfig, libXrender, - gdkPixbufSupport ? true, gdk-pixbuf, unicode3Support ? true }: - -let - pname = "rxvt-unicode"; - version = "9.22"; - 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;"; - }; -in - -stdenv.mkDerivation ({ - - name = "${pname}${if perlSupport then "-with-perl" else ""}${if unicode3Support then "-with-unicode3" else ""}-${version}"; - - src = fetchurl { - url = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${version}.tar.bz2"; - sha256 = "1pddjn5ynblwfrdmskylrsxb9vfnk3w4jdnq2l8xn2pspkljhip9"; - }; - - buildInputs = - [ libX11 libXt libXft ncurses /* required to build the terminfo file */ - fontconfig freetype pkgconfig libXrender ] - ++ stdenv.lib.optional perlSupport perl - ++ stdenv.lib.optional gdkPixbufSupport gdk-pixbuf; - - outputs = [ "out" "terminfo" ]; - - patches = [ - ./rxvt-unicode-9.06-font-width.patch - ./rxvt-unicode-256-color-resources.patch - ] - ++ stdenv.lib.optional stdenv.isDarwin ./rxvt-unicode-makefile-phony.patch; - - preConfigure = - '' - mkdir -p $terminfo/share/terminfo - 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"}"; - export TERMINFO=$terminfo/share/terminfo # without this the terminfo won't be compiled by tic, see man tic - NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype.dev}/include/freetype2" - NIX_LDFLAGS="$NIX_LDFLAGS -lfontconfig -lXrender -lpthread " - '' - # make urxvt find its perl file lib/perl5/site_perl is added to PERL5LIB automatically - + stdenv.lib.optionalString perlSupport '' - mkdir -p $out/$(dirname ${perl.libPrefix}) - ln -s $out/lib/urxvt $out/${perl.libPrefix} - ''; - - postInstall = '' - mkdir -p $out/nix-support - echo "$terminfo" >> $out/nix-support/propagated-user-env-packages - cp -r ${desktopItem}/share/applications/ $out/share/ - ''; - - meta = with stdenv.lib; { - inherit description; - homepage = http://software.schmorp.de/pkg/rxvt-unicode.html; - downloadPage = "http://dist.schmorp.de/rxvt-unicode/Attic/"; - maintainers = with maintainers; [ rnhmjoj ]; - platforms = platforms.unix; - license = licenses.gpl3; - }; -}) diff --git a/pkgs/applications/misc/rxvt_unicode/rxvt-unicode-256-color-resources.patch b/pkgs/applications/misc/rxvt_unicode/rxvt-unicode-256-color-resources.patch deleted file mode 100644 index c8d2acfbdc51..000000000000 --- a/pkgs/applications/misc/rxvt_unicode/rxvt-unicode-256-color-resources.patch +++ /dev/null @@ -1,255 +0,0 @@ -diff --git a/src/xdefaults.C b/src/xdefaults.C -index 23b6822..382f3b1 100644 ---- a/src/xdefaults.C -+++ b/src/xdefaults.C -@@ -155,6 +155,250 @@ optList[] = { - RSTRG (Rs_color + minCOLOR + 5, "color5", "color"), - RSTRG (Rs_color + minCOLOR + 6, "color6", "color"), - RSTRG (Rs_color + minCOLOR + 7, "color7", "color"), -+ // 88 xterm colors -+ RSTRG (Rs_color + minCOLOR + 16, "color16", "color"), -+ RSTRG (Rs_color + minCOLOR + 17, "color17", "color"), -+ RSTRG (Rs_color + minCOLOR + 18, "color18", "color"), -+ RSTRG (Rs_color + minCOLOR + 19, "color19", "color"), -+ RSTRG (Rs_color + minCOLOR + 20, "color20", "color"), -+ RSTRG (Rs_color + minCOLOR + 21, "color21", "color"), -+ RSTRG (Rs_color + minCOLOR + 22, "color22", "color"), -+ RSTRG (Rs_color + minCOLOR + 23, "color23", "color"), -+ RSTRG (Rs_color + minCOLOR + 24, "color24", "color"), -+ RSTRG (Rs_color + minCOLOR + 25, "color25", "color"), -+ RSTRG (Rs_color + minCOLOR + 26, "color26", "color"), -+ RSTRG (Rs_color + minCOLOR + 27, "color27", "color"), -+ RSTRG (Rs_color + minCOLOR + 28, "color28", "color"), -+ RSTRG (Rs_color + minCOLOR + 29, "color29", "color"), -+ RSTRG (Rs_color + minCOLOR + 30, "color30", "color"), -+ RSTRG (Rs_color + minCOLOR + 31, "color31", "color"), -+ RSTRG (Rs_color + minCOLOR + 32, "color32", "color"), -+ RSTRG (Rs_color + minCOLOR + 33, "color33", "color"), -+ RSTRG (Rs_color + minCOLOR + 34, "color34", "color"), -+ RSTRG (Rs_color + minCOLOR + 35, "color35", "color"), -+ RSTRG (Rs_color + minCOLOR + 36, "color36", "color"), -+ RSTRG (Rs_color + minCOLOR + 37, "color37", "color"), -+ RSTRG (Rs_color + minCOLOR + 38, "color38", "color"), -+ RSTRG (Rs_color + minCOLOR + 39, "color39", "color"), -+ RSTRG (Rs_color + minCOLOR + 40, "color40", "color"), -+ RSTRG (Rs_color + minCOLOR + 41, "color41", "color"), -+ RSTRG (Rs_color + minCOLOR + 42, "color42", "color"), -+ RSTRG (Rs_color + minCOLOR + 43, "color43", "color"), -+ RSTRG (Rs_color + minCOLOR + 44, "color44", "color"), -+ RSTRG (Rs_color + minCOLOR + 45, "color45", "color"), -+ RSTRG (Rs_color + minCOLOR + 46, "color46", "color"), -+ RSTRG (Rs_color + minCOLOR + 47, "color47", "color"), -+ RSTRG (Rs_color + minCOLOR + 48, "color48", "color"), -+ RSTRG (Rs_color + minCOLOR + 49, "color49", "color"), -+ RSTRG (Rs_color + minCOLOR + 50, "color50", "color"), -+ RSTRG (Rs_color + minCOLOR + 51, "color51", "color"), -+ RSTRG (Rs_color + minCOLOR + 52, "color52", "color"), -+ RSTRG (Rs_color + minCOLOR + 53, "color53", "color"), -+ RSTRG (Rs_color + minCOLOR + 54, "color54", "color"), -+ RSTRG (Rs_color + minCOLOR + 55, "color55", "color"), -+ RSTRG (Rs_color + minCOLOR + 56, "color56", "color"), -+ RSTRG (Rs_color + minCOLOR + 57, "color57", "color"), -+ RSTRG (Rs_color + minCOLOR + 58, "color58", "color"), -+ RSTRG (Rs_color + minCOLOR + 59, "color59", "color"), -+ RSTRG (Rs_color + minCOLOR + 60, "color60", "color"), -+ RSTRG (Rs_color + minCOLOR + 61, "color61", "color"), -+ RSTRG (Rs_color + minCOLOR + 62, "color62", "color"), -+ RSTRG (Rs_color + minCOLOR + 63, "color63", "color"), -+ RSTRG (Rs_color + minCOLOR + 64, "color64", "color"), -+ RSTRG (Rs_color + minCOLOR + 65, "color65", "color"), -+ RSTRG (Rs_color + minCOLOR + 66, "color66", "color"), -+ RSTRG (Rs_color + minCOLOR + 67, "color67", "color"), -+ RSTRG (Rs_color + minCOLOR + 68, "color68", "color"), -+ RSTRG (Rs_color + minCOLOR + 69, "color69", "color"), -+ RSTRG (Rs_color + minCOLOR + 70, "color70", "color"), -+ RSTRG (Rs_color + minCOLOR + 71, "color71", "color"), -+ RSTRG (Rs_color + minCOLOR + 72, "color72", "color"), -+ RSTRG (Rs_color + minCOLOR + 73, "color73", "color"), -+ RSTRG (Rs_color + minCOLOR + 74, "color74", "color"), -+ RSTRG (Rs_color + minCOLOR + 75, "color75", "color"), -+ RSTRG (Rs_color + minCOLOR + 76, "color76", "color"), -+ RSTRG (Rs_color + minCOLOR + 77, "color77", "color"), -+ RSTRG (Rs_color + minCOLOR + 78, "color78", "color"), -+ RSTRG (Rs_color + minCOLOR + 79, "color79", "color"), -+ RSTRG (Rs_color + minCOLOR + 80, "color80", "color"), -+ RSTRG (Rs_color + minCOLOR + 81, "color81", "color"), -+ RSTRG (Rs_color + minCOLOR + 82, "color82", "color"), -+ RSTRG (Rs_color + minCOLOR + 83, "color83", "color"), -+ RSTRG (Rs_color + minCOLOR + 84, "color84", "color"), -+ RSTRG (Rs_color + minCOLOR + 85, "color85", "color"), -+ RSTRG (Rs_color + minCOLOR + 86, "color86", "color"), -+ RSTRG (Rs_color + minCOLOR + 87, "color87", "color"), -+#if USE_256_COLORS -+ // 256 xterm colors -+ RSTRG (Rs_color + minCOLOR + 88, "color88", "color"), -+ RSTRG (Rs_color + minCOLOR + 89, "color89", "color"), -+ RSTRG (Rs_color + minCOLOR + 90, "color90", "color"), -+ RSTRG (Rs_color + minCOLOR + 91, "color91", "color"), -+ RSTRG (Rs_color + minCOLOR + 92, "color92", "color"), -+ RSTRG (Rs_color + minCOLOR + 93, "color93", "color"), -+ RSTRG (Rs_color + minCOLOR + 94, "color94", "color"), -+ RSTRG (Rs_color + minCOLOR + 95, "color95", "color"), -+ RSTRG (Rs_color + minCOLOR + 96, "color96", "color"), -+ RSTRG (Rs_color + minCOLOR + 97, "color97", "color"), -+ RSTRG (Rs_color + minCOLOR + 98, "color98", "color"), -+ RSTRG (Rs_color + minCOLOR + 99, "color99", "color"), -+ RSTRG (Rs_color + minCOLOR + 100, "color100", "color"), -+ RSTRG (Rs_color + minCOLOR + 101, "color101", "color"), -+ RSTRG (Rs_color + minCOLOR + 102, "color102", "color"), -+ RSTRG (Rs_color + minCOLOR + 103, "color103", "color"), -+ RSTRG (Rs_color + minCOLOR + 104, "color104", "color"), -+ RSTRG (Rs_color + minCOLOR + 105, "color105", "color"), -+ RSTRG (Rs_color + minCOLOR + 106, "color106", "color"), -+ RSTRG (Rs_color + minCOLOR + 107, "color107", "color"), -+ RSTRG (Rs_color + minCOLOR + 108, "color108", "color"), -+ RSTRG (Rs_color + minCOLOR + 109, "color109", "color"), -+ RSTRG (Rs_color + minCOLOR + 110, "color110", "color"), -+ RSTRG (Rs_color + minCOLOR + 111, "color111", "color"), -+ RSTRG (Rs_color + minCOLOR + 112, "color112", "color"), -+ RSTRG (Rs_color + minCOLOR + 113, "color113", "color"), -+ RSTRG (Rs_color + minCOLOR + 114, "color114", "color"), -+ RSTRG (Rs_color + minCOLOR + 115, "color115", "color"), -+ RSTRG (Rs_color + minCOLOR + 116, "color116", "color"), -+ RSTRG (Rs_color + minCOLOR + 117, "color117", "color"), -+ RSTRG (Rs_color + minCOLOR + 118, "color118", "color"), -+ RSTRG (Rs_color + minCOLOR + 119, "color119", "color"), -+ RSTRG (Rs_color + minCOLOR + 120, "color120", "color"), -+ RSTRG (Rs_color + minCOLOR + 121, "color121", "color"), -+ RSTRG (Rs_color + minCOLOR + 122, "color122", "color"), -+ RSTRG (Rs_color + minCOLOR + 123, "color123", "color"), -+ RSTRG (Rs_color + minCOLOR + 124, "color124", "color"), -+ RSTRG (Rs_color + minCOLOR + 125, "color125", "color"), -+ RSTRG (Rs_color + minCOLOR + 126, "color126", "color"), -+ RSTRG (Rs_color + minCOLOR + 127, "color127", "color"), -+ RSTRG (Rs_color + minCOLOR + 128, "color128", "color"), -+ RSTRG (Rs_color + minCOLOR + 129, "color129", "color"), -+ RSTRG (Rs_color + minCOLOR + 130, "color130", "color"), -+ RSTRG (Rs_color + minCOLOR + 131, "color131", "color"), -+ RSTRG (Rs_color + minCOLOR + 132, "color132", "color"), -+ RSTRG (Rs_color + minCOLOR + 133, "color133", "color"), -+ RSTRG (Rs_color + minCOLOR + 134, "color134", "color"), -+ RSTRG (Rs_color + minCOLOR + 135, "color135", "color"), -+ RSTRG (Rs_color + minCOLOR + 136, "color136", "color"), -+ RSTRG (Rs_color + minCOLOR + 137, "color137", "color"), -+ RSTRG (Rs_color + minCOLOR + 138, "color138", "color"), -+ RSTRG (Rs_color + minCOLOR + 139, "color139", "color"), -+ RSTRG (Rs_color + minCOLOR + 140, "color140", "color"), -+ RSTRG (Rs_color + minCOLOR + 141, "color141", "color"), -+ RSTRG (Rs_color + minCOLOR + 142, "color142", "color"), -+ RSTRG (Rs_color + minCOLOR + 143, "color143", "color"), -+ RSTRG (Rs_color + minCOLOR + 144, "color144", "color"), -+ RSTRG (Rs_color + minCOLOR + 145, "color145", "color"), -+ RSTRG (Rs_color + minCOLOR + 146, "color146", "color"), -+ RSTRG (Rs_color + minCOLOR + 147, "color147", "color"), -+ RSTRG (Rs_color + minCOLOR + 148, "color148", "color"), -+ RSTRG (Rs_color + minCOLOR + 149, "color149", "color"), -+ RSTRG (Rs_color + minCOLOR + 150, "color150", "color"), -+ RSTRG (Rs_color + minCOLOR + 151, "color151", "color"), -+ RSTRG (Rs_color + minCOLOR + 152, "color152", "color"), -+ RSTRG (Rs_color + minCOLOR + 153, "color153", "color"), -+ RSTRG (Rs_color + minCOLOR + 154, "color154", "color"), -+ RSTRG (Rs_color + minCOLOR + 155, "color155", "color"), -+ RSTRG (Rs_color + minCOLOR + 156, "color156", "color"), -+ RSTRG (Rs_color + minCOLOR + 157, "color157", "color"), -+ RSTRG (Rs_color + minCOLOR + 158, "color158", "color"), -+ RSTRG (Rs_color + minCOLOR + 159, "color159", "color"), -+ RSTRG (Rs_color + minCOLOR + 160, "color160", "color"), -+ RSTRG (Rs_color + minCOLOR + 161, "color161", "color"), -+ RSTRG (Rs_color + minCOLOR + 162, "color162", "color"), -+ RSTRG (Rs_color + minCOLOR + 163, "color163", "color"), -+ RSTRG (Rs_color + minCOLOR + 164, "color164", "color"), -+ RSTRG (Rs_color + minCOLOR + 165, "color165", "color"), -+ RSTRG (Rs_color + minCOLOR + 166, "color166", "color"), -+ RSTRG (Rs_color + minCOLOR + 167, "color167", "color"), -+ RSTRG (Rs_color + minCOLOR + 168, "color168", "color"), -+ RSTRG (Rs_color + minCOLOR + 169, "color169", "color"), -+ RSTRG (Rs_color + minCOLOR + 170, "color170", "color"), -+ RSTRG (Rs_color + minCOLOR + 171, "color171", "color"), -+ RSTRG (Rs_color + minCOLOR + 172, "color172", "color"), -+ RSTRG (Rs_color + minCOLOR + 173, "color173", "color"), -+ RSTRG (Rs_color + minCOLOR + 174, "color174", "color"), -+ RSTRG (Rs_color + minCOLOR + 175, "color175", "color"), -+ RSTRG (Rs_color + minCOLOR + 176, "color176", "color"), -+ RSTRG (Rs_color + minCOLOR + 177, "color177", "color"), -+ RSTRG (Rs_color + minCOLOR + 178, "color178", "color"), -+ RSTRG (Rs_color + minCOLOR + 179, "color179", "color"), -+ RSTRG (Rs_color + minCOLOR + 180, "color180", "color"), -+ RSTRG (Rs_color + minCOLOR + 181, "color181", "color"), -+ RSTRG (Rs_color + minCOLOR + 182, "color182", "color"), -+ RSTRG (Rs_color + minCOLOR + 183, "color183", "color"), -+ RSTRG (Rs_color + minCOLOR + 184, "color184", "color"), -+ RSTRG (Rs_color + minCOLOR + 185, "color185", "color"), -+ RSTRG (Rs_color + minCOLOR + 186, "color186", "color"), -+ RSTRG (Rs_color + minCOLOR + 187, "color187", "color"), -+ RSTRG (Rs_color + minCOLOR + 188, "color188", "color"), -+ RSTRG (Rs_color + minCOLOR + 189, "color189", "color"), -+ RSTRG (Rs_color + minCOLOR + 190, "color190", "color"), -+ RSTRG (Rs_color + minCOLOR + 191, "color191", "color"), -+ RSTRG (Rs_color + minCOLOR + 192, "color192", "color"), -+ RSTRG (Rs_color + minCOLOR + 193, "color193", "color"), -+ RSTRG (Rs_color + minCOLOR + 194, "color194", "color"), -+ RSTRG (Rs_color + minCOLOR + 195, "color195", "color"), -+ RSTRG (Rs_color + minCOLOR + 196, "color196", "color"), -+ RSTRG (Rs_color + minCOLOR + 197, "color197", "color"), -+ RSTRG (Rs_color + minCOLOR + 198, "color198", "color"), -+ RSTRG (Rs_color + minCOLOR + 199, "color199", "color"), -+ RSTRG (Rs_color + minCOLOR + 200, "color200", "color"), -+ RSTRG (Rs_color + minCOLOR + 201, "color201", "color"), -+ RSTRG (Rs_color + minCOLOR + 202, "color202", "color"), -+ RSTRG (Rs_color + minCOLOR + 203, "color203", "color"), -+ RSTRG (Rs_color + minCOLOR + 204, "color204", "color"), -+ RSTRG (Rs_color + minCOLOR + 205, "color205", "color"), -+ RSTRG (Rs_color + minCOLOR + 206, "color206", "color"), -+ RSTRG (Rs_color + minCOLOR + 207, "color207", "color"), -+ RSTRG (Rs_color + minCOLOR + 208, "color208", "color"), -+ RSTRG (Rs_color + minCOLOR + 209, "color209", "color"), -+ RSTRG (Rs_color + minCOLOR + 210, "color210", "color"), -+ RSTRG (Rs_color + minCOLOR + 211, "color211", "color"), -+ RSTRG (Rs_color + minCOLOR + 212, "color212", "color"), -+ RSTRG (Rs_color + minCOLOR + 213, "color213", "color"), -+ RSTRG (Rs_color + minCOLOR + 214, "color214", "color"), -+ RSTRG (Rs_color + minCOLOR + 215, "color215", "color"), -+ RSTRG (Rs_color + minCOLOR + 216, "color216", "color"), -+ RSTRG (Rs_color + minCOLOR + 217, "color217", "color"), -+ RSTRG (Rs_color + minCOLOR + 218, "color218", "color"), -+ RSTRG (Rs_color + minCOLOR + 219, "color219", "color"), -+ RSTRG (Rs_color + minCOLOR + 220, "color220", "color"), -+ RSTRG (Rs_color + minCOLOR + 221, "color221", "color"), -+ RSTRG (Rs_color + minCOLOR + 222, "color222", "color"), -+ RSTRG (Rs_color + minCOLOR + 223, "color223", "color"), -+ RSTRG (Rs_color + minCOLOR + 224, "color224", "color"), -+ RSTRG (Rs_color + minCOLOR + 225, "color225", "color"), -+ RSTRG (Rs_color + minCOLOR + 226, "color226", "color"), -+ RSTRG (Rs_color + minCOLOR + 227, "color227", "color"), -+ RSTRG (Rs_color + minCOLOR + 228, "color228", "color"), -+ RSTRG (Rs_color + minCOLOR + 229, "color229", "color"), -+ RSTRG (Rs_color + minCOLOR + 230, "color230", "color"), -+ RSTRG (Rs_color + minCOLOR + 231, "color231", "color"), -+ RSTRG (Rs_color + minCOLOR + 232, "color232", "color"), -+ RSTRG (Rs_color + minCOLOR + 233, "color233", "color"), -+ RSTRG (Rs_color + minCOLOR + 234, "color234", "color"), -+ RSTRG (Rs_color + minCOLOR + 235, "color235", "color"), -+ RSTRG (Rs_color + minCOLOR + 236, "color236", "color"), -+ RSTRG (Rs_color + minCOLOR + 237, "color237", "color"), -+ RSTRG (Rs_color + minCOLOR + 238, "color238", "color"), -+ RSTRG (Rs_color + minCOLOR + 239, "color239", "color"), -+ RSTRG (Rs_color + minCOLOR + 240, "color240", "color"), -+ RSTRG (Rs_color + minCOLOR + 241, "color241", "color"), -+ RSTRG (Rs_color + minCOLOR + 242, "color242", "color"), -+ RSTRG (Rs_color + minCOLOR + 243, "color243", "color"), -+ RSTRG (Rs_color + minCOLOR + 244, "color244", "color"), -+ RSTRG (Rs_color + minCOLOR + 245, "color245", "color"), -+ RSTRG (Rs_color + minCOLOR + 246, "color246", "color"), -+ RSTRG (Rs_color + minCOLOR + 247, "color247", "color"), -+ RSTRG (Rs_color + minCOLOR + 248, "color248", "color"), -+ RSTRG (Rs_color + minCOLOR + 249, "color249", "color"), -+ RSTRG (Rs_color + minCOLOR + 250, "color250", "color"), -+ RSTRG (Rs_color + minCOLOR + 251, "color251", "color"), -+ RSTRG (Rs_color + minCOLOR + 252, "color252", "color"), -+ RSTRG (Rs_color + minCOLOR + 253, "color253", "color"), -+ RSTRG (Rs_color + minCOLOR + 254, "color254", "color"), -+ RSTRG (Rs_color + minCOLOR + 255, "color255", "color"), -+#endif - RSTRG (Rs_color + minBrightCOLOR + 0, "color8", "color"), - RSTRG (Rs_color + minBrightCOLOR + 1, "color9", "color"), - RSTRG (Rs_color + minBrightCOLOR + 2, "color10", "color"), diff --git a/pkgs/applications/misc/rxvt_unicode/rxvt-unicode-9.06-font-width.patch b/pkgs/applications/misc/rxvt_unicode/rxvt-unicode-9.06-font-width.patch deleted file mode 100644 index 636083218fa5..000000000000 --- a/pkgs/applications/misc/rxvt_unicode/rxvt-unicode-9.06-font-width.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/src/rxvtfont.C 2008-07-09 12:21:45.000000000 +0400 -+++ b/src/rxvtfont.C 2009-10-30 14:32:53.000000000 +0300 -@@ -1195,12 +1195,14 @@ - XGlyphInfo g; - XftTextExtents16 (disp, f, &ch, 1, &g); - -- g.width -= g.x; -- -+/* -+ * bukind: don't use g.width as a width of a character! -+ * instead use g.xOff, see e.g.: http://keithp.com/~keithp/render/Xft.tutorial -+ */ - int wcw = WCWIDTH (ch); -- if (wcw > 0) g.width = (g.width + wcw - 1) / wcw; -+ if (wcw > 1) g.xOff = g.xOff / wcw; -+ if (width < g.xOff) width = g.xOff; - -- if (width < g.width ) width = g.width; - if (height < g.height ) height = g.height; - if (glheight < g.height - g.y) glheight = g.height - g.y; - } \ No newline at end of file diff --git a/pkgs/applications/misc/rxvt_unicode/rxvt-unicode-makefile-phony.patch b/pkgs/applications/misc/rxvt_unicode/rxvt-unicode-makefile-phony.patch deleted file mode 100644 index 5e42e17c156a..000000000000 --- a/pkgs/applications/misc/rxvt_unicode/rxvt-unicode-makefile-phony.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Makefile.in 2015-01-13 08:52:30.000000000 +0100 -+++ b/Makefile.in 2015-01-13 08:52:58.000000000 +0100 -@@ -30,6 +30,7 @@ - subdirs = src doc - - RECURSIVE_TARGETS = all allbin alldoc tags clean distclean realclean install -+.PHONY: $(RECURSIVE_TARGETS) - - #------------------------------------------------------------------------- - -- cgit 1.4.1 From 27b3df08400daa2c98564be99abfef46d0b1663a Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 8 Jan 2020 22:58:44 +0100 Subject: rxvt-unicode: rewrite plugin system --- .../misc/rxvt-unicode-plugins/default.nix | 20 ++++++++++ .../urxvt-autocomplete-all-the-things/default.nix | 27 +++++++++++++ .../rxvt-unicode-plugins/urxvt-bidi/default.nix | 27 +++++++++++++ .../urxvt-font-size/default.nix | 30 ++++++++++++++ .../rxvt-unicode-plugins/urxvt-perl/default.nix | 29 ++++++++++++++ .../rxvt-unicode-plugins/urxvt-perls/default.nix | 29 ++++++++++++++ .../urxvt-tabbedex/default.nix | 24 +++++++++++ .../urxvt-theme-switch/default.nix | 28 +++++++++++++ .../rxvt-unicode-plugins/urxvt-vtwheel/default.nix | 27 +++++++++++++ pkgs/applications/misc/rxvt-unicode/wrapper.nix | 46 ++++++++++++++++++++++ .../urxvt-autocomplete-all-the-things/default.nix | 27 ------------- .../rxvt_unicode-plugins/urxvt-bidi/default.nix | 25 ------------ .../urxvt-font-size/default.nix | 30 -------------- .../rxvt_unicode-plugins/urxvt-perl/default.nix | 29 -------------- .../rxvt_unicode-plugins/urxvt-perls/default.nix | 29 -------------- .../urxvt-tabbedex/default.nix | 24 ----------- .../urxvt-theme-switch/default.nix | 28 ------------- .../misc/rxvt_unicode-plugins/urxvt-vtwheel.nix | 27 ------------- pkgs/applications/misc/rxvt_unicode/wrapper.nix | 23 ----------- pkgs/top-level/all-packages.nix | 30 +------------- 20 files changed, 289 insertions(+), 270 deletions(-) create mode 100644 pkgs/applications/misc/rxvt-unicode-plugins/default.nix create mode 100644 pkgs/applications/misc/rxvt-unicode-plugins/urxvt-autocomplete-all-the-things/default.nix create mode 100644 pkgs/applications/misc/rxvt-unicode-plugins/urxvt-bidi/default.nix create mode 100644 pkgs/applications/misc/rxvt-unicode-plugins/urxvt-font-size/default.nix create mode 100644 pkgs/applications/misc/rxvt-unicode-plugins/urxvt-perl/default.nix create mode 100644 pkgs/applications/misc/rxvt-unicode-plugins/urxvt-perls/default.nix create mode 100644 pkgs/applications/misc/rxvt-unicode-plugins/urxvt-tabbedex/default.nix create mode 100644 pkgs/applications/misc/rxvt-unicode-plugins/urxvt-theme-switch/default.nix create mode 100644 pkgs/applications/misc/rxvt-unicode-plugins/urxvt-vtwheel/default.nix create mode 100644 pkgs/applications/misc/rxvt-unicode/wrapper.nix delete mode 100644 pkgs/applications/misc/rxvt_unicode-plugins/urxvt-autocomplete-all-the-things/default.nix delete mode 100644 pkgs/applications/misc/rxvt_unicode-plugins/urxvt-bidi/default.nix delete mode 100644 pkgs/applications/misc/rxvt_unicode-plugins/urxvt-font-size/default.nix delete mode 100644 pkgs/applications/misc/rxvt_unicode-plugins/urxvt-perl/default.nix delete mode 100644 pkgs/applications/misc/rxvt_unicode-plugins/urxvt-perls/default.nix delete mode 100644 pkgs/applications/misc/rxvt_unicode-plugins/urxvt-tabbedex/default.nix delete mode 100644 pkgs/applications/misc/rxvt_unicode-plugins/urxvt-theme-switch/default.nix delete mode 100644 pkgs/applications/misc/rxvt_unicode-plugins/urxvt-vtwheel.nix delete mode 100644 pkgs/applications/misc/rxvt_unicode/wrapper.nix (limited to 'pkgs') diff --git a/pkgs/applications/misc/rxvt-unicode-plugins/default.nix b/pkgs/applications/misc/rxvt-unicode-plugins/default.nix new file mode 100644 index 000000000000..b8a481fd1201 --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode-plugins/default.nix @@ -0,0 +1,20 @@ +{ callPackage }: + +{ + autocomplete-all-the-things = callPackage ./urxvt-autocomplete-all-the-things { }; + + bidi = callPackage ./urxvt-bidi { }; + + font-size = callPackage ./urxvt-font-size { }; + + perl = callPackage ./urxvt-perl { }; + + perls = callPackage ./urxvt-perls { }; + + tabbedex = callPackage ./urxvt-tabbedex { }; + + theme-switch = callPackage ./urxvt-theme-switch { }; + + vtwheel = callPackage ./urxvt-vtwheel { }; + +} diff --git a/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-autocomplete-all-the-things/default.nix b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-autocomplete-all-the-things/default.nix new file mode 100644 index 000000000000..a4e03fa347f0 --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-autocomplete-all-the-things/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "urxvt-autocomplete-all-the-things"; + version = "1.6.0"; + + src = fetchFromGitHub { + owner = "Vifon"; + repo = "autocomplete-ALL-the-things"; + rev = version; + sha256 = "06xd59c6gd9rglwq4km93n2p078k7v4x300lqrg1f32vvnjvs7sr"; + }; + + installPhase = '' + mkdir -p $out/lib/urxvt/perl + cp autocomplete-ALL-the-things $out/lib/urxvt/perl + ''; + + meta = with stdenv.lib; { + description = "urxvt plugin allowing user to easily complete arbitrary text"; + homepage = "https://github.com/Vifon/autocomplete-ALL-the-things"; + license = licenses.gpl3; + maintainers = with maintainers; [ nickhu ]; + platforms = with platforms; unix; + }; +} + diff --git a/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-bidi/default.nix b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-bidi/default.nix new file mode 100644 index 000000000000..4b6b4eb8184c --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-bidi/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchurl, perlPackages, pkgconfig, fribidi }: + +perlPackages.buildPerlPackage rec { + pname = "urxvt-bidi"; + version = "2.15"; + + src = fetchurl { + url = "mirror://cpan/authors/id/K/KA/KAMENSKY/Text-Bidi-${version}.tar.gz"; + sha256 = "1w65xbi4mw5acsrpv3phyzv82ghb29kpbb3b1b1gcinlfxl6f61m"; + }; + + nativeBuildInputs = [ pkgconfig perlPackages.ExtUtilsPkgConfig ]; + buildInputs = [ fribidi ]; + + postInstall = '' + install -Dm555 misc/bidi "$out/lib/urxvt/perl/bidi" + ''; + + passthru.perlPackages = [ "self" ]; + + meta = with lib; { + description = "Text::Bidi Perl package using fribidi, providing a urxvt plugin"; + homepage = "https://github.com/mkamensky/Text-Bidi"; + maintainers = with maintainers; [ doronbehar ]; + platforms = with platforms; unix; + }; +} diff --git a/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-font-size/default.nix b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-font-size/default.nix new file mode 100644 index 000000000000..4f4319af6cbd --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-font-size/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, xrdb, xlsfonts }: + +stdenv.mkDerivation { + name = "urxvt-font-size-2015-05-22"; + dontPatchShebangs = true; + + src = fetchFromGitHub { + owner = "majutsushi"; + repo = "urxvt-font-size"; + rev = "fd5b09c10798c6723bbf771d4d8881cf6563bc69"; + sha256 = "16m3kkypg3y00x597zx05zy167a0kaqpawz0l591wzb2bv1dz55z"; + }; + + installPhase = '' + substituteInPlace font-size \ + --replace "xrdb -merge" "${xrdb}/bin/xrdb -merge" \ + --replace "xlsfonts" "${xlsfonts}/bin/xlsfonts" + + mkdir -p $out/lib/urxvt/perl + cp font-size $out/lib/urxvt/perl + ''; + + meta = with stdenv.lib; { + description = "Change the urxvt font size on the fly"; + homepage = https://github.com/majutsushi/urxvt-font-size; + license = licenses.mit; + maintainers = with maintainers; [ cstrahan ]; + platforms = with platforms; unix; + }; +} diff --git a/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-perl/default.nix b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-perl/default.nix new file mode 100644 index 000000000000..13e005014f10 --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-perl/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, wmctrl }: + +stdenv.mkDerivation { + name = "urxvt-perl-2015-01-16"; + + src = fetchFromGitHub { + owner = "effigies"; + repo = "urxvt-perl"; + rev = "c3beb9ff09a7139591416c61f8e9458c8a23bea5"; + sha256 = "1w1p8ng7bwq5hnaprjl1zf073y5l3hdsj7sz7cll6isjswcm6r0s"; + }; + + installPhase = '' + substituteInPlace fullscreen \ + --replace "wmctrl" "${wmctrl}/bin/wmctrl" + + mkdir -p $out/lib/urxvt/perl + cp fullscreen $out/lib/urxvt/perl + cp newterm $out/lib/urxvt/perl + ''; + + meta = with stdenv.lib; { + description = "Perl extensions for the rxvt-unicode terminal emulator"; + homepage = https://github.com/effigies/urxvt-perl; + license = licenses.gpl3; + maintainers = with maintainers; [ cstrahan ]; + platforms = with platforms; unix; + }; +} diff --git a/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-perls/default.nix b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-perls/default.nix new file mode 100644 index 000000000000..b976388ae2c4 --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-perls/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "urxvt-perls"; + version = "2.2"; + + src = fetchFromGitHub { + owner = "muennich"; + repo = "urxvt-perls"; + rev = version; + sha256 = "1cb0jbjmwfy2dlq2ny8wpc04k79jp3pz9qhbmgagsxs3sp1jg2hz"; + }; + + installPhase = '' + mkdir -p $out/lib/urxvt/perl + cp clipboard \ + keyboard-select \ + url-select \ + $out/lib/urxvt/perl + ''; + + meta = with stdenv.lib; { + description = "Perl extensions for the rxvt-unicode terminal emulator"; + homepage = https://github.com/muennich/urxvt-perls; + license = licenses.gpl2; + maintainers = with maintainers; [ abbradar ]; + platforms = with platforms; unix; + }; +} diff --git a/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-tabbedex/default.nix b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-tabbedex/default.nix new file mode 100644 index 000000000000..2982c02cce9a --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-tabbedex/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, perl }: + +stdenv.mkDerivation rec { + pname = "urxvt-tabbedex"; + version = "19.21"; + + src = fetchFromGitHub { + owner = "mina86"; + repo = "urxvt-tabbedex"; + rev = "v${version}"; + sha256 = "06msd156h6r8ss7qg66sjz5jz8613qfq2yvp0pc24i6mxzj8vl77"; + }; + + nativeBuildInputs = [ perl ]; + + installFlags = [ "PREFIX=$(out)" ]; + + meta = with stdenv.lib; { + description = "Tabbed plugin for rxvt-unicode with many enhancements (mina86's fork)"; + homepage = https://github.com/mina86/urxvt-tabbedex; + maintainers = with maintainers; [ abbradar ]; + platforms = with platforms; unix; + }; +} diff --git a/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-theme-switch/default.nix b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-theme-switch/default.nix new file mode 100644 index 000000000000..ba8ec3a6e72a --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-theme-switch/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + rev = "cfcbcc3dd5a5b09a3fec0f6a1fea95f4a36a48c4"; + name = "urxvt-theme-switch-2014-12-21_rev${builtins.substring 0 1 rev}"; + dontPatchShebangs = true; + + src = fetchFromGitHub { + owner = "felixr"; + repo = "urxvt-theme-switch"; + inherit rev; + sha256 = "0x27m1vdqprn3lqpwgxvffill7prmaj6j9rhgvkvi13mzl5wmlli"; + }; + + installPhase = '' + mkdir -p $out/lib/urxvt/perl + sed -i -e "s|/usr/bin/env||" color-themes + cp color-themes $out/lib/urxvt/perl + ''; + + meta = with stdenv.lib; { + description = "urxvt plugin that allows to switch color themes during runtime"; + homepage = https://github.com/felixr/urxvt-theme-switch; + license = "CCBYNC"; + maintainers = with maintainers; [ ]; + platforms = with platforms; unix; + }; +} diff --git a/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-vtwheel/default.nix b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-vtwheel/default.nix new file mode 100644 index 000000000000..2f2c20558031 --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-vtwheel/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchgit, perl }: + +stdenv.mkDerivation { + + name = "rxvt_unicode-vtwheel-0.3.2"; + + src = fetchgit { + url = "https://aur.archlinux.org/urxvt-vtwheel.git"; + rev = "36d3e861664aeae36a45f96100f10f8fe2218035"; + sha256 = "1h3vrsbli5q9kr84j5ijbivlhpwlh3l8cv233pg362v2zz4ja8i7"; + }; + + installPhase = '' + sed -i 's|#! perl|#! ${perl}/bin/perl|g' vtwheel + mkdir -p $out/lib/urxvt/perl + cp vtwheel $out/lib/urxvt/perl + ''; + + meta = with stdenv.lib; { + description = "Pass mouse wheel commands to secondary screens (screen, less, nano, etc)"; + homepage = https://aur.archlinux.org/packages/urxvt-vtwheel; + license = licenses.mit; + maintainers = with maintainers; [ danbst ]; + platforms = with platforms; unix; + }; + +} \ No newline at end of file diff --git a/pkgs/applications/misc/rxvt-unicode/wrapper.nix b/pkgs/applications/misc/rxvt-unicode/wrapper.nix new file mode 100644 index 000000000000..8a833f234094 --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode/wrapper.nix @@ -0,0 +1,46 @@ +{ callPackage +, symlinkJoin +, makeWrapper +, lib +, rxvt-unicode-unwrapped +, perlPackages +}: + +let + availablePlugins = import ../rxvt-unicode-plugins { inherit callPackage; }; + + wrapper = + { configure ? { availablePlugins, ... }: + { plugins = builtins.attrValues availablePlugins; + extraDeps = [ ]; + perlDeps = [ ]; + } + }: + + let + config = configure { inherit availablePlugins; }; + plugins = config.plugins or (builtins.attrValues availablePlugins); + extraDeps = config.extraDeps or [ ]; + perlDeps = (config.perlDeps or [ ]) ++ lib.concatMap (p: p.perlPackages or [ ]) plugins; + in + symlinkJoin { + name = "rxvt-unicode-${rxvt-unicode-unwrapped.version}"; + + paths = [ rxvt-unicode-unwrapped ] ++ plugins ++ extraDeps; + + buildInputs = [ makeWrapper ]; + + postBuild = '' + wrapProgram $out/bin/urxvt \ + --prefix PERL5LIB : "${perlPackages.makePerlPath perlDeps}" \ + --suffix-each URXVT_PERL_LIB ':' "$out/lib/urxvt/perl" + wrapProgram $out/bin/urxvtd \ + --prefix PERL5LIB : "${perlPackages.makePerlPath perlDeps}" \ + --suffix-each URXVT_PERL_LIB ':' "$out/lib/urxvt/perl" + ''; + + passthru.plugins = plugins; + }; + +in + lib.makeOverridable wrapper { } diff --git a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-autocomplete-all-the-things/default.nix b/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-autocomplete-all-the-things/default.nix deleted file mode 100644 index a4e03fa347f0..000000000000 --- a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-autocomplete-all-the-things/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ stdenv, fetchFromGitHub }: - -stdenv.mkDerivation rec { - pname = "urxvt-autocomplete-all-the-things"; - version = "1.6.0"; - - src = fetchFromGitHub { - owner = "Vifon"; - repo = "autocomplete-ALL-the-things"; - rev = version; - sha256 = "06xd59c6gd9rglwq4km93n2p078k7v4x300lqrg1f32vvnjvs7sr"; - }; - - installPhase = '' - mkdir -p $out/lib/urxvt/perl - cp autocomplete-ALL-the-things $out/lib/urxvt/perl - ''; - - meta = with stdenv.lib; { - description = "urxvt plugin allowing user to easily complete arbitrary text"; - homepage = "https://github.com/Vifon/autocomplete-ALL-the-things"; - license = licenses.gpl3; - maintainers = with maintainers; [ nickhu ]; - platforms = with platforms; unix; - }; -} - diff --git a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-bidi/default.nix b/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-bidi/default.nix deleted file mode 100644 index 3e67e4ec085f..000000000000 --- a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-bidi/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, fetchurl, perlPackages, pkgconfig, fribidi }: - -perlPackages.buildPerlPackage rec { - pname = "urxvt-bidi"; - version = "2.15"; - - src = fetchurl { - url = "mirror://cpan/authors/id/K/KA/KAMENSKY/Text-Bidi-${version}.tar.gz"; - sha256 = "1w65xbi4mw5acsrpv3phyzv82ghb29kpbb3b1b1gcinlfxl6f61m"; - }; - - nativeBuildInputs = [ pkgconfig perlPackages.ExtUtilsPkgConfig ]; - buildInputs = [ fribidi ]; - - postInstall = '' - install -Dm555 misc/bidi "$out/lib/urxvt/perl/bidi" - ''; - - meta = with lib; { - description = "Text::Bidi Perl package using fribidi, providing a urxvt plugin"; - homepage = "https://github.com/mkamensky/Text-Bidi"; - maintainers = with maintainers; [ doronbehar ]; - platforms = with platforms; unix; - }; -} diff --git a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-font-size/default.nix b/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-font-size/default.nix deleted file mode 100644 index 4f4319af6cbd..000000000000 --- a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-font-size/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ stdenv, fetchFromGitHub, xrdb, xlsfonts }: - -stdenv.mkDerivation { - name = "urxvt-font-size-2015-05-22"; - dontPatchShebangs = true; - - src = fetchFromGitHub { - owner = "majutsushi"; - repo = "urxvt-font-size"; - rev = "fd5b09c10798c6723bbf771d4d8881cf6563bc69"; - sha256 = "16m3kkypg3y00x597zx05zy167a0kaqpawz0l591wzb2bv1dz55z"; - }; - - installPhase = '' - substituteInPlace font-size \ - --replace "xrdb -merge" "${xrdb}/bin/xrdb -merge" \ - --replace "xlsfonts" "${xlsfonts}/bin/xlsfonts" - - mkdir -p $out/lib/urxvt/perl - cp font-size $out/lib/urxvt/perl - ''; - - meta = with stdenv.lib; { - description = "Change the urxvt font size on the fly"; - homepage = https://github.com/majutsushi/urxvt-font-size; - license = licenses.mit; - maintainers = with maintainers; [ cstrahan ]; - platforms = with platforms; unix; - }; -} diff --git a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-perl/default.nix b/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-perl/default.nix deleted file mode 100644 index 13e005014f10..000000000000 --- a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-perl/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ stdenv, fetchFromGitHub, wmctrl }: - -stdenv.mkDerivation { - name = "urxvt-perl-2015-01-16"; - - src = fetchFromGitHub { - owner = "effigies"; - repo = "urxvt-perl"; - rev = "c3beb9ff09a7139591416c61f8e9458c8a23bea5"; - sha256 = "1w1p8ng7bwq5hnaprjl1zf073y5l3hdsj7sz7cll6isjswcm6r0s"; - }; - - installPhase = '' - substituteInPlace fullscreen \ - --replace "wmctrl" "${wmctrl}/bin/wmctrl" - - mkdir -p $out/lib/urxvt/perl - cp fullscreen $out/lib/urxvt/perl - cp newterm $out/lib/urxvt/perl - ''; - - meta = with stdenv.lib; { - description = "Perl extensions for the rxvt-unicode terminal emulator"; - homepage = https://github.com/effigies/urxvt-perl; - license = licenses.gpl3; - maintainers = with maintainers; [ cstrahan ]; - platforms = with platforms; unix; - }; -} diff --git a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-perls/default.nix b/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-perls/default.nix deleted file mode 100644 index b976388ae2c4..000000000000 --- a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-perls/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ stdenv, fetchFromGitHub }: - -stdenv.mkDerivation rec { - pname = "urxvt-perls"; - version = "2.2"; - - src = fetchFromGitHub { - owner = "muennich"; - repo = "urxvt-perls"; - rev = version; - sha256 = "1cb0jbjmwfy2dlq2ny8wpc04k79jp3pz9qhbmgagsxs3sp1jg2hz"; - }; - - installPhase = '' - mkdir -p $out/lib/urxvt/perl - cp clipboard \ - keyboard-select \ - url-select \ - $out/lib/urxvt/perl - ''; - - meta = with stdenv.lib; { - description = "Perl extensions for the rxvt-unicode terminal emulator"; - homepage = https://github.com/muennich/urxvt-perls; - license = licenses.gpl2; - maintainers = with maintainers; [ abbradar ]; - platforms = with platforms; unix; - }; -} diff --git a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-tabbedex/default.nix b/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-tabbedex/default.nix deleted file mode 100644 index 2982c02cce9a..000000000000 --- a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-tabbedex/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenv, fetchFromGitHub, perl }: - -stdenv.mkDerivation rec { - pname = "urxvt-tabbedex"; - version = "19.21"; - - src = fetchFromGitHub { - owner = "mina86"; - repo = "urxvt-tabbedex"; - rev = "v${version}"; - sha256 = "06msd156h6r8ss7qg66sjz5jz8613qfq2yvp0pc24i6mxzj8vl77"; - }; - - nativeBuildInputs = [ perl ]; - - installFlags = [ "PREFIX=$(out)" ]; - - meta = with stdenv.lib; { - description = "Tabbed plugin for rxvt-unicode with many enhancements (mina86's fork)"; - homepage = https://github.com/mina86/urxvt-tabbedex; - maintainers = with maintainers; [ abbradar ]; - platforms = with platforms; unix; - }; -} diff --git a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-theme-switch/default.nix b/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-theme-switch/default.nix deleted file mode 100644 index ba8ec3a6e72a..000000000000 --- a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-theme-switch/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ stdenv, fetchFromGitHub }: - -stdenv.mkDerivation rec { - rev = "cfcbcc3dd5a5b09a3fec0f6a1fea95f4a36a48c4"; - name = "urxvt-theme-switch-2014-12-21_rev${builtins.substring 0 1 rev}"; - dontPatchShebangs = true; - - src = fetchFromGitHub { - owner = "felixr"; - repo = "urxvt-theme-switch"; - inherit rev; - sha256 = "0x27m1vdqprn3lqpwgxvffill7prmaj6j9rhgvkvi13mzl5wmlli"; - }; - - installPhase = '' - mkdir -p $out/lib/urxvt/perl - sed -i -e "s|/usr/bin/env||" color-themes - cp color-themes $out/lib/urxvt/perl - ''; - - meta = with stdenv.lib; { - description = "urxvt plugin that allows to switch color themes during runtime"; - homepage = https://github.com/felixr/urxvt-theme-switch; - license = "CCBYNC"; - maintainers = with maintainers; [ ]; - platforms = with platforms; unix; - }; -} diff --git a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-vtwheel.nix b/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-vtwheel.nix deleted file mode 100644 index 2f2c20558031..000000000000 --- a/pkgs/applications/misc/rxvt_unicode-plugins/urxvt-vtwheel.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ stdenv, fetchgit, perl }: - -stdenv.mkDerivation { - - name = "rxvt_unicode-vtwheel-0.3.2"; - - src = fetchgit { - url = "https://aur.archlinux.org/urxvt-vtwheel.git"; - rev = "36d3e861664aeae36a45f96100f10f8fe2218035"; - sha256 = "1h3vrsbli5q9kr84j5ijbivlhpwlh3l8cv233pg362v2zz4ja8i7"; - }; - - installPhase = '' - sed -i 's|#! perl|#! ${perl}/bin/perl|g' vtwheel - mkdir -p $out/lib/urxvt/perl - cp vtwheel $out/lib/urxvt/perl - ''; - - meta = with stdenv.lib; { - description = "Pass mouse wheel commands to secondary screens (screen, less, nano, etc)"; - homepage = https://aur.archlinux.org/packages/urxvt-vtwheel; - license = licenses.mit; - maintainers = with maintainers; [ danbst ]; - platforms = with platforms; unix; - }; - -} \ No newline at end of file diff --git a/pkgs/applications/misc/rxvt_unicode/wrapper.nix b/pkgs/applications/misc/rxvt_unicode/wrapper.nix deleted file mode 100644 index fd0860b3aaef..000000000000 --- a/pkgs/applications/misc/rxvt_unicode/wrapper.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ symlinkJoin, rxvt_unicode, makeWrapper, plugins, perlPackages, perlDeps ? []}: - -let - rxvt_name = builtins.parseDrvName rxvt_unicode.name; - -in symlinkJoin { - name = "${rxvt_name.name}-with-plugins-${rxvt_name.version}"; - - paths = [ rxvt_unicode ] ++ plugins; - - buildInputs = [ makeWrapper ]; - - postBuild = '' - wrapProgram $out/bin/urxvt \ - --prefix PERL5LIB : "${perlPackages.makePerlPath perlDeps}" \ - --suffix-each URXVT_PERL_LIB ':' "$out/lib/urxvt/perl" - wrapProgram $out/bin/urxvtd \ - --prefix PERL5LIB : "${perlPackages.makePerlPath perlDeps}" \ - --suffix-each URXVT_PERL_LIB ':' "$out/lib/urxvt/perl" - ''; - - passthru.plugins = plugins; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index afad70ae6022..62e3eb8d4bcb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21229,35 +21229,9 @@ in rxvt = callPackage ../applications/misc/rxvt { }; - # urxvt - rxvt_unicode = callPackage ../applications/misc/rxvt_unicode { }; - - rxvt_unicode-with-plugins = callPackage ../applications/misc/rxvt_unicode/wrapper.nix { - plugins = [ - urxvt_autocomplete_all_the_things - urxvt_perl - urxvt_perls - urxvt_tabbedex - urxvt_font_size - urxvt_theme_switch - urxvt_vtwheel - urxvt_bidi - ]; - perlDeps = [ - # This needs the perl module it self provides - urxvt_bidi - ]; - }; + rxvt-unicode = callPackage ../applications/misc/rxvt-unicode/wrapper.nix { }; - # urxvt plugins - urxvt_autocomplete_all_the_things = callPackage ../applications/misc/rxvt_unicode-plugins/urxvt-autocomplete-all-the-things { }; - urxvt_perl = callPackage ../applications/misc/rxvt_unicode-plugins/urxvt-perl { }; - urxvt_perls = callPackage ../applications/misc/rxvt_unicode-plugins/urxvt-perls { }; - urxvt_tabbedex = callPackage ../applications/misc/rxvt_unicode-plugins/urxvt-tabbedex { }; - urxvt_font_size = callPackage ../applications/misc/rxvt_unicode-plugins/urxvt-font-size { }; - urxvt_theme_switch = callPackage ../applications/misc/rxvt_unicode-plugins/urxvt-theme-switch { }; - urxvt_vtwheel = callPackage ../applications/misc/rxvt_unicode-plugins/urxvt-vtwheel.nix { }; - urxvt_bidi = callPackage ../applications/misc/rxvt_unicode-plugins/urxvt-bidi { }; + rxvt-unicode-unwrapped = callPackage ../applications/misc/rxvt-unicode { }; uade123 = callPackage ../applications/audio/uade123 {}; -- cgit 1.4.1 From dcfff7cf0989596123060c0c586394405ff21b94 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 8 Jan 2020 23:39:55 +0100 Subject: rxvt-unicode: support self-depending plugins in wrapper --- pkgs/applications/misc/rxvt-unicode/wrapper.nix | 31 +++++++++++++++++-------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'pkgs') diff --git a/pkgs/applications/misc/rxvt-unicode/wrapper.nix b/pkgs/applications/misc/rxvt-unicode/wrapper.nix index 8a833f234094..b791e8aae2ee 100644 --- a/pkgs/applications/misc/rxvt-unicode/wrapper.nix +++ b/pkgs/applications/misc/rxvt-unicode/wrapper.nix @@ -4,24 +4,35 @@ , lib , rxvt-unicode-unwrapped , perlPackages +, configure ? { availablePlugins, ... }: + { plugins = builtins.attrValues availablePlugins; + extraDeps = [ ]; + perlDeps = [ ]; + } }: let availablePlugins = import ../rxvt-unicode-plugins { inherit callPackage; }; - wrapper = - { configure ? { availablePlugins, ... }: - { plugins = builtins.attrValues availablePlugins; - extraDeps = [ ]; - perlDeps = [ ]; - } - }: - + # Transform the string "self" to the plugin itself. + # It's needed for plugins like bidi who depends on the perl + # package the provide themself. + mkPerlDeps = p: + let deps = p.perlPackages or [ ]; + in map (x: if x == "self" then p else x) deps; + + # The wrapper is called with a `configure` function + # that takes the urxvt plugins as input and produce + # the configuration of the wrapper: list of plugins, + # extra dependencies and perl dependencies. + # This provides simple way to customize urxvt using + # the `.override` mechanism. + wrapper = { configure, ... }: let config = configure { inherit availablePlugins; }; plugins = config.plugins or (builtins.attrValues availablePlugins); extraDeps = config.extraDeps or [ ]; - perlDeps = (config.perlDeps or [ ]) ++ lib.concatMap (p: p.perlPackages or [ ]) plugins; + perlDeps = (config.perlDeps or [ ]) ++ lib.concatMap mkPerlDeps plugins; in symlinkJoin { name = "rxvt-unicode-${rxvt-unicode-unwrapped.version}"; @@ -43,4 +54,4 @@ let }; in - lib.makeOverridable wrapper { } + lib.makeOverridable wrapper { inherit configure; } -- cgit 1.4.1 From 1c38ce51ef3407362872a21c1b8731a19be89824 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 8 Jan 2020 23:44:37 +0100 Subject: rxvt-unicode: add aliases for name change --- pkgs/applications/misc/rxvt-unicode/wrapper.nix | 5 +++-- pkgs/top-level/aliases.nix | 11 ++++++++++- pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'pkgs') diff --git a/pkgs/applications/misc/rxvt-unicode/wrapper.nix b/pkgs/applications/misc/rxvt-unicode/wrapper.nix index b791e8aae2ee..38978799b5a8 100644 --- a/pkgs/applications/misc/rxvt-unicode/wrapper.nix +++ b/pkgs/applications/misc/rxvt-unicode/wrapper.nix @@ -3,6 +3,7 @@ , makeWrapper , lib , rxvt-unicode-unwrapped +, rxvt-unicode-plugins , perlPackages , configure ? { availablePlugins, ... }: { plugins = builtins.attrValues availablePlugins; @@ -12,11 +13,11 @@ }: let - availablePlugins = import ../rxvt-unicode-plugins { inherit callPackage; }; + availablePlugins = rxvt-unicode-plugins; # Transform the string "self" to the plugin itself. # It's needed for plugins like bidi who depends on the perl - # package the provide themself. + # package they provide themself. mkPerlDeps = p: let deps = p.perlPackages or [ ]; in map (x: if x == "self" then p else x) deps; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index c543af2405c3..40468139db70 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -365,7 +365,16 @@ mapAliases ({ ruby_2_4_3 = throw "deprecated 2018-0213: use ruby_2_4 instead"; ruby_2_5_0 = throw "deprecated 2018-0213: use ruby_2_5 instead"; rubygems = throw "deprecated 2016-03-02: rubygems is now bundled with ruby"; - rxvt_unicode_with-plugins = rxvt_unicode-with-plugins; # added 2015-04-02 + rxvt_unicode_with-plugins = rxvt-unicode; # added 2020-02-02 + rxvt_unicode = rxvt-unicode-unwrapped; # added 2020-02-02 + urxvt_autocomplete_all_the_things = rxvt-unicode-plugins.autocomplete-all-the-things; # added 2020-02-02 + urxvt_perl = rxvt-unicode-plugins.perl; # added 2020-02-02 + urxvt_perls = rxvt-unicode-plugins.perls; # added 2020-02-02 + urxvt_tabbedex = rxvt-unicode-plugins.tabbedex; # added 2020-02-02 + urxvt_font_size = rxvt-unicode-plugins.font-size; # added 2020-02-02 + urxvt_theme_switch = rxvt-unicode-plugins.theme-switch; # added 2020-02-02 + urxvt_vtwheel = rxvt-unicode-plugins.vtwheel; # added 2020-02-02 + urxvt_bidi = rxvt-unicode-plugins.bidi; # added 2020-02-02 s6Dns = s6-dns; # added 2018-07-23 s6Networking = s6-networking; # added 2018-07-23 s6LinuxUtils = s6-linux-utils; # added 2018-07-23 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 62e3eb8d4bcb..3c0aea47342f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21233,6 +21233,8 @@ in rxvt-unicode-unwrapped = callPackage ../applications/misc/rxvt-unicode { }; + rxvt-unicode-plugins = import ../applications/misc/rxvt-unicode-plugins { inherit callPackage; }; + uade123 = callPackage ../applications/audio/uade123 {}; udevil = callPackage ../applications/misc/udevil {}; -- cgit 1.4.1 From 4e155430ab76627f8bb29f584c4d43e499d2b1d9 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Thu, 9 Jan 2020 00:21:04 +0100 Subject: rxvt-unicode-plugins/urxvt-resize-font: init at 2019-10-05 --- .../misc/rxvt-unicode-plugins/default.nix | 2 ++ .../urxvt-resize-font/default.nix | 27 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/applications/misc/rxvt-unicode-plugins/urxvt-resize-font/default.nix (limited to 'pkgs') diff --git a/pkgs/applications/misc/rxvt-unicode-plugins/default.nix b/pkgs/applications/misc/rxvt-unicode-plugins/default.nix index b8a481fd1201..74bfbe83e91f 100644 --- a/pkgs/applications/misc/rxvt-unicode-plugins/default.nix +++ b/pkgs/applications/misc/rxvt-unicode-plugins/default.nix @@ -11,6 +11,8 @@ perls = callPackage ./urxvt-perls { }; + resize-font = callPackage ./urxvt-resize-font { }; + tabbedex = callPackage ./urxvt-tabbedex { }; theme-switch = callPackage ./urxvt-theme-switch { }; diff --git a/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-resize-font/default.nix b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-resize-font/default.nix new file mode 100644 index 000000000000..a056e603f004 --- /dev/null +++ b/pkgs/applications/misc/rxvt-unicode-plugins/urxvt-resize-font/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation { + pname = "urxvt-resize-font"; + version = "2019-10-05"; + dontPatchShebangs = true; + + src = fetchFromGitHub { + owner = "simmel"; + repo = "urxvt-resize-font"; + rev = "e966a5d77264e9263bfc8a51e160fad24055776b"; + sha256 = "18ab3bsfdkzzh1n9fpi2al5bksvv2b7fjmvxpx6fzqcy4bc64vkh"; + }; + + installPhase = '' + mkdir -p $out/lib/urxvt/perl + cp resize-font $out/lib/urxvt/perl + ''; + + meta = with stdenv.lib; { + description = "URxvt Perl extension for resizing the font"; + homepage = "https://github.com/simmel/urxvt-resize-font"; + license = licenses.mit; + maintainers = with maintainers; [ rnhmjoj ]; + platforms = platforms.unix; + }; +} -- cgit 1.4.1