aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/alacritty/default.nix142
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/aminal/default.nix69
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/cool-retro-term/default.nix46
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/eterm/default.nix26
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/evilvte/default.nix38
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/foot/default.nix38
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/guake/default.nix74
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/havoc/default.nix35
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/hyper/default.nix41
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/iterm2/default.nix48
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/iterm2/disable_updates.patch11
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/kitty/default.nix143
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/kitty/fix-paths.patch16
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/lilyterm/default.nix58
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/lxterminal/default.nix50
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/lxterminal/respect-xml-catalog-files-var.patch15
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/microcom/default.nix29
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/mlterm/default.nix122
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/mrxvt/default.nix40
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/nimmm/default.nix55
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/roxterm/default.nix47
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/default.nix22
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-autocomplete-all-the-things/default.nix27
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-bidi/default.nix27
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-font-size/default.nix30
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-perl/default.nix29
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-perls/default.nix29
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-resize-font/default.nix27
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-tabbedex/default.nix24
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-theme-switch/default.nix28
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-vtwheel/default.nix27
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/default.nix88
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/patches/256-color-resources.patch255
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/patches/9.06-font-width.patch21
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/patches/makefile-phony.patch10
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/wrapper.nix58
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt/default.nix39
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/sakura/default.nix50
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/st/default.nix38
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/st/xst.nix32
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/stupidterm/default.nix36
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/terminator/default.nix77
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/terminus/default.nix43
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/add_errno_header.patch24
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/default.nix77
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/remove_ldflags_macos.patch25
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/url_regexp_trailing.patch27
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0002-expose-function-for-setting-cursor-position.patch61
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0003-add-function-for-setting-the-text-selections.patch56
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0005-expose-function-for-getting-the-selected-text.patch29
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/wrapper.nix15
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termonad/default.nix19
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/tilda/default.nix41
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/tilix/default.nix74
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/wayst/default.nix91
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/wayst/utf8proc.patch24
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/x3270/default.nix44
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/xterm/default.nix119
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/xterm/sixel-256.support.patch11
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/xtermcontrol/default.nix25
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/yaft/default.nix25
61 files changed, 2947 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/alacritty/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/alacritty/default.nix
new file mode 100644
index 000000000000..cd372b79c26b
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/alacritty/default.nix
@@ -0,0 +1,142 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, rustPlatform
+
+, cmake
+, gzip
+, installShellFiles
+, makeWrapper
+, ncurses
+, pkgconfig
+, python3
+
+, expat
+, fontconfig
+, freetype
+, libGL
+, libX11
+, libXcursor
+, libXi
+, libXrandr
+, libXxf86vm
+, libxcb
+, libxkbcommon
+, wayland
+, xdg_utils
+
+ # Darwin Frameworks
+, AppKit
+, CoreGraphics
+, CoreServices
+, CoreText
+, Foundation
+, OpenGL
+}:
+let
+ rpathLibs = [
+ expat
+ fontconfig
+ freetype
+ libGL
+ libX11
+ libXcursor
+ libXi
+ libXrandr
+ libXxf86vm
+ libxcb
+ ] ++ lib.optionals stdenv.isLinux [
+ libxkbcommon
+ wayland
+ ];
+in
+rustPlatform.buildRustPackage rec {
+ pname = "alacritty";
+ version = "0.6.0";
+
+ src = fetchFromGitHub {
+ owner = "alacritty";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "vQdNwNiUvoJWRT1foPRadirI2zWjnzU3sGnIxeHKlj8=";
+ };
+
+ cargoSha256 = "1PQSg6EmwVMZj2ALw6qsbtPMCtALVHx5TR05FjGD/QE=";
+
+ nativeBuildInputs = [
+ cmake
+ gzip
+ installShellFiles
+ makeWrapper
+ ncurses
+ pkgconfig
+ python3
+ ];
+
+ buildInputs = rpathLibs
+ ++ lib.optionals stdenv.isDarwin [
+ AppKit
+ CoreGraphics
+ CoreServices
+ CoreText
+ Foundation
+ OpenGL
+ ];
+
+ outputs = [ "out" "terminfo" ];
+
+ postPatch = ''
+ substituteInPlace alacritty/src/config/mouse.rs \
+ --replace xdg-open ${xdg_utils}/bin/xdg-open
+ '';
+
+ installPhase = ''
+ runHook preInstall
+
+ install -D $releaseDir/alacritty $out/bin/alacritty
+
+ '' + (
+ if stdenv.isDarwin then ''
+ mkdir $out/Applications
+ cp -r extra/osx/Alacritty.app $out/Applications
+ ln -s $out/bin $out/Applications/Alacritty.app/Contents/MacOS
+ '' else ''
+ install -D extra/linux/Alacritty.desktop -t $out/share/applications/
+ install -D extra/logo/compat/alacritty-term.svg $out/share/icons/hicolor/scalable/apps/Alacritty.svg
+
+ # patchelf generates an ELF that binutils' "strip" doesn't like:
+ # strip: not enough room for program headers, try linking with -N
+ # As a workaround, strip manually before running patchelf.
+ strip -S $out/bin/alacritty
+
+ patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
+ ''
+ ) + ''
+
+ installShellCompletion --zsh extra/completions/_alacritty
+ installShellCompletion --bash extra/completions/alacritty.bash
+ installShellCompletion --fish extra/completions/alacritty.fish
+
+ install -dm 755 "$out/share/man/man1"
+ gzip -c extra/alacritty.man > "$out/share/man/man1/alacritty.1.gz"
+
+ install -Dm 644 alacritty.yml $out/share/doc/alacritty.yml
+
+ install -dm 755 "$terminfo/share/terminfo/a/"
+ tic -xe alacritty,alacritty-direct -o "$terminfo/share/terminfo" extra/alacritty.info
+ mkdir -p $out/nix-support
+ echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
+
+ runHook postInstall
+ '';
+
+ dontPatchELF = true;
+
+ meta = with lib; {
+ description = "A cross-platform, GPU-accelerated terminal emulator";
+ homepage = "https://github.com/alacritty/alacritty";
+ license = licenses.asl20;
+ maintainers = with maintainers; [ Br1ght0ne mic92 cole-h ma27 ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/aminal/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/aminal/default.nix
new file mode 100644
index 000000000000..7f04a93d6a32
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/aminal/default.nix
@@ -0,0 +1,69 @@
+{ buildGoPackage
+, Carbon
+, Cocoa
+, Kernel
+, fetchFromGitHub
+, lib
+, mesa_glu
+, stdenv
+, xorg
+}:
+
+buildGoPackage rec {
+ pname = "aminal";
+ version = "0.9.0";
+
+ goPackagePath = "github.com/liamg/aminal";
+
+ buildInputs =
+ lib.optionals stdenv.isLinux [
+ mesa_glu
+ xorg.libX11
+ xorg.libXcursor
+ xorg.libXi
+ xorg.libXinerama
+ xorg.libXrandr
+ xorg.libXxf86vm
+ ] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa Kernel ];
+
+ src = fetchFromGitHub {
+ owner = "liamg";
+ repo = "aminal";
+ rev = "v${version}";
+ sha256 = "0syv9md7blnl6i19zf8s1xjx5vfz6s755fxyg2ply0qc1pwhsj8n";
+ };
+
+ preBuild = ''
+ buildFlagsArray=("-ldflags=-X ${goPackagePath}/version.Version=${version}")
+ '';
+
+ meta = with lib; {
+ description = "Golang terminal emulator from scratch";
+ longDescription = ''
+ Aminal is a modern terminal emulator for Mac/Linux implemented in Golang
+ and utilising OpenGL.
+
+ The project is experimental at the moment, so you probably won't want to
+ rely on Aminal as your main terminal for a while.
+
+ Features:
+ - Unicode support
+ - OpenGL rendering
+ - Customisation options
+ - True colour support
+ - Support for common ANSI escape sequences a la xterm
+ - Scrollback buffer
+ - Clipboard access
+ - Clickable URLs
+ - Multi platform support (Windows coming soon...)
+ - Sixel support
+ - Hints/overlays
+ - Built-in patched fonts for powerline
+ - Retina display support
+ '';
+ homepage = "https://github.com/liamg/aminal";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ kalbasit ];
+ platforms = platforms.linux ++ platforms.darwin;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/cool-retro-term/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/cool-retro-term/default.nix
new file mode 100644
index 000000000000..739ad07adbf3
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/cool-retro-term/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchFromGitHub, mkDerivation, qtbase, qtquick1, qmltermwidget
+, qtquickcontrols, qtgraphicaleffects, qmake }:
+
+mkDerivation rec {
+ version = "1.1.1";
+ pname = "cool-retro-term";
+
+ src = fetchFromGitHub {
+ owner = "Swordfish90";
+ repo = "cool-retro-term";
+ rev = version;
+ sha256 = "0mird4k88ml6y61hky2jynrjmnxl849fvhsr5jfdlnv0i7r5vwi5";
+ };
+
+ patchPhase = ''
+ sed -i -e '/qmltermwidget/d' cool-retro-term.pro
+ '';
+
+ buildInputs = [ qtbase qtquick1 qmltermwidget qtquickcontrols qtgraphicaleffects ];
+ nativeBuildInputs = [ qmake ];
+
+ installFlags = [ "INSTALL_ROOT=$(out)" ];
+
+ preFixup = ''
+ mv $out/usr/share $out/share
+ mv $out/usr/bin $out/bin
+ rmdir $out/usr
+ '' + stdenv.lib.optionalString stdenv.isDarwin ''
+ ln -s $out/bin/cool-retro-term.app/Contents/MacOS/cool-retro-term $out/bin/cool-retro-term
+ '';
+
+ enableParallelBuilding = true;
+
+ meta = {
+ description = "Terminal emulator which mimics the old cathode display";
+ longDescription = ''
+ cool-retro-term is a terminal emulator which tries to mimic the look and
+ feel of the old cathode tube screens. It has been designed to be
+ eye-candy, customizable, and reasonably lightweight.
+ '';
+ homepage = "https://github.com/Swordfish90/cool-retro-term";
+ license = stdenv.lib.licenses.gpl3Plus;
+ platforms = with stdenv.lib.platforms; linux ++ darwin;
+ maintainers = with stdenv.lib.maintainers; [ skeidel ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/eterm/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/eterm/default.nix
new file mode 100644
index 000000000000..b51acd9fa728
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/eterm/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl
+, libX11, libXext, libXaw
+, pkgconfig, imlib2, libast }:
+
+stdenv.mkDerivation rec {
+ pname = "eterm";
+ version = "0.9.6";
+ srcName = "Eterm-${version}";
+
+ src = fetchurl {
+ url = "http://www.eterm.org/download/${srcName}.tar.gz";
+ sha256 = "0g71szjklkiczxwzbjjfm59y6v9w4hp8mg7cy99z1g7qcjm0gfbj";
+ };
+
+ nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [ libX11 libXext libXaw imlib2 ];
+ propagatedBuildInputs = [ libast ];
+
+ meta = with stdenv.lib; {
+ description = "Terminal emulator";
+ homepage = "http://www.eterm.org";
+ license = licenses.bsd2;
+ maintainers = [ maintainers.AndersonTorres ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/evilvte/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/evilvte/default.nix
new file mode 100644
index 000000000000..7a5284a527a6
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/evilvte/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchgit, makeWrapper, pkgconfig,
+ gnome2, glib, pango, cairo, gdk-pixbuf, atk, freetype, xorg,
+ configH ? ""
+}:
+
+stdenv.mkDerivation {
+ pname = "evilvte";
+ version = "0.5.2-20140827";
+
+ src = fetchgit {
+ url = "https://github.com/caleb-/evilvte.git";
+ rev = "8dfa41e26bc640dd8d8c7317ff7d04e3c01ded8a";
+ sha256 = "70f1d4234d077121e2223a735d749d1b53f0b84393507b635b8a37c3716e94d3";
+ };
+
+ buildInputs = [
+ gnome2.vte glib pango gnome2.gtk cairo gdk-pixbuf atk freetype xorg.libX11
+ xorg.xorgproto xorg.libXext makeWrapper pkgconfig
+ ];
+
+ buildPhase = ''
+ cat >src/config.h <<EOF
+ ${configH}
+ EOF
+ make
+ '';
+
+ meta = with stdenv.lib; {
+ description = "VTE based, highly customizable terminal emulator";
+ homepage = "http://www.calno.com/evilvte";
+ license = licenses.gpl2;
+ maintainers = [ maintainers.bodil ];
+ platforms = platforms.linux;
+ knownVulnerabilities = [
+ "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854585"
+ ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/foot/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/foot/default.nix
new file mode 100644
index 000000000000..3d95f7c5772d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/foot/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchgit
+, fcft, freetype, pixman, libxkbcommon, fontconfig, wayland
+, meson, ninja, ncurses, scdoc, tllist, wayland-protocols, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+ pname = "foot";
+ version = "1.5.1";
+
+ src = fetchgit {
+ url = "https://codeberg.org/dnkl/foot.git";
+ rev = version;
+ sha256 = "sha256-GAk2qkrgCNILJOeRcn1NT4t3w+R6WFTZ1goOhBEwKwc=";
+ };
+
+ nativeBuildInputs = [
+ meson ninja ncurses scdoc tllist wayland-protocols pkg-config
+ ];
+ buildInputs = [
+ fontconfig freetype pixman wayland libxkbcommon fcft
+ ];
+
+ # recommended build flags for foot as per INSTALL.md
+ # https://codeberg.org/dnkl/foot/src/branch/master/INSTALL.md#user-content-release-build
+ preConfigure = ''
+ export CFLAGS+="-O3 -fno-plt"
+ '';
+
+ mesonFlags = [ "--buildtype=release" "-Db_lto=true" ];
+
+ meta = with stdenv.lib; {
+ homepage = "https://codeberg.org/dnkl/foot/";
+ description = "A fast, lightweight and minimalistic Wayland terminal emulator";
+ license = licenses.mit;
+ maintainers = [ maintainers.sternenseemann ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/guake/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/guake/default.nix
new file mode 100644
index 000000000000..d403ddc8b26c
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/guake/default.nix
@@ -0,0 +1,74 @@
+{ stdenv
+, fetchFromGitHub
+, python3
+, gettext
+, gobject-introspection
+, wrapGAppsHook
+, gtk3
+, keybinder3
+, libnotify
+, libutempter
+, vte
+, libwnck3
+}:
+
+python3.pkgs.buildPythonApplication rec {
+ pname = "guake";
+ version = "3.6.3";
+
+ format = "other";
+
+ src = fetchFromGitHub {
+ owner = "Guake";
+ repo = "guake";
+ rev = version;
+ sha256 = "13ipnmqcyixpa6qv83m0f91za4kar14s5jpib68b32z65x1h0j3b";
+ };
+
+ # Strict deps breaks guake
+ # See https://github.com/NixOS/nixpkgs/issues/59930
+ # and https://github.com/NixOS/nixpkgs/issues/56943
+ strictDeps = false;
+
+ nativeBuildInputs = [
+ gettext
+ gobject-introspection
+ wrapGAppsHook
+ python3.pkgs.pip
+ ];
+
+ buildInputs = [
+ gtk3
+ keybinder3
+ libnotify
+ libwnck3
+ python3
+ vte
+ ];
+
+ propagatedBuildInputs = with python3.pkgs; [
+ dbus-python
+ pbr
+ pycairo
+ pygobject3
+ setuptools
+ ];
+
+ PBR_VERSION = version; # pbr needs either .git directory, sdist, or env var
+
+ makeFlags = [
+ "prefix=${placeholder ''out''}"
+ ];
+
+ preFixup = ''
+ gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ libutempter ]}")
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Drop-down terminal for GNOME";
+ homepage = "http://guake-project.org";
+ license = licenses.gpl2;
+ maintainers = [ maintainers.msteen ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/havoc/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/havoc/default.nix
new file mode 100644
index 000000000000..a6d5278fc3c5
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/havoc/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub
+, pkgconfig, libxkbcommon, wayland, wayland-protocols }:
+
+stdenv.mkDerivation rec {
+
+ pname = "havoc";
+ version = "0.3.1";
+
+ src = fetchFromGitHub {
+ owner = "ii8";
+ repo = pname;
+ rev = version;
+ sha256 = "1g05r9j6srwz1krqvzckx80jn8fm48rkb4xp68953gy9yp2skg3k";
+ };
+
+ nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [ libxkbcommon wayland wayland-protocols ];
+
+ dontConfigure = true;
+
+ installFlags = [ "PREFIX=$$out" ];
+
+ postInstall = ''
+ install -D -m 644 havoc.cfg -t $out/etc/${pname}/
+ install -D -m 644 README.md -t $out/share/doc/${pname}-${version}/
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A minimal terminal emulator for Wayland";
+ homepage = "https://github.com/ii8/havoc";
+ license = with licenses; [ mit publicDomain ];
+ platforms = with platforms; unix;
+ maintainers = with maintainers; [ AndersonTorres ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/hyper/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/hyper/default.nix
new file mode 100644
index 000000000000..e5ea0a67f93a
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/hyper/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, lib, fetchurl, dpkg, atk, glib, pango, gdk-pixbuf, gnome2, gtk2, cairo
+, freetype, fontconfig, dbus, libXi, libXcursor, libXdamage, libXrandr
+, libXcomposite, libXext, libXfixes, libXrender, libX11, libXtst, libXScrnSaver
+, libxcb, nss, nspr, alsaLib, cups, expat, udev, libpulseaudio }:
+
+let
+ libPath = stdenv.lib.makeLibraryPath [
+ stdenv.cc.cc gtk2 gnome2.GConf atk glib pango gdk-pixbuf cairo freetype fontconfig dbus
+ libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes libxcb
+ libXrender libX11 libXtst libXScrnSaver nss nspr alsaLib cups expat udev libpulseaudio
+ ];
+in
+stdenv.mkDerivation rec {
+ version = "3.0.2";
+ pname = "hyper";
+ src = fetchurl {
+ url = "https://github.com/zeit/hyper/releases/download/${version}/hyper_${version}_amd64.deb";
+ sha256 = "0fv4wv5f8nc739bna83qxmgrvvbyq4w9ch764q2f12wjygrz336p";
+ };
+ buildInputs = [ dpkg ];
+ unpackPhase = ''
+ mkdir pkg
+ dpkg-deb -x $src pkg
+ sourceRoot=pkg
+ '';
+ installPhase = ''
+ mkdir -p "$out/bin"
+ mv opt "$out/"
+ ln -s "$out/opt/Hyper/hyper" "$out/bin/hyper"
+ patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${libPath}:\$ORIGIN" "$out/opt/Hyper/hyper"
+ mv usr/* "$out/"
+ '';
+ dontPatchELF = true;
+ meta = with lib; {
+ description = "A terminal built on web technologies";
+ homepage = "https://hyper.is/";
+ maintainers = with maintainers; [ puffnfresh ];
+ license = licenses.mit;
+ platforms = [ "x86_64-linux" ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/iterm2/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/iterm2/default.nix
new file mode 100644
index 000000000000..e273eda45c31
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/iterm2/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchFromGitHub }:
+
+ /*
+ This derivation is impure: it relies on an Xcode toolchain being installed
+ and available in the expected place. The values of sandboxProfile
+ are copied pretty directly from the MacVim derivation, which
+ is also impure. In order to build you at least need the `sandbox`
+ option set to `relaxed` or `false`.
+ */
+
+stdenv.mkDerivation rec {
+ pname = "iterm2";
+ version = "3.3.9";
+
+ src = fetchFromGitHub {
+ owner = "gnachman";
+ repo = "iTerm2";
+ rev = "v${version}";
+ sha256 = "06mq3gfjgy8jw2f3fzdsi3pbfkdijfzzlhlw6ixa5bfb4hbcgn5j";
+ };
+
+ patches = [ ./disable_updates.patch ];
+ postPatch = ''
+ sed -i -e 's/CODE_SIGN_IDENTITY = "Developer ID Application"/CODE_SIGN_IDENTITY = ""/g' ./iTerm2.xcodeproj/project.pbxproj
+ '';
+
+ preConfigure = "LD=$CC";
+ makeFlagsArray = ["Nix"];
+ installPhase = ''
+ mkdir -p $out/Applications
+ mv Build/Products/Deployment/iTerm2.app $out/Applications/iTerm.app
+ '';
+
+ sandboxProfile = ''
+ (allow file-read* file-write* process-exec mach-lookup)
+ ; block homebrew dependencies
+ (deny file-read* file-write* process-exec mach-lookup (subpath "/usr/local") (with no-log))
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A replacement for Terminal and the successor to iTerm";
+ homepage = "https://www.iterm2.com/";
+ license = licenses.gpl2;
+ maintainers = with maintainers; [ tricktron ];
+ platforms = platforms.darwin;
+ hydraPlatforms = [];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/iterm2/disable_updates.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/iterm2/disable_updates.patch
new file mode 100644
index 000000000000..e717c58f30f1
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/iterm2/disable_updates.patch
@@ -0,0 +1,11 @@
+--- iTerm2/sources/iTermPreferences.m 2016-06-23 16:55:28.000000000 +0200
++++ iTerm2/sources/iTermPreferences.m 2016-06-23 16:55:42.000000000 +0200
+@@ -189,7 +189,7 @@
+ kPreferenceKeyInstantReplayMemoryMegabytes: @4,
+ kPreferenceKeySavePasteAndCommandHistory: @NO,
+ kPreferenceKeyAddBonjourHostsToProfiles: @NO,
+- kPreferenceKeyCheckForUpdatesAutomatically: @YES,
++ kPreferenceKeyCheckForUpdatesAutomatically: @NO,
+ kPreferenceKeyCheckForTestReleases: @NO,
+ kPreferenceKeyLoadPrefsFromCustomFolder: @NO,
+ kPreferenceKeyNeverRemindPrefsChangesLostForFileHaveSelection: @NO,
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/kitty/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/kitty/default.nix
new file mode 100644
index 000000000000..b6a93aefb594
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/kitty/default.nix
@@ -0,0 +1,143 @@
+{ stdenv, substituteAll, fetchFromGitHub, python3Packages, libunistring,
+ harfbuzz, fontconfig, pkgconfig, ncurses, imagemagick, xsel,
+ libstartup_notification, libGL, libX11, libXrandr, libXinerama, libXcursor,
+ libxkbcommon, libXi, libXext, wayland-protocols, wayland,
+ lcms2,
+ installShellFiles,
+ dbus,
+ Cocoa,
+ CoreGraphics,
+ Foundation,
+ IOKit,
+ Kernel,
+ OpenGL,
+ libcanberra,
+ libicns,
+ libpng,
+ python3,
+ zlib,
+}:
+
+with python3Packages;
+buildPythonApplication rec {
+ pname = "kitty";
+ version = "0.19.2";
+ format = "other";
+
+ src = fetchFromGitHub {
+ owner = "kovidgoyal";
+ repo = "kitty";
+ rev = "v${version}";
+ sha256 = "06mlrc283k5f75y36fmmaxnj29jfc1s8vaykjph6a86m1gcl5wgi";
+ };
+
+ buildInputs = [
+ harfbuzz
+ ncurses
+ lcms2
+ ] ++ stdenv.lib.optionals stdenv.isDarwin [
+ Cocoa
+ CoreGraphics
+ Foundation
+ IOKit
+ Kernel
+ OpenGL
+ libpng
+ python3
+ zlib
+ ] ++ stdenv.lib.optionals stdenv.isLinux [
+ fontconfig libunistring libcanberra libX11
+ libXrandr libXinerama libXcursor libxkbcommon libXi libXext
+ wayland-protocols wayland dbus
+ ];
+
+ nativeBuildInputs = [
+ pkgconfig sphinx ncurses
+ installShellFiles
+ ] ++ stdenv.lib.optionals stdenv.isDarwin [
+ imagemagick
+ libicns # For the png2icns tool.
+ ];
+
+ propagatedBuildInputs = stdenv.lib.optional stdenv.isLinux libGL;
+
+ outputs = [ "out" "terminfo" ];
+
+ patches = [
+ ./fix-paths.patch
+ ];
+
+ # Causes build failure due to warning
+ hardeningDisable = stdenv.lib.optional stdenv.cc.isClang "strictoverflow";
+
+ dontConfigure = true;
+
+ buildPhase = if stdenv.isDarwin then ''
+ ${python.interpreter} setup.py kitty.app \
+ --update-check-interval=0 \
+ --disable-link-time-optimization
+ make man
+ '' else ''
+ ${python.interpreter} setup.py linux-package \
+ --update-check-interval=0 \
+ --egl-library='${stdenv.lib.getLib libGL}/lib/libEGL.so.1' \
+ --startup-notification-library='${libstartup_notification}/lib/libstartup-notification-1.so' \
+ --canberra-library='${libcanberra}/lib/libcanberra.so'
+ '';
+
+ checkInputs = [ pillow ];
+
+ checkPhase =
+ let buildBinPath =
+ if stdenv.isDarwin
+ then "kitty.app/Contents/MacOS"
+ else "linux-package/bin";
+ in
+ ''
+ env PATH="${buildBinPath}:$PATH" ${python.interpreter} test.py
+ '';
+
+ installPhase = ''
+ runHook preInstall
+ mkdir -p $out
+ ${if stdenv.isDarwin then ''
+ mkdir "$out/bin"
+ ln -s ../Applications/kitty.app/Contents/MacOS/kitty "$out/bin/kitty"
+ mkdir "$out/Applications"
+ cp -r kitty.app "$out/Applications/kitty.app"
+
+ installManPage 'docs/_build/man/kitty.1'
+ '' else ''
+ cp -r linux-package/{bin,share,lib} $out
+ ''}
+ wrapProgram "$out/bin/kitty" --prefix PATH : "$out/bin:${stdenv.lib.makeBinPath [ imagemagick xsel ncurses.dev ]}"
+ runHook postInstall
+
+ installShellCompletion --cmd kitty \
+ --bash <("$out/bin/kitty" + complete setup bash) \
+ --fish <("$out/bin/kitty" + complete setup fish) \
+ --zsh <("$out/bin/kitty" + complete setup zsh)
+ '';
+
+ postInstall = ''
+ terminfo_src=${if stdenv.isDarwin then
+ ''"$out/Applications/kitty.app/Contents/Resources/terminfo"''
+ else
+ "$out/share/terminfo"}
+
+ mkdir -p $terminfo/share
+ mv "$terminfo_src" $terminfo/share/terminfo
+
+ mkdir -p $out/nix-support
+ echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "https://github.com/kovidgoyal/kitty";
+ description = "A modern, hackable, featureful, OpenGL based terminal emulator";
+ license = licenses.gpl3;
+ changelog = "https://sw.kovidgoyal.net/kitty/changelog.html";
+ platforms = platforms.darwin ++ platforms.linux;
+ maintainers = with maintainers; [ tex rvolosatovs Luflosi ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/kitty/fix-paths.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/kitty/fix-paths.patch
new file mode 100644
index 000000000000..380f6d749146
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/kitty/fix-paths.patch
@@ -0,0 +1,16 @@
+--- a/docs/Makefile
++++ b/docs/Makefile
+@@ -3,7 +3,7 @@
+# Patching is needed here for the following reason:
+# * importing the `constants` package from Kitty has a side effect that it
+# creates the user configuration directory. This package gets imported
+# while sphinx scans the code for documentation strings.
+#
+
+ # You can set these variables from the command line.
+ SPHINXOPTS = -j auto -T $(FAIL_WARN)
+-SPHINXBUILD = sphinx-build
++SPHINXBUILD = PYTHONPATH=${PYTHONPATH}:.. HOME=${TMPDIR}/kitty-build-home sphinx-build
+ SPHINXPROJ = kitty
+ SOURCEDIR = .
+ BUILDDIR = _build
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/lilyterm/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/lilyterm/default.nix
new file mode 100644
index 000000000000..28f9625b5b66
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/lilyterm/default.nix
@@ -0,0 +1,58 @@
+{ stdenv, lib, fetchurl, fetchFromGitHub
+, pkgconfig
+, autoconf, automake, intltool, gettext
+, gtk, vte
+, flavour ? "stable"
+}:
+
+assert lib.assertOneOf "flavour" flavour [ "stable" "git" ];
+
+let
+ pname = "lilyterm";
+ stuff =
+ if flavour == "stable"
+ then rec {
+ version = "0.9.9.4";
+ src = fetchurl {
+ url = "https://lilyterm.luna.com.tw/file/${pname}-${version}.tar.gz";
+ sha256 = "0x2x59qsxq6d6xg5sd5lxbsbwsdvkwqlk17iw3h4amjg3m1jc9mp";
+ };
+ }
+ else {
+ version = "2019-07-25";
+ src = fetchFromGitHub {
+ owner = "Tetralet";
+ repo = pname;
+ rev = "faf1254f46049edfb1fd6e9191e78b1b23b9c51d";
+ sha256 = "054450gk237c62b677365bcwrijr63gd9xm8pv68br371wdzylz7";
+ };
+ };
+
+in
+with stdenv.lib;
+stdenv.mkDerivation rec {
+ inherit pname;
+
+ inherit (stuff) src version;
+
+ nativeBuildInputs = [ pkgconfig autoconf automake intltool gettext ];
+ buildInputs = [ gtk vte ];
+
+ preConfigure = "sh autogen.sh";
+
+ configureFlags = [
+ "--enable-nls"
+ "--enable-safe-mode"
+ ];
+
+ meta = with stdenv.lib; {
+ description = "A fast, lightweight terminal emulator";
+ longDescription = ''
+ LilyTerm is a terminal emulator based off of libvte that aims to be fast and lightweight.
+ '';
+ homepage = "https://lilyterm.luna.com.tw/";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ AndersonTorres Profpatsch ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/lxterminal/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/lxterminal/default.nix
new file mode 100644
index 000000000000..8c002bd14b08
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/lxterminal/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchurl, automake, autoconf, intltool, pkgconfig, gtk3, vte, wrapGAppsHook
+, libxslt, docbook_xml_dtd_412, docbook_xsl, libxml2, findXMLCatalogs
+}:
+
+let version = "0.3.2"; in
+
+stdenv.mkDerivation {
+ pname = "lxterminal";
+ inherit version;
+
+ src = fetchurl {
+ url = "https://github.com/lxde/lxterminal/archive/${version}.tar.gz";
+ sha256 = "1iafqmccsm3nnzwp6pb2c04iniqqnscj83bq1rvf58ppzk0bvih3";
+ };
+
+ configureFlags = [
+ "--enable-man"
+ "--enable-gtk3"
+ ];
+
+ nativeBuildInputs = [
+ automake autoconf intltool pkgconfig wrapGAppsHook
+ libxslt docbook_xml_dtd_412 docbook_xsl libxml2 findXMLCatalogs
+ ];
+
+ buildInputs = [ gtk3 vte ];
+
+ patches = [
+ ./respect-xml-catalog-files-var.patch
+ ];
+
+ preConfigure = ''
+ ./autogen.sh
+ '';
+
+ doCheck = true;
+
+ meta = {
+ description = "The standard terminal emulator of LXDE";
+ longDescription = ''
+ LXTerminal is the standard terminal emulator of LXDE. The terminal is a
+ desktop-independent VTE-based terminal emulator for LXDE without any
+ unnecessary dependencies.
+ '';
+ homepage = "https://wiki.lxde.org/en/LXTerminal";
+ license = stdenv.lib.licenses.gpl2;
+ maintainers = [ stdenv.lib.maintainers.velovix ];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/lxterminal/respect-xml-catalog-files-var.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/lxterminal/respect-xml-catalog-files-var.patch
new file mode 100644
index 000000000000..598f506118f2
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/lxterminal/respect-xml-catalog-files-var.patch
@@ -0,0 +1,15 @@
+diff --git a/acinclude.m4 b/acinclude.m4
+index be626c5..b449b1b 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -40,8 +40,8 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
+ [
+ AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
+ AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
+- if $jh_found_xmlcatalog && \
+- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
++ # empty argument forces libxml to use XML_CATALOG_FILES variable
++ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then
+ AC_MSG_RESULT([found])
+ ifelse([$3],,,[$3
+ ])dnl
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/microcom/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/microcom/default.nix
new file mode 100644
index 000000000000..8377505ec1c5
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/microcom/default.nix
@@ -0,0 +1,29 @@
+{ stdenv,
+ lib,
+ fetchFromGitHub,
+ readline,
+ autoreconfHook }:
+
+stdenv.mkDerivation rec {
+ pname = "microcom";
+ version = "2019.01.0";
+
+ src = fetchFromGitHub {
+ owner = "pengutronix";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "056v28hvagnzns6p8i3bq8609k82d3w1ab2lab5dr4cdfwhs4pqj";
+ };
+
+ nativeBuildInputs = [ autoreconfHook ];
+ buildInputs = [ readline ];
+
+ meta = with lib; {
+ description = "A minimalistic terminal program for communicating
+ with devices over a serial connection";
+ inherit (src.meta) homepage;
+ license = licenses.gpl2;
+ maintainers = with maintainers; [ emantor ];
+ platforms = with platforms; linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/mlterm/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/mlterm/default.nix
new file mode 100644
index 000000000000..9c01430d6dfc
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/mlterm/default.nix
@@ -0,0 +1,122 @@
+{ stdenv, lib, fetchFromGitHub, pkgconfig, autoconf, makeDesktopItem
+, libX11, gdk-pixbuf, cairo, libXft, gtk3, vte
+, harfbuzz #substituting glyphs with opentype fonts
+, fribidi, m17n_lib #bidi and encoding
+, openssl, libssh2 #build-in ssh
+, fcitx, ibus, uim #IME
+, wrapGAppsHook #color picker in mlconfig
+, Cocoa #Darwin
+}:
+
+stdenv.mkDerivation rec {
+ pname = "mlterm";
+ version = "3.9.1";
+
+ src = fetchFromGitHub {
+ owner = "arakiken";
+ repo = pname;
+ rev = "rel-${lib.replaceStrings [ "." ] [ "_" ] version}"; # 3.9.1 -> rel-3_9_1
+ sha256 = "1hh196kz2n3asv8r8r2bdk5b2w93zq7rw4880ciiq1554h0ib7fj";
+ };
+
+ nativeBuildInputs = [ pkgconfig autoconf wrapGAppsHook ];
+ buildInputs = [
+ libX11
+ gdk-pixbuf.dev
+ cairo
+ libXft
+ gtk3
+ harfbuzz
+ fribidi
+ ] ++ lib.optionals (!stdenv.isDarwin) [
+ # need linker magic, not adapted for Darwin yet
+ openssl
+ libssh2
+
+ # Not supported on Darwin
+ vte
+ m17n_lib
+
+ fcitx
+ ibus
+ uim
+ ];
+
+ #bad configure.ac and Makefile.in everywhere
+ preConfigure = ''
+ sed -ie 's;-L/usr/local/lib -R/usr/local/lib;;g' \
+ main/Makefile.in \
+ tool/mlfc/Makefile.in \
+ tool/mlimgloader/Makefile.in \
+ tool/mlconfig/Makefile.in \
+ uitoolkit/libtype/Makefile.in \
+ uitoolkit/libotl/Makefile.in
+ sed -ie 's;cd ..srcdir. && rm -f ...lang..gmo.*;;g' \
+ tool/mlconfig/po/Makefile.in.in
+ #utmp and mlterm-fb
+ substituteInPlace configure.in \
+ --replace "-m 2755 -g utmp" " " \
+ --replace "-m 4755 -o root" " "
+ substituteInPlace configure \
+ --replace "-m 2755 -g utmp" " " \
+ --replace "-m 4755 -o root" " "
+ '';
+ NIX_LDFLAGS = lib.optionalString (!stdenv.isDarwin) "
+ -L${stdenv.cc.cc.lib}/lib
+ -lX11 -lgdk_pixbuf-2.0 -lcairo -lfontconfig -lfreetype -lXft
+ -lvte-2.91 -lgtk-3 -lharfbuzz -lfribidi -lm17n
+ " + lib.optionalString (openssl != null) "
+ -lcrypto
+ " + lib.optionalString (libssh2 != null) "
+ -lssh2
+ ";
+
+ configureFlags = [
+ "--with-imagelib=gdk-pixbuf" #or mlimgloader depending on your bugs of choice
+ "--with-type-engines=cairo,xft,xcore"
+ "--with-gtk=3.0"
+ "--enable-ind" #indic scripts
+ "--enable-fribidi" #bidi scripts
+ "--with-tools=mlclient,mlconfig,mlcc,mlterm-menu,mlimgloader,registobmp,mlfc"
+ #mlterm-menu and mlconfig depend on enabling gnome3.at-spi2-core
+ #and configuring ~/.mlterm/key correctly.
+ ] ++ lib.optionals (!stdenv.isDarwin) [
+ "--with-x=yes"
+ "--with-gui=xlib,fb"
+ "--enable-m17nlib" #character encodings
+ ] ++ lib.optionals stdenv.isDarwin [
+ "--with-gui=quartz"
+ ] ++ lib.optionals (libssh2 == null) [ " --disable-ssh2" ];
+
+ postInstall = ''
+ install -D contrib/icon/mlterm-icon.svg "$out/share/icons/hicolor/scalable/apps/mlterm.svg"
+ install -D contrib/icon/mlterm-icon-gnome2.png "$out/share/icons/hicolor/48x48/apps/mlterm.png"
+ install -D -t $out/share/applications $desktopItem/share/applications/*
+ '' + lib.optionalString stdenv.isDarwin ''
+ mkdir -p $out/Applications/
+ cp -a cocoa/mlterm.app $out/Applications/
+ install $out/bin/mlterm -Dt $out/Applications/mlterm.app/Contents/MacOS/
+ '';
+
+ desktopItem = makeDesktopItem {
+ name = "mlterm";
+ exec = "mlterm %U";
+ icon = "mlterm";
+ type = "Application";
+ comment = "Terminal emulator";
+ desktopName = "mlterm";
+ genericName = "Terminal emulator";
+ categories = lib.concatStringsSep ";" [
+ "Application" "System" "TerminalEmulator"
+ ];
+ startupNotify = "false";
+ };
+
+ meta = with lib; {
+ description = "Multi Lingual TERMinal emulator";
+ homepage = "http://mlterm.sourceforge.net/";
+ license = licenses.bsd3;
+ maintainers = with maintainers; [ vrthra ramkromberg atemu ];
+ platforms = with platforms; linux ++ darwin;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/mrxvt/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/mrxvt/default.nix
new file mode 100644
index 000000000000..4dc70133ec47
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/mrxvt/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, libX11, libXft, libXi, xorgproto, libSM, libICE
+, freetype, pkgconfig, which }:
+
+stdenv.mkDerivation {
+ name = "mrxvt-0.5.4";
+
+ buildInputs =
+ [ libX11 libXft libXi xorgproto libSM libICE freetype pkgconfig which ];
+
+ configureFlags = [
+ "--with-x"
+ "--enable-frills"
+ "--enable-xft"
+ "--enable-xim"
+ # "--with-term=xterm"
+ "--with-max-profiles=100"
+ "--with-max-term=100"
+ "--with-save-lines=10000"
+ ];
+
+ preConfigure = ''
+ NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype.dev}/include/freetype2";
+ '';
+
+ src = fetchurl {
+ url = "mirror://sourceforge/materm/mrxvt-0.5.4.tar.gz";
+ sha256 = "1mqhmnlz32lvld9rc6c1hyz7gjw4anwf39yhbsjkikcgj1das0zl";
+ };
+
+ meta = with stdenv.lib; {
+ description = "Lightweight multitabbed feature-rich X11 terminal emulator";
+ longDescription = "
+ Multitabbed lightweight terminal emulator based on rxvt.
+ Supports transparency, backgroundimages, freetype fonts, ...
+ ";
+ homepage = "https://sourceforge.net/projects/materm";
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/nimmm/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/nimmm/default.nix
new file mode 100644
index 000000000000..383057ca6551
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/nimmm/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, fetchFromGitHub, nim, termbox, pcre }:
+
+let
+ noise = fetchFromGitHub {
+ owner = "jangko";
+ repo = "nim-noise";
+ rev = "db1e86e312413e4348fa82c02340784316a89cc1";
+ sha256 = "0n9l2dww5smrsl1xfqxjnxz3f1srb72lc1wl3pdvs6xfyf44qzlh";
+ };
+
+ nimbox = fetchFromGitHub {
+ owner = "dom96";
+ repo = "nimbox";
+ rev = "6a56e76c01481176f16ae29b7d7c526bd83f229b";
+ sha256 = "15x1sdfxa1xcqnr68705jfnlv83lm0xnp2z9iz3pgc4bz5vwn4x1";
+ };
+
+ lscolors = fetchFromGitHub {
+ owner = "joachimschmidt557";
+ repo = "nim-lscolors";
+ rev = "v0.3.3";
+ sha256 = "0526hqh46lcfsvymb67ldsc8xbfn24vicn3b8wrqnh6mag8wynf4";
+ };
+
+in stdenv.mkDerivation rec {
+ pname = "nimmm";
+ version = "0.1.2";
+
+ src = fetchFromGitHub {
+ owner = "joachimschmidt557";
+ repo = "nimmm";
+ rev = "v${version}";
+ sha256 = "1zpq181iz6g7yfi298gjwv33b89l4fpnkjprimykah7py5cpw67w";
+ };
+
+ nativeBuildInputs = [ nim ];
+ buildInputs = [ termbox pcre ];
+
+ buildPhase = ''
+ export HOME=$TMPDIR;
+ nim -p:${noise} -p:${nimbox} -p:${lscolors}/src c -d:release src/nimmm.nim
+ '';
+
+ installPhase = ''
+ install -Dt $out/bin src/nimmm
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Terminal file manager written in nim";
+ homepage = "https://github.com/joachimschmidt557/nimmm";
+ license = licenses.gpl3;
+ platforms = platforms.unix;
+ maintainers = [ maintainers.joachimschmidt557 ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/roxterm/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/roxterm/default.nix
new file mode 100644
index 000000000000..88ff0dc460ec
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/roxterm/default.nix
@@ -0,0 +1,47 @@
+{ at-spi2-core, cmake, dbus, dbus-glib, docbook_xsl, epoxy, fetchpatch, fetchFromGitHub
+, glib, gtk3, harfbuzz, libXdmcp, libXtst, libpthreadstubs
+, libselinux, libsepol, libtasn1, libxkbcommon, libxslt, p11-kit, pcre2
+, pkgconfig, stdenv, util-linuxMinimal, vte, wrapGAppsHook, xmlto
+}:
+
+stdenv.mkDerivation rec {
+ pname = "roxterm";
+ version = "3.7.5";
+
+ src = fetchFromGitHub {
+ owner = "realh";
+ repo = "roxterm";
+ rev = version;
+ sha256 = "042hchvgk9jzz035zsgnfhh8105zvspbzz6b78waylsdlgqn0pp1";
+ };
+
+ patches = [
+ # This is the commit directly after v3.7.5. It is needed to get roxterm to
+ # build correctly. It can be removed when v3.7.6 (or v3.8.0) has been
+ # released.
+ (fetchpatch {
+ url = "https://github.com/realh/roxterm/commit/f7c38fd48bd1810e16d82794bdfb61a9760a2fe1.patch";
+ sha256 = "1v77b7ilgf8zy1npxxcyc06mq6lck6bi6lw4aksnq3mi61n5znmx";
+ })
+ ];
+
+ nativeBuildInputs = [ cmake pkgconfig wrapGAppsHook libxslt ];
+
+ buildInputs =
+ [ gtk3 dbus dbus-glib vte pcre2 harfbuzz libpthreadstubs libXdmcp
+ util-linuxMinimal glib docbook_xsl xmlto libselinux
+ libsepol libxkbcommon epoxy at-spi2-core libXtst libtasn1 p11-kit
+ ];
+
+ meta = with stdenv.lib; {
+ homepage = "https://github.com/realh/roxterm";
+ license = licenses.gpl3;
+ description = "Tabbed, VTE-based terminal emulator";
+ longDescription = ''
+ Tabbed, VTE-based terminal emulator. Similar to gnome-terminal without
+ the dependencies on Gnome.
+ '';
+ maintainers = with maintainers; [ cdepillabout ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/default.nix
new file mode 100644
index 000000000000..74bfbe83e91f
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/default.nix
@@ -0,0 +1,22 @@
+{ 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 { };
+
+ resize-font = callPackage ./urxvt-resize-font { };
+
+ tabbedex = callPackage ./urxvt-tabbedex { };
+
+ theme-switch = callPackage ./urxvt-theme-switch { };
+
+ vtwheel = callPackage ./urxvt-vtwheel { };
+
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-autocomplete-all-the-things/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-autocomplete-all-the-things/default.nix
new file mode 100644
index 000000000000..a4e03fa347f0
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/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/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-bidi/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-bidi/default.nix
new file mode 100644
index 000000000000..4b6b4eb8184c
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/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/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-font-size/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-font-size/default.nix
new file mode 100644
index 000000000000..f81709b97390
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/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/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-perl/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-perl/default.nix
new file mode 100644
index 000000000000..0c95acd72057
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/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/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-perls/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-perls/default.nix
new file mode 100644
index 000000000000..53bb938c3330
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-perls/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+ pname = "urxvt-perls";
+ version = "2.3";
+
+ src = fetchFromGitHub {
+ owner = "muennich";
+ repo = "urxvt-perls";
+ rev = version;
+ sha256 = "0xvwfw7965ghhd9g6rl6y6fgpd444l46rjqmlgg0rfjypbh6c0p1";
+ };
+
+ installPhase = ''
+ mkdir -p $out/lib/urxvt/perl
+ cp keyboard-select $out/lib/urxvt/perl
+ cp deprecated/clipboard \
+ deprecated/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/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-resize-font/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-resize-font/default.nix
new file mode 100644
index 000000000000..a056e603f004
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/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;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-tabbedex/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-tabbedex/default.nix
new file mode 100644
index 000000000000..71a55f9293c6
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/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/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-theme-switch/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-theme-switch/default.nix
new file mode 100644
index 000000000000..5a84a9b472a5
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/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/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-vtwheel/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode-plugins/urxvt-vtwheel/default.nix
new file mode 100644
index 000000000000..eb520f38bedb
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/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;
+ };
+
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/default.nix
new file mode 100644
index 000000000000..6512f402ffbd
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/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/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/patches/256-color-resources.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/patches/256-color-resources.patch
new file mode 100644
index 000000000000..c8d2acfbdc51
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/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/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/patches/9.06-font-width.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/patches/9.06-font-width.patch
new file mode 100644
index 000000000000..636083218fa5
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/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/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/patches/makefile-phony.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/patches/makefile-phony.patch
new file mode 100644
index 000000000000..5e42e17c156a
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/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/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/wrapper.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/wrapper.nix
new file mode 100644
index 000000000000..b03acb99530a
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt-unicode/wrapper.nix
@@ -0,0 +1,58 @@
+{ callPackage
+, symlinkJoin
+, makeWrapper
+, lib
+, rxvt-unicode-unwrapped
+, rxvt-unicode-plugins
+, perlPackages
+, configure ? { availablePlugins, ... }:
+ { plugins = builtins.attrValues availablePlugins;
+ extraDeps = [ ];
+ perlDeps = [ ];
+ }
+}:
+
+let
+ 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 they 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 mkPerlDeps 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 { inherit configure; }
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt/default.nix
new file mode 100644
index 000000000000..c71973da13be
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/rxvt/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl
+, pkgconfig, libtool
+, libX11, libXt, libXpm }:
+
+stdenv.mkDerivation rec {
+ pname = "rxvt";
+ version = "2.7.10";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/rxvt/${pname}-${version}.tar.gz";
+ sha256 = "0jfl71gz3k7zh3kxdb8lxi06kajjnx7bq1rxjgk680l209jxask1";
+ };
+
+ nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [ libtool libX11 libXt libXpm ];
+
+ configurePhase = ''
+ LIBTOOL=${libtool}/bin/libtool ./configure --prefix=$out --enable-everything --enable-smart-resize --enable-256-color
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "http://rxvt.sourceforge.net/";
+ description = "Colour vt102 terminal emulator with less features and lower memory consumption";
+ longDescription = ''
+ rxvt (acronym for our extended virtual terminal) is a terminal
+ emulator for the X Window System, originally written by Rob Nation
+ as an extended version of the older xvt terminal by John Bovey of
+ University of Kent. Mark Olesen extensively modified it later and
+ took over maintenance for several years.
+
+ rxvt is intended to be a slimmed-down alternate for xterm,
+ omitting some of its little-used features, like Tektronix 4014
+ emulation and toolkit-style configurability.
+ '';
+ maintainers = with maintainers; [ AndersonTorres ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/sakura/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/sakura/default.nix
new file mode 100644
index 000000000000..7cccec3b72fc
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/sakura/default.nix
@@ -0,0 +1,50 @@
+{ stdenv
+, fetchurl
+, cmake
+, pkgconfig
+, gtk3
+, perl
+, vte
+, pcre2
+, glib
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+ pname = "sakura";
+ version = "3.7.1";
+
+ src = fetchurl {
+ url = "https://launchpad.net/${pname}/trunk/${version}/+download/${pname}-${version}.tar.bz2";
+ sha256 = "sha256-cppODnUKQpS9kFkkOqxU3yqAElAVn8VQtQsP4Carkos=";
+ };
+
+ nativeBuildInputs = [ cmake perl pkgconfig makeWrapper ];
+
+ buildInputs = [ gtk3 vte pcre2 glib ];
+
+ # Set path to gsettings-schemata so sakura knows
+ # where to find colorchooser, fontchooser etc.
+ postInstall = ''
+ wrapProgram $out/bin/sakura \
+ --suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "https://www.pleyades.net/david/projects/sakura";
+ description = "A terminal emulator based on GTK and VTE";
+ longDescription = ''
+ sakura is a terminal emulator based on GTK and VTE. It's a terminal
+ emulator with few dependencies, so you don't need a full GNOME desktop
+ installed to have a decent terminal emulator. Current terminal emulators
+ based on VTE are gnome-terminal, XFCE Terminal, TermIt and a small
+ sample program included in the vte sources. The differences between
+ sakura and the last one are that it uses a notebook to provide several
+ terminals in one window and adds a contextual menu with some basic
+ options. No more no less.
+ '';
+ license = licenses.gpl2Only;
+ maintainers = with maintainers; [ astsmtl codyopel AndersonTorres ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/st/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/st/default.nix
new file mode 100644
index 000000000000..a91229f2921e
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/st/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, pkgconfig, writeText, libX11, ncurses
+, libXft, conf ? null, patches ? [], extraLibs ? []}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+ pname = "st";
+ version = "0.8.4";
+
+ src = fetchurl {
+ url = "https://dl.suckless.org/st/${pname}-${version}.tar.gz";
+ sha256 = "19j66fhckihbg30ypngvqc9bcva47mp379ch5vinasjdxgn3qbfl";
+ };
+
+ inherit patches;
+
+ configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
+
+ postPatch = optionalString (conf!=null) "cp ${configFile} config.def.h"
+ + optionalString stdenv.isDarwin ''
+ substituteInPlace config.mk --replace "-lrt" ""
+ '';
+
+ nativeBuildInputs = [ pkgconfig ncurses ];
+ buildInputs = [ libX11 libXft ] ++ extraLibs;
+
+ installPhase = ''
+ TERMINFO=$out/share/terminfo make install PREFIX=$out
+ '';
+
+ meta = {
+ homepage = "https://st.suckless.org/";
+ description = "Simple Terminal for X from Suckless.org Community";
+ license = licenses.mit;
+ maintainers = with maintainers; [ andsild ];
+ platforms = platforms.linux ++ platforms.darwin;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/st/xst.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/st/xst.nix
new file mode 100644
index 000000000000..3e29abee5d65
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/st/xst.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, pkgconfig, libX11, ncurses, libXext, libXft, fontconfig }:
+
+with stdenv.lib;
+
+let
+ version = "0.7.2";
+ name = "xst-${version}";
+in stdenv.mkDerivation {
+ inherit name;
+
+ src = fetchFromGitHub {
+ owner = "gnotclub";
+ repo = "xst";
+ rev = "v${version}";
+ sha256 = "1fplgy30gyrwkjsw3z947327r98i13zd1whwkplpj9fzckhb9vs9";
+ };
+
+ nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [ libX11 ncurses libXext libXft fontconfig ];
+
+ installPhase = ''
+ TERMINFO=$out/share/terminfo make install PREFIX=$out
+ '';
+
+ meta = {
+ homepage = "https://github.com/neeasade/xst";
+ description = "Simple terminal fork that can load config from Xresources";
+ license = licenses.mit;
+ maintainers = [ maintainers.vyp ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/stupidterm/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/stupidterm/default.nix
new file mode 100644
index 000000000000..2016059d81e7
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/stupidterm/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, pkgconfig, vte, gtk, pcre2 }:
+
+stdenv.mkDerivation {
+ pname = "stupidterm";
+ version = "2019-03-26";
+
+ nativeBuildInputs = [ pkgconfig ];
+
+ buildInputs = [ vte gtk pcre2 ];
+
+ src = fetchFromGitHub {
+ owner = "esmil";
+ repo = "stupidterm";
+ rev = "f824e41c2ca9016db73556c5d2f5a2861e235c8e";
+ sha256 = "1f73wvqqvj5pr3fvb7jjc4bi1iwgkkknz24k8n69mdb75jnfjipp";
+ };
+
+ makeFlags = [ "PKGCONFIG=${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config" "binary=stupidterm" ];
+
+ installPhase = ''
+ install -D stupidterm $out/bin/stupidterm
+ install -D -m 644 stupidterm.desktop $out/share/applications/stupidterm.desktop
+ install -D -m 644 stupidterm.ini $out/share/stupidterm/stupidterm.ini
+
+ substituteInPlace $out/share/applications/stupidterm.desktop \
+ --replace "Exec=st" "Exec=$out/bin/stupidterm"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Simple wrapper around the VTE terminal emulator widget for GTK";
+ homepage = "https://github.com/esmil/stupidterm";
+ license = licenses.lgpl3Plus;
+ maintainers = [ maintainers.etu ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/terminator/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/terminator/default.nix
new file mode 100644
index 000000000000..5de8109e3a4d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/terminator/default.nix
@@ -0,0 +1,77 @@
+{ stdenv
+, fetchFromGitHub
+, python3
+, keybinder3
+, intltool
+, file
+, gtk3
+, gobject-introspection
+, libnotify
+, wrapGAppsHook
+, vte
+}:
+
+python3.pkgs.buildPythonApplication rec {
+ pname = "terminator";
+ version = "1.92";
+
+ src = fetchFromGitHub {
+ owner = "gnome-terminator";
+ repo = "terminator";
+ rev = "v${version}";
+ sha256 = "105f660wzf9cpn24xzwaaa09igg5h3qhchafv190v5nqck6g1ssh";
+ };
+
+ nativeBuildInputs = [
+ file
+ intltool
+ gobject-introspection
+ wrapGAppsHook
+ ];
+
+ buildInputs = [
+ gtk3
+ gobject-introspection # Temporary fix, see https://github.com/NixOS/nixpkgs/issues/56943
+ keybinder3
+ libnotify
+ python3
+ vte
+ ];
+
+ propagatedBuildInputs = with python3.pkgs; [
+ configobj
+ dbus-python
+ pygobject3
+ psutil
+ pycairo
+ ];
+
+ postPatch = ''
+ patchShebangs run_tests tests po
+ # dbus-python is correctly passed in propagatedBuildInputs, but for some reason setup.py complains.
+ # The wrapped terminator has the correct path added, so ignore this.
+ substituteInPlace setup.py --replace "'dbus-python'," ""
+ '';
+
+ checkPhase = ''
+ runHook preCheck
+
+ ./run_tests
+
+ runHook postCheck
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Terminal emulator with support for tiling and tabs";
+ longDescription = ''
+ The goal of this project is to produce a useful tool for arranging
+ terminals. It is inspired by programs such as gnome-multi-term,
+ quadkonsole, etc. in that the main focus is arranging terminals in grids
+ (tabs is the most common default method, which Terminator also supports).
+ '';
+ homepage = "https://github.com/gnome-terminator/terminator";
+ license = licenses.gpl2;
+ maintainers = with maintainers; [ bjornfor ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/terminus/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/terminus/default.nix
new file mode 100644
index 000000000000..4c38e530247e
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/terminus/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, lib, fetchurl, dpkg, gnome2, gtk2, atk, glib, pango, gdk-pixbuf, cairo
+, freetype, fontconfig, dbus, libXi, libXcursor, libXdamage, libXrandr
+, libXcomposite, libXext, libXfixes, libXrender, libX11, libXtst, libXScrnSaver
+, libxcb, makeWrapper, nodejs
+, nss, nspr, alsaLib, cups, expat, systemd, libpulseaudio }:
+
+let
+ libPath = stdenv.lib.makeLibraryPath [
+ stdenv.cc.cc gtk2 atk glib pango gdk-pixbuf cairo freetype fontconfig dbus
+ libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes libxcb
+ libXrender libX11 libXtst libXScrnSaver gnome2.GConf nss nspr alsaLib cups expat systemd libpulseaudio
+ ];
+in
+stdenv.mkDerivation rec {
+ version = "1.0.0-alpha.42";
+ pname = "terminus";
+ src = fetchurl {
+ url = "https://github.com/Eugeny/terminus/releases/download/v${version}/terminus_${version}_amd64.deb";
+ sha256 = "1r5n75n71zwahg4rxlnf9qzrb0651gxv0987m6bykqmfpnw91nmb";
+ };
+ buildInputs = [ dpkg makeWrapper ];
+ unpackPhase = ''
+ mkdir pkg
+ dpkg-deb -x $src pkg
+ sourceRoot=pkg
+ '';
+ installPhase = ''
+ mkdir -p "$out/bin"
+ mv opt "$out/"
+ ln -s "$out/opt/Terminus/terminus" "$out/bin/terminus"
+ patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${libPath}:\$ORIGIN" "$out/opt/Terminus/terminus"
+ mv usr/* "$out/"
+ wrapProgram $out/bin/terminus --prefix PATH : ${lib.makeBinPath [ nodejs ]}
+ '';
+ dontPatchELF = true;
+ meta = with lib; {
+ description = "A terminal for a more modern age";
+ homepage = "https://eugeny.github.io/terminus/";
+ maintainers = with maintainers; [ jlesquembre ];
+ license = licenses.mit;
+ platforms = [ "x86_64-linux" ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/add_errno_header.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/add_errno_header.patch
new file mode 100644
index 000000000000..81283f86a21d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/add_errno_header.patch
@@ -0,0 +1,24 @@
+From 95c90f302c384f410dc92e64468ac7061b57fe2d Mon Sep 17 00:00:00 2001
+From: Michael Hoang <enzime@users.noreply.github.com>
+Date: Fri, 13 Jul 2018 19:03:09 +1000
+Subject: [PATCH] Add errno.h header which isn't always included automatically.
+
+---
+ termite.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/termite.cc b/termite.cc
+index 160fe82..13e2572 100644
+--- a/termite.cc
++++ b/termite.cc
+@@ -21,6 +21,7 @@
+ #include <cstdlib>
+ #include <cstring>
+ #include <cmath>
++#include <errno.h>
+ #include <functional>
+ #include <limits>
+ #include <map>
+--
+2.17.1
+
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/default.nix
new file mode 100644
index 000000000000..2f991ca1c7e6
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/default.nix
@@ -0,0 +1,77 @@
+{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, vte, gtk3, ncurses, pcre2, wrapGAppsHook }:
+
+let
+
+ # termite requires VTE with some internals exposed
+ # https://github.com/thestinger/vte-ng
+ #
+ # three of the patches have been locally modified to cleanly apply on 0.62
+ vte-ng = vte.overrideAttrs (attrs: {
+ patches = attrs.patches or [] ++ [
+ (fetchpatch {
+ name = "0001-expose-functions-for-pausing-unpausing-output.patch";
+ url = "https://github.com/thestinger/vte-ng/commit/342e26574f50dcd40bbeaad9e839c2a6144d0c1c.patch";
+ sha256 = "1b0k9ys545q85vfki417p21kis9f36yd0hyp12phayynss6fn715";
+ })
+ # Derived from https://github.com/thestinger/vte-ng/commit/5ae3acb69474fe5bc43767a4a3625e9ed23607a1.patch
+ ./vte-ng-modified-patches/vte-0002-expose-function-for-setting-cursor-position.patch
+ # Derived from https://github.com/thestinger/vte-ng/commit/742d57ecf15e24f6a5f2133a81b6c70acc8ff03c.patch
+ ./vte-ng-modified-patches/vte-0003-add-function-for-setting-the-text-selections.patch
+ (fetchpatch {
+ name = "0004-add-functions-to-get-set-block-selection-mode.patch";
+ url = "https://github.com/thestinger/vte-ng/commit/08748fd9cb82bd191e5c476b1682ca71f7732572.patch";
+ sha256 = "1cnhd8f7ywdgcyd6xmcd2nn39jjxzkxp4d0zsj2k7m5v74nhcs1g";
+ })
+ # Derived from "https://github.com/thestinger/vte-ng/commit/dd74ae7c06e8888af2fc090ac6f8920a9d8227fb.patch";
+ ./vte-ng-modified-patches/vte-0005-expose-function-for-getting-the-selected-text.patch
+ ];
+ });
+
+in stdenv.mkDerivation rec {
+ pname = "termite";
+ version = "15";
+
+ src = fetchFromGitHub {
+ owner = "thestinger";
+ repo = "termite";
+ rev = "v${version}";
+ sha256 = "0hp1x6lj098m3jgna274wv5dv60lnzg22297di68g4hw9djjyd2k";
+ fetchSubmodules = true;
+ };
+
+ # https://github.com/thestinger/termite/pull/516
+ patches = [ ./url_regexp_trailing.patch ./add_errno_header.patch
+ # Fix off-by-one in select_text() on libvte >= 0.55.0
+ # Expected to be included in next release (16).
+ (fetchpatch {
+ url = "https://github.com/thestinger/termite/commit/7e9a93b421b9596f8980645a46ac2ad5468dac06.patch";
+ sha256 = "0vph2m5919f7w1xnc8i6z0j44clsm1chxkfg7l71nahxyfw5yh4j";
+ })
+ ] ++ stdenv.lib.optional stdenv.isDarwin ./remove_ldflags_macos.patch;
+
+ makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
+
+ buildInputs = [ vte-ng gtk3 ncurses pcre2 ];
+
+ nativeBuildInputs = [ wrapGAppsHook pkgconfig ];
+
+ outputs = [ "out" "terminfo" ];
+
+ passthru = { inherit vte-ng; };
+
+ postInstall = ''
+ mkdir -p $terminfo/share
+ mv $out/share/terminfo $terminfo/share/terminfo
+
+ mkdir -p $out/nix-support
+ echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A simple VTE-based terminal";
+ license = licenses.lgpl2Plus;
+ homepage = "https://github.com/thestinger/termite/";
+ maintainers = with maintainers; [ koral ];
+ platforms = platforms.all;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/remove_ldflags_macos.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/remove_ldflags_macos.patch
new file mode 100644
index 000000000000..f8c68518bb4d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/remove_ldflags_macos.patch
@@ -0,0 +1,25 @@
+From 1b5a6934635c55472eb7949bd87ab3f45fa1b2f3 Mon Sep 17 00:00:00 2001
+From: Michael Hoang <enzime@users.noreply.github.com>
+Date: Fri, 13 Jul 2018 19:01:51 +1000
+Subject: [PATCH] Remove --as-needed flag from ld to fix compilation on macOS.
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index b115f42..ab301ba 100644
+--- a/Makefile
++++ b/Makefile
+@@ -29,7 +29,7 @@ ifeq (${CXX}, clang++)
+ CXXFLAGS += -Wimplicit-fallthrough
+ endif
+
+-LDFLAGS := -s -Wl,--as-needed ${LDFLAGS}
++LDFLAGS := -s -Wl ${LDFLAGS}
+ LDLIBS := ${shell pkg-config --libs ${GTK} ${VTE}}
+
+ termite: termite.cc url_regex.hh util/clamp.hh util/maybe.hh util/memory.hh
+--
+2.17.1
+
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/url_regexp_trailing.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/url_regexp_trailing.patch
new file mode 100644
index 000000000000..96deaa073d71
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/url_regexp_trailing.patch
@@ -0,0 +1,27 @@
+Based on https://github.com/thestinger/termite/pull/516
+Modified to apply to v13
+
+From 65a454ffa8e681f3f14729cba7c42e1570a85e8a Mon Sep 17 00:00:00 2001
+From: Paul Baecher <pbaecher@gmail.com>
+Date: Thu, 7 Sep 2017 22:58:51 +0200
+Subject: [PATCH] Do not match punctuation at the end of URLs
+
+Punctuation at the end of URLs is most likely part of natural language
+or markup (for example in Markdown). Do not match it as part of the URL.
+---
+ url_regex.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/url_regex.hh b/url_regex.hh
+index 2ec6be8..3039b53 100644
+--- a/url_regex.hh
++++ b/url_regex.hh
+@@ -9,7 +9,7 @@
+ #define PORT "(?:\\:[[:digit:]]{1,5})?"
+ #define SCHEME "(?:[[:alpha:]][+-.[:alnum:]]*:)"
+ #define USERPASS USERCHARS_CLASS "+(?:\\:" PASSCHARS_CLASS "+)?"
+-#define URLPATH "(?:/[[:alnum:]\\Q-_.!~*'();/?:@&=+$,#%\\E]*)?"
++#define URLPATH "(?:/[[:alnum:]\\Q-_.!~*'();/?:@&=+$,#%\\E]*(?<![\\Q.,:;()!?\\E]))?"
+
+ const char * const url_regex = SCHEME "//(?:" USERPASS "\\@)?" HOST PORT URLPATH;
+
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0002-expose-function-for-setting-cursor-position.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0002-expose-function-for-setting-cursor-position.patch
new file mode 100644
index 000000000000..8f5c0dab39ad
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0002-expose-function-for-setting-cursor-position.patch
@@ -0,0 +1,61 @@
+From 5ae3acb69474fe5bc43767a4a3625e9ed23607a1 Mon Sep 17 00:00:00 2001
+From: Jelle van der Waa <jelle@vdwaa.nl>
+Date: Sat, 13 Feb 2016 22:18:01 +0100
+Subject: [PATCH] expose function for setting cursor position
+
+---
+ src/vte/vteterminal.h | 5 +++++
+ src/vtegtk.cc | 24 ++++++++++++++++++++++++
+ 2 files changed, 29 insertions(+)
+
+diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
+index a607e5da..9701320d 100644
+--- a/src/vte/vteterminal.h
++++ b/src/vte/vteterminal.h
+@@ -378,6 +378,11 @@ _VTE_PUBLIC
+ void vte_terminal_get_cursor_position(VteTerminal *terminal,
+ glong *column,
+ glong *row) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
++_VTE_PUBLIC
++void vte_terminal_set_cursor_position(VteTerminal *terminal,
++ glong column,
++ glong row) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
++
+
+ _VTE_PUBLIC
+ char *vte_terminal_hyperlink_check_event(VteTerminal *terminal,
+diff --git a/src/vtegtk.cc b/src/vtegtk.cc
+index b11b780b..bdf36eac 100644
+--- a/src/vtegtk.cc
++++ b/src/vtegtk.cc
+@@ -2415,6 +2415,30 @@ vte_terminal_get_cursor_position(VteTerminal *terminal,
+ }
+ }
+
++/**
++ * vte_terminal_set_cursor_position
++ * @terminal: a #VteTerminal
++ * @column: the new cursor column
++ * @row: the new cursor row
++ *
++ * Set the location of the cursor.
++ */
++void
++vte_terminal_set_cursor_position(VteTerminal *terminal,
++ long column, long row) noexcept
++{
++ g_return_if_fail(VTE_IS_TERMINAL(terminal));
++
++ auto impl = IMPL(terminal);
++ impl->invalidate_cursor_once(FALSE);
++ impl->m_screen->cursor.col = column;
++ impl->m_screen->cursor.row = row;
++ impl->invalidate_cursor_once(FALSE);
++ impl->check_cursor_blink();
++ impl->queue_cursor_moved();
++
++}
++
+ /**
+ * vte_terminal_pty_new_sync:
+ * @terminal: a #VteTerminal
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0003-add-function-for-setting-the-text-selections.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0003-add-function-for-setting-the-text-selections.patch
new file mode 100644
index 000000000000..203228dae34d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0003-add-function-for-setting-the-text-selections.patch
@@ -0,0 +1,56 @@
+From 742d57ecf15e24f6a5f2133a81b6c70acc8ff03c Mon Sep 17 00:00:00 2001
+From: Jelle van der Waa <jelle@vdwaa.nl>
+Date: Sat, 13 Feb 2016 22:25:19 +0100
+Subject: [PATCH] add function for setting the text selections
+
+---
+ src/vte/vteterminal.h | 4 ++++
+ src/vtegtk.cc | 20 ++++++++++++++++++++
+ 2 files changed, 24 insertions(+)
+
+diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
+index 9701320d..a11b4cb7 100644
+--- a/src/vte/vteterminal.h
++++ b/src/vte/vteterminal.h
+@@ -196,6 +196,10 @@ _VTE_PUBLIC
+ void vte_terminal_select_all(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
+ _VTE_PUBLIC
+ void vte_terminal_unselect_all(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
++_VTE_PUBLIC
++void vte_terminal_select_text(VteTerminal *terminal, long start_col, long start_row,
++ long end_col, long end_row) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
++
+
+ /* By-word selection */
+ _VTE_PUBLIC
+diff --git a/src/vtegtk.cc b/src/vtegtk.cc
+index bdf36eac..d9e9f2ed 100644
+--- a/src/vtegtk.cc
++++ b/src/vtegtk.cc
+@@ -2390,6 +2390,26 @@ vte_terminal_unselect_all(VteTerminal *terminal)
+ IMPL(terminal)->deselect_all();
+ }
+
++/**
++ * vte_terminal_select_text:
++ * @terminal: a #VteTerminal
++ * @start_col: the starting column for the selection
++ * @start_row: the starting row for the selection
++ * @end_col: the end column for the selection
++ * @end_row: the end row for the selection
++ *
++ * Sets the current selection region.
++ */
++void
++vte_terminal_select_text(VteTerminal *terminal,
++ long start_col, long start_row,
++ long end_col, long end_row) noexcept
++{
++ g_return_if_fail (VTE_IS_TERMINAL (terminal));
++
++ IMPL(terminal)->select_text(start_col, start_row, end_col, end_row);
++}
++
+ /**
+ * vte_terminal_get_cursor_position:
+ * @terminal: a #VteTerminal
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0005-expose-function-for-getting-the-selected-text.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0005-expose-function-for-getting-the-selected-text.patch
new file mode 100644
index 000000000000..0a2c52722268
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/vte-ng-modified-patches/vte-0005-expose-function-for-getting-the-selected-text.patch
@@ -0,0 +1,29 @@
+--- a/src/vte/vteterminal.h
++++ b/src/vte/vteterminal.h
+@@ -204,7 +204,9 @@
+ _VTE_PUBLIC
+ void vte_terminal_select_text(VteTerminal *terminal, long start_col, long start_row,
+ long end_col, long end_row) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
+-
++_VTE_PUBLIC
++char *
++vte_terminal_get_selection(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1);
+
+ /* By-word selection */
+ _VTE_PUBLIC
+--- a/src/vtegtk.cc
++++ b/src/vtegtk.cc
+@@ -2435,6 +2435,13 @@
+ IMPL(terminal)->select_text(start_col, start_row, end_col, end_row);
+ }
+
++char *
++vte_terminal_get_selection(VteTerminal *terminal) noexcept
++{
++ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), NULL);
++ return g_strdup (IMPL(terminal)->m_selection[VTE_SELECTION_PRIMARY]->str);
++}
++
+ /**
+ * vte_terminal_get_cursor_position:
+ * @terminal: a #VteTerminal
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/wrapper.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/wrapper.nix
new file mode 100644
index 000000000000..379223d9076d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termite/wrapper.nix
@@ -0,0 +1,15 @@
+{ makeWrapper, symlinkJoin, configFile ? null, termite }:
+
+if configFile == null then termite else symlinkJoin {
+ name = "termite-with-config-${termite.version}";
+
+ paths = [ termite ];
+ nativeBuildInputs = [ makeWrapper ];
+
+ postBuild = ''
+ wrapProgram $out/bin/termite \
+ --add-flags "--config ${configFile}"
+ '';
+
+ passthru.terminfo = termite.terminfo;
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termonad/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termonad/default.nix
new file mode 100644
index 000000000000..4388cbcfb441
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/termonad/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, ghcWithPackages, makeWrapper, packages ? (pkgSet: []) }:
+
+let
+ termonadEnv = ghcWithPackages (self: [ self.termonad ] ++ packages self);
+in stdenv.mkDerivation {
+ name = "termonad-with-packages-${termonadEnv.version}";
+
+ nativeBuildInputs = [ makeWrapper ];
+
+ buildCommand = ''
+ mkdir -p $out/bin $out/share
+ makeWrapper ${termonadEnv}/bin/termonad $out/bin/termonad \
+ --set NIX_GHC "${termonadEnv}/bin/ghc"
+ '';
+
+ # trivial derivation
+ preferLocalBuild = true;
+ allowSubstitutes = false;
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/tilda/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/tilda/default.nix
new file mode 100644
index 000000000000..0a672b039f6b
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/tilda/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchFromGitHub, pkgconfig
+, autoreconfHook, gettext, expat, pcre2
+, libconfuse, vte, gtk
+, makeWrapper }:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+
+ pname = "tilda";
+ version = "1.5.2";
+
+ src = fetchFromGitHub {
+ owner = "lanoxx";
+ repo = "tilda";
+ rev = "${pname}-${version}";
+ sha256 = "0psq0f4s0s92bba6wwcf6b0j7i59b76svqxhvpavwv53yvhmmamn";
+ };
+
+ nativeBuildInputs = [ autoreconfHook makeWrapper pkgconfig ];
+ buildInputs = [ gettext pcre2 libconfuse vte gtk ];
+
+ LD_LIBRARY_PATH = "${expat.out}/lib"; # ugly hack for xgettext to work during build
+
+ # The config locking scheme relies on the binary being called "tilda",
+ # (`pgrep -C tilda`), so a simple `wrapProgram` won't suffice:
+ postInstall = ''
+ mkdir $out/bin/wrapped
+ mv "$out/bin/tilda" "$out/bin/wrapped/tilda"
+ makeWrapper "$out/bin/wrapped/tilda" "$out/bin/tilda" \
+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
+ '';
+
+ meta = {
+ description = "A Gtk based drop down terminal for Linux and Unix";
+ homepage = "https://github.com/lanoxx/tilda/";
+ license = licenses.gpl3;
+ maintainers = [ maintainers.AndersonTorres ];
+ platforms = platforms.linux;
+ };
+}
+
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/tilix/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/tilix/default.nix
new file mode 100644
index 000000000000..4707685e3dab
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/tilix/default.nix
@@ -0,0 +1,74 @@
+{ stdenv
+, fetchFromGitHub
+, fetchpatch
+, meson
+, ninja
+, python3
+, pkgconfig
+, dmd
+, dconf
+, dbus
+, gsettings-desktop-schemas
+, desktop-file-utils
+, gettext
+, gtkd
+, libsecret
+, glib
+, wrapGAppsHook
+, libunwind
+}:
+
+stdenv.mkDerivation {
+ pname = "tilix";
+ version = "unstable-2019-10-02";
+
+ src = fetchFromGitHub {
+ owner = "gnunn1";
+ repo = "tilix";
+ rev = "ffcd31e3c0e1a560ce89468152d8726065e8fb1f";
+ sha256 = "1bzv7xiqhyblz1rw8ln4zpspmml49vnshn1zsv9di5q7kfgpqrgq";
+ };
+
+ # Default upstream else LDC fails to link
+ mesonBuildType = [
+ "debugoptimized"
+ ];
+
+ nativeBuildInputs = [
+ desktop-file-utils
+ dmd
+ meson
+ ninja
+ pkgconfig
+ python3
+ wrapGAppsHook
+ ];
+
+ buildInputs = [
+ dbus
+ gettext
+ dconf
+ gsettings-desktop-schemas
+ gtkd
+ libsecret
+ libunwind
+ ];
+
+ postPatch = ''
+ chmod +x meson_post_install.py
+ patchShebangs meson_post_install.py
+ '';
+
+ preFixup = ''
+ substituteInPlace $out/share/applications/com.gexperts.Tilix.desktop \
+ --replace "Exec=tilix" "Exec=$out/bin/tilix"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Tiling terminal emulator following the Gnome Human Interface Guidelines";
+ homepage = "https://gnunn1.github.io/tilix-web";
+ license = licenses.mpl20;
+ maintainers = with maintainers; [ midchildan worldofpeace ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/wayst/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/wayst/default.nix
new file mode 100644
index 000000000000..99ee326aebf2
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/wayst/default.nix
@@ -0,0 +1,91 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, pkgconfig
+, freetype
+, fontconfig
+, libGL
+, libX11
+, libXrandr
+, libxcb
+, libxkbcommon
+, utf8proc
+, wayland
+
+, libnotify
+, xdg_utils
+, makeDesktopItem
+}:
+
+let
+ desktopItem = makeDesktopItem {
+ desktopName = "Wayst";
+ name = "wayst";
+ exec = "wayst";
+ icon = "wayst";
+ terminal = "false";
+ categories = "System;TerminalEmulator";
+ comment = "A simple terminal emulator";
+ extraEntries = ''
+ GenericName=Terminal
+ Keywords=wayst;terminal;
+ '';
+ };
+in
+stdenv.mkDerivation rec {
+ pname = "wayst";
+ version = "unstable-2020-10-12";
+
+ src = fetchFromGitHub {
+ owner = "91861";
+ repo = pname;
+ rev = "b8c7ca00a785a748026ed1ba08bf3d19916ced18";
+ hash = "sha256-wHAU1yxukxApzhLLLctZ/AYqF7t21HQc5omPBZyxra0=";
+ };
+
+ makeFlags = [ "INSTALL_DIR=\${out}/bin" ];
+
+ nativeBuildInputs = [ pkgconfig ];
+
+ buildInputs = [
+ fontconfig
+ libX11
+ freetype
+ libGL
+ libxcb
+ libxkbcommon
+ libXrandr
+ utf8proc
+ wayland
+ ];
+
+ # This patch forces the Makefile to use utf8proc
+ # The makefile relies on ldconfig to find the utf8proc libraries
+ # which is not possible on nixpkgs
+ patches = [ ./utf8proc.patch ];
+
+ postPatch = ''
+ substituteInPlace src/settings.c \
+ --replace xdg-open ${xdg_utils}/bin/xdg-open
+ substituteInPlace src/main.c \
+ --replace notify-send ${libnotify}/bin/notify-send
+ '';
+
+ preInstall = ''
+ mkdir -p $out/bin
+ '';
+
+ postInstall = ''
+ mkdir -p $out/share/applications
+ ln -s ${desktopItem}/share/applications/* $out/share/applications
+ install -D icons/wayst.svg $out/share/icons/hicolor/scalable/apps/wayst.svg
+ '';
+
+ meta = with lib; {
+ description = "A simple terminal emulator";
+ homepage = "https://github.com/91861/wayst";
+ license = licenses.mit;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ berbiche ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/wayst/utf8proc.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/wayst/utf8proc.patch
new file mode 100644
index 000000000000..0923c5dbe18d
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/wayst/utf8proc.patch
@@ -0,0 +1,24 @@
+commit caa5a6bed31937f2d1b322da204e11eae57a720f
+Author: Nicolas Berbiche <nicolas@normie.dev>
+Date: Tue Oct 20 18:14:44 2020 -0400
+
+ PATCH: use nixpkgs utf8proc
+
+ This patch forces the Makefile to use utf8proc from `buildInputs`.
+ The Makefile relies on ldconfig to find the utf8proc libraries,
+ which is not possible with nixpkgs.
+
+diff --git a/Makefile b/Makefile
+index caccdf7..90b11ea 100644
+--- a/Makefile
++++ b/Makefile
+@@ -29,7 +29,7 @@ else
+ LDFLAGS = -O2 -flto
+ endif
+
+-ifeq ($(shell ldconfig -p | grep libutf8proc.so > /dev/null || echo fail),fail)
++ifeq (false,fail)
+ $(info libutf8proc not found. Support for language-specific combining characters and unicode normalization will be disabled.)
+ CFLAGS += -DNOUTF8PROC
+ else
+
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/x3270/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/x3270/default.nix
new file mode 100644
index 000000000000..747d26538764
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/x3270/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchurl, openssl, m4, expat
+, libX11, libXt, libXaw, libXmu, bdftopcf, mkfontdir
+, fontadobe100dpi, fontadobeutopia100dpi, fontbh100dpi
+, fontbhlucidatypewriter100dpi, fontbitstream100dpi
+, tcl
+, ncurses }:
+
+let
+ majorVersion = "4";
+ minorVersion = "0";
+ versionSuffix = "ga9";
+in stdenv.mkDerivation rec {
+ pname = "x3270";
+ version = "${majorVersion}.${minorVersion}${versionSuffix}";
+
+ src = fetchurl {
+ url = "http://x3270.bgp.nu/download/0${majorVersion}.0${minorVersion}/suite3270-${version}-src.tgz";
+ sha256 = "0km24rgll0s4ji6iz8lvy5ra76ds162s95y33w5px6697cwqkp9j";
+ };
+
+ buildFlags = "unix";
+
+ postConfigure = ''
+ pushd c3270 ; ./configure ; popd
+ '';
+
+ nativeBuildInputs = [ m4 ];
+ buildInputs = [
+ expat
+ libX11 libXt libXaw libXmu bdftopcf mkfontdir
+ fontadobe100dpi fontadobeutopia100dpi fontbh100dpi
+ fontbhlucidatypewriter100dpi fontbitstream100dpi
+ tcl
+ ncurses
+ expat
+ ];
+
+ meta = with stdenv.lib; {
+ description = "IBM 3270 terminal emulator for the X Window System";
+ homepage = "http://x3270.bgp.nu/index.html";
+ license = licenses.bsd3;
+ maintainers = [ maintainers.anna328p ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/xterm/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/xterm/default.nix
new file mode 100644
index 000000000000..1ec704f5d438
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/xterm/default.nix
@@ -0,0 +1,119 @@
+{ stdenv, fetchurl, fetchpatch, xorg, ncurses, freetype, fontconfig, pkgconfig
+, makeWrapper, nixosTests, writeScript, common-updater-scripts, git, nixfmt, nix
+, gnused, coreutils, enableDecLocator ? true }:
+
+stdenv.mkDerivation rec {
+ pname = "xterm";
+ version = "362";
+
+ src = fetchurl {
+ urls = [
+ "ftp://ftp.invisible-island.net/xterm/${pname}-${version}.tgz"
+ "https://invisible-mirror.net/archives/xterm/${pname}-${version}.tgz"
+ ];
+ sha256 = "HU/+Im+o8CGFm7wwB3iP9jpGoxJC2b2ae9fr4k6BrKI=";
+ };
+
+ buildInputs = [
+ xorg.libXaw
+ xorg.xorgproto
+ xorg.libXt
+ xorg.libXext
+ xorg.libX11
+ xorg.libSM
+ xorg.libICE
+ ncurses
+ freetype
+ fontconfig
+ pkgconfig
+ xorg.libXft
+ xorg.luit
+ makeWrapper
+ ];
+
+ patches = [ ./sixel-256.support.patch ]
+ ++ stdenv.lib.optional stdenv.hostPlatform.isMusl (fetchpatch {
+ name = "posix-ptys.patch";
+ url =
+ "https://git.alpinelinux.org/aports/plain/community/xterm/posix-ptys.patch?id=3aa532e77875fa1db18c7fcb938b16647031bcc1";
+ sha256 = "0czgnsxkkmkrk1idw69qxbprh0jb4sw3c24zpnqq2v76jkl7zvlr";
+ });
+
+ configureFlags = [
+ "--enable-wide-chars"
+ "--enable-256-color"
+ "--enable-sixel-graphics"
+ "--enable-regis-graphics"
+ "--enable-load-vt-fonts"
+ "--enable-i18n"
+ "--enable-doublechars"
+ "--enable-luit"
+ "--enable-mini-luit"
+ "--with-tty-group=tty"
+ "--with-app-defaults=$(out)/lib/X11/app-defaults"
+ ] ++ stdenv.lib.optional enableDecLocator "--enable-dec-locator";
+
+ # Work around broken "plink.sh".
+ NIX_LDFLAGS = "-lXmu -lXt -lICE -lX11 -lfontconfig";
+
+ # Hack to get xterm built with the feature of releasing a possible setgid of 'utmp',
+ # decided by the sysadmin to allow the xterm reporting to /var/run/utmp
+ # If we used the configure option, that would have affected the xterm installation,
+ # (setgid with the given group set), and at build time the environment even doesn't have
+ # groups, and the builder will end up removing any setgid.
+ postConfigure = ''
+ echo '#define USE_UTMP_SETGID 1'
+ '';
+
+ postInstall = ''
+ for bin in $out/bin/*; do
+ wrapProgram $bin --set XAPPLRESDIR $out/lib/X11/app-defaults/
+ done
+
+ install -D -t $out/share/applications xterm.desktop
+ install -D -t $out/share/icons/hicolor/48x48/apps icons/xterm-color_48x48.xpm
+ '';
+
+ passthru = {
+ tests = { inherit (nixosTests) xterm; };
+
+ updateScript = let
+ # Tags that end in letters are unstable
+ suffixes = stdenv.lib.concatStringsSep " "
+ (map (c: "-c versionsort.suffix='${c}'")
+ (stdenv.lib.stringToCharacters "abcdefghijklmnopqrstuvwxyz"));
+ in writeScript "update.sh" ''
+ #!${stdenv.shell}
+ set -o errexit
+ PATH=${
+ stdenv.lib.makeBinPath [
+ common-updater-scripts
+ git
+ nixfmt
+ nix
+ coreutils
+ gnused
+ ]
+ }
+
+ oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion ${pname}" | tr -d '"')"
+ latestTag="$(git ${suffixes} ls-remote --exit-code --refs --sort='version:refname' --tags git@github.com:ThomasDickey/xterm-snapshots.git 'xterm-*' | tail --lines=1 | cut --delimiter='/' --fields=3 | sed 's|^xterm-||g')"
+
+ if [ ! "$oldVersion" = "$latestTag" ]; then
+ update-source-version ${pname} "$latestTag" --version-key=version --print-changes
+ nixpkgs="$(git rev-parse --show-toplevel)"
+ default_nix="$nixpkgs/pkgs/applications/terminal-emulators/xterm/default.nix"
+ nixfmt "$default_nix"
+ else
+ echo "${pname} is already up-to-date"
+ fi
+ '';
+ };
+
+ meta = {
+ homepage = "https://invisible-island.net/xterm";
+ license = with stdenv.lib.licenses; [ mit ];
+ maintainers = with stdenv.lib.maintainers; [ nequissimus vrthra ];
+ platforms = with stdenv.lib.platforms; linux ++ darwin;
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/xterm/sixel-256.support.patch b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/xterm/sixel-256.support.patch
new file mode 100644
index 000000000000..480e67e89ca3
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/xterm/sixel-256.support.patch
@@ -0,0 +1,11 @@
+--- xterm-325/graphics.c 2016-05-17 03:04:40.000000000 -0700
++++ xterm-325/graphics.c 2016-06-11 16:37:29.552584281 -0700
+@@ -667,7 +667,7 @@
+ case 330:
+ return 4U;
+ case 340:
+- return 16U;
++ return 256U;
+ case 382:
+ return 2U;
+ default:
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/xtermcontrol/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/xtermcontrol/default.nix
new file mode 100644
index 000000000000..f7c0edf22420
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/xtermcontrol/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ version = "3.7";
+ pname = "xtermcontrol";
+
+ src = fetchurl {
+ url = "https://thrysoee.dk/xtermcontrol/xtermcontrol-${version}.tar.gz";
+ sha256 = "04m12ddaps5sdbqvkwkp6lh81i8vh5ya5gzcxkrkilsga3m6qff2";
+ };
+
+ meta = {
+ description = "Enables dynamic control of xterm properties";
+ longDescription = ''
+ Enables dynamic control of xterm properties.
+ It makes it easy to change colors, title, font and geometry of a running xterm, as well as to report the current settings of these properties.
+ Window manipulations de-/iconify, raise/lower, maximize/restore and reset are also supported.
+ To complete the feature set; xtermcontrol lets advanced users issue any xterm control sequence of their choosing.
+ '';
+ homepage = "http://thrysoee.dk/xtermcontrol";
+ license = stdenv.lib.licenses.gpl2;
+ platforms = stdenv.lib.platforms.unix;
+ maintainers = [ stdenv.lib.maintainers.derchris ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/yaft/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/yaft/default.nix
new file mode 100644
index 000000000000..e66f397a3830
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/terminal-emulators/yaft/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, ncurses }:
+
+stdenv.mkDerivation rec {
+ version = "0.2.9";
+ pname = "yaft";
+
+ src = fetchFromGitHub {
+ owner = "uobikiemukot";
+ repo = "yaft";
+ rev = "v${version}";
+ sha256 = "0l1ig8wm545kpn4l7186rymny83jkahnjim290wsl7hsszfq1ckd";
+ };
+
+ buildInputs = [ ncurses ];
+
+ installFlags = [ "PREFIX=$(out)" "MANPREFIX=$(out)/share/man" ];
+
+ meta = {
+ homepage = "https://github.com/uobikiemukot/yaft";
+ description = "Yet another framebuffer terminal";
+ license = stdenv.lib.licenses.mit;
+ maintainers = [ stdenv.lib.maintainers.matthiasbeyer ];
+ platforms = with stdenv.lib.platforms; linux;
+ };
+}