uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,144 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, rustPlatform
, nixosTests
, cmake
, installShellFiles
, makeWrapper
, ncurses
, pkg-config
, python3
, expat
, fontconfig
, freetype
, libGL
, libX11
, libXcursor
, libXi
, libXrandr
, libXxf86vm
, libxcb
, libxkbcommon
, wayland
, xdg-utils
# Darwin Frameworks
, AppKit
, CoreGraphics
, CoreServices
, CoreText
, Foundation
, libiconv
, 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.10.1";
src = fetchFromGitHub {
owner = "alacritty";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-Q/ulRgU6zNLRZUjL83O/Krx85voPWZPZDo65CLp/aOg=";
};
cargoSha256 = "sha256-S1V8hDuzp4sf6945gqs8QNVdu8jwPGVYjVbV6EY28Hk=";
nativeBuildInputs = [
cmake
installShellFiles
makeWrapper
ncurses
pkg-config
python3
];
buildInputs = rpathLibs
++ lib.optionals stdenv.isDarwin [
AppKit
CoreGraphics
CoreServices
CoreText
Foundation
libiconv
OpenGL
];
outputs = [ "out" "terminfo" ];
postPatch = ''
substituteInPlace alacritty/src/config/ui_config.rs \
--replace xdg-open ${xdg-utils}/bin/xdg-open
'';
checkFlags = [ "--skip=term::test::mock_term" ]; # broken on aarch64
postInstall = (
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/linux/io.alacritty.Alacritty.appdata.xml -t $out/share/appdata/
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"
gzip -c extra/alacritty-msg.man > "$out/share/man/man1/alacritty-msg.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
'';
dontPatchELF = true;
passthru.tests.test = nixosTests.terminal-emulators.alacritty;
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 ma27 ];
platforms = platforms.unix;
changelog = "https://github.com/alacritty/alacritty/blob/v${version}/CHANGELOG.md";
};
}

View file

@ -0,0 +1,101 @@
{ lib
, stdenv
, mkDerivation
, fetchFromGitHub
, cmake
, pkg-config
, freetype
, fontconfig
, libGL
, pcre
, boost
, catch2
, fmt
, microsoft_gsl
, range-v3
, libyamlcpp
, ncurses
, file
, darwin
, nixosTests
}:
let
# Commits refs come from https://github.com/contour-terminal/contour/blob/master/scripts/install-deps.sh
libunicode-src = fetchFromGitHub {
owner = "contour-terminal";
repo = "libunicode";
rev = "c2369b6380df1197476b08d3e2d0e96b6446f776";
sha256 = "sha256-kq7GpFCkrJG7F9/YEGz3gMTgYzhp/QB8D5b9wwMaLvQ=";
};
termbench-pro-src = fetchFromGitHub {
owner = "contour-terminal";
repo = "termbench-pro";
rev = "cd571e3cebb7c00de9168126b28852f32fb204ed";
sha256 = "sha256-dNtOmBu63LFYfiGjXf34C2tiG8pMmsFT4yK3nBnK9WI=";
};
in
mkDerivation rec {
pname = "contour";
version = "0.3.1.200";
src = fetchFromGitHub {
owner = "contour-terminal";
repo = pname;
rev = "v${version}";
sha256 = "sha256-TpxVC0GFZD3jGISnDWHKEetgVVpznm5k/Vc2dwVfSG4=";
};
nativeBuildInputs = [
cmake
pkg-config
ncurses
file
];
buildInputs = [
fontconfig
freetype
libGL
pcre
boost
catch2
fmt
microsoft_gsl
range-v3
libyamlcpp
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.libs.utmp ];
preConfigure = ''
mkdir -p _deps/sources
cat > _deps/sources/CMakeLists.txt <<EOF
macro(ContourThirdParties_Embed_libunicode)
add_subdirectory(\''${ContourThirdParties_SRCDIR}/libunicode EXCLUDE_FROM_ALL)
endmacro()
macro(ContourThirdParties_Embed_termbench_pro)
add_subdirectory(\''${ContourThirdParties_SRCDIR}/termbench_pro EXCLUDE_FROM_ALL)
endmacro()
EOF
ln -s ${libunicode-src} _deps/sources/libunicode
ln -s ${termbench-pro-src} _deps/sources/termbench_pro
# Don't fix Darwin app bundle
sed -i '/fixup_bundle/d' src/contour/CMakeLists.txt
'';
passthru.tests.test = nixosTests.terminal-emulators.contour;
meta = with lib; {
# never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/contour.x86_64-darwin
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
description = "Modern C++ Terminal Emulator";
homepage = "https://github.com/contour-terminal/contour";
changelog = "https://github.com/contour-terminal/contour/raw/v${version}/Changelog.md";
license = licenses.asl20;
maintainers = with maintainers; [ fortuneteller2k ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,46 @@
{ lib, stdenv, fetchFromGitHub, mkDerivation, qtbase, qtquick1, qmltermwidget
, qtquickcontrols, qtgraphicaleffects, qmake, nixosTests }:
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
'' + lib.optionalString stdenv.isDarwin ''
ln -s $out/bin/cool-retro-term.app/Contents/MacOS/cool-retro-term $out/bin/cool-retro-term
'';
passthru.tests.test = nixosTests.terminal-emulators.cool-retro-term;
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 = lib.licenses.gpl3Plus;
platforms = with lib.platforms; linux ++ darwin;
maintainers = with lib.maintainers; [ skeidel ];
};
}

View file

@ -0,0 +1,61 @@
{ lib
, stdenv
, fetchgit
, SDL2
, alsa-lib
, babl
, curl
, libdrm # Not documented
, pkg-config
, enableFb ? false
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "ctx";
version = "0.pre+date=2021-10-09";
src = fetchgit {
name = "ctx-source"; # because of a dash starting the directory
url = "https://ctx.graphics/.git/";
rev = "d11d0d1a719a3c77712528e2feed8c0878e0ea64";
sha256 = "sha256-Az3POgdvDOVaaRtzLlISDODhAKbefpGx5KgwO3dttqs=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
SDL2
alsa-lib
babl
curl
libdrm
];
configureScript = "./configure.sh";
configureFlags = lib.optional enableFb "--enable-fb";
dontAddPrefix = true;
hardeningDisable = [ "format" ];
installFlags = [
"PREFIX=${placeholder "out"}"
];
passthru.tests.test = nixosTests.terminal-emulators.ctx;
meta = with lib; {
homepage = "https://ctx.graphics/";
description = "Vector graphics terminal";
longDescription= ''
ctx is an interactive 2D vector graphics, audio, text- canvas and
terminal, with escape sequences that enable a 2D vector drawing API using
a vector graphics protocol.
'';
license = licenses.gpl3Plus;
maintainers = with maintainers; [ AndersonTorres];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,71 @@
{ stdenv
, buildGoModule
, fetchFromGitHub
, lib
, go
, pkg-config
, libX11
, libXcursor
, libXrandr
, libXinerama
, libXi
, libXext
, libXxf86vm
, libGL
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "darktile";
version = "0.0.10";
src = fetchFromGitHub {
owner = "liamg";
repo = "darktile";
rev = "v${version}";
sha256 = "0pdj4yv3qrq56gb67p85ara3g8qrzw5ha787bl2ls4vcx85q7303";
};
nativeBuildInputs = [ go pkg-config ];
buildInputs = [
libX11
libXcursor
libXrandr
libXinerama
libXi
libXext
libXxf86vm
libGL
];
postPatch = ''
substituteInPlace scripts/build.sh \
--replace "bash" "sh"
'';
postConfigure = ''
export GOPATH=$TMP/go
'';
makeFlags = [ "HOME=$TMP" ];
installPhase = ''
runHook preInstall
install -Dm755 darktile -t $out/bin
runHook postInstall
'';
passthru.tests.test = nixosTests.terminal-emulators.darktile;
meta = with lib; {
description = "A GPU rendered terminal emulator designed for tiling window managers";
homepage = "https://github.com/liamg/darktile";
downloadPage = "https://github.com/liamg/darktile/releases";
changelog = "https://github.com/liamg/darktile/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ flexagoon ];
};
}

View file

@ -0,0 +1,52 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, imlib2
, libX11
, libXaw
, libXext
, libast
, pkg-config
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "eterm";
version = "0.9.6+date=2020-03-03";
src = fetchFromGitHub {
owner = "mej";
repo = pname;
rev = "e8fb85b56da21113aaf0f5f7987ae647c4413b6c";
sha256 = "sha256-pfXYrd6BamBTcnarvXj+C6D1WyGtj87GrW+Dl6AeiDE=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
imlib2
libX11
libXaw
libXext
libast
];
passthru.tests.test = nixosTests.terminal-emulators.eterm;
meta = with lib; {
homepage = "https://github.com/mej/Eterm"; # http://www.eterm.org is gone
description = "Terminal emulator";
license = licenses.bsd2;
maintainers = [ maintainers.AndersonTorres ];
platforms = platforms.linux;
knownVulnerabilities = [
''Usage of ANSI escape sequences causes unexpected newline-termination,
leading to unexpected command execution. More info at:
- https://www.cve.org/CVERecord?id=CVE-2021-33477
- https://www.openwall.com/lists/oss-security/2021/05/17/1''
];
};
}

View file

@ -0,0 +1,225 @@
{ stdenv
, lib
, fetchFromGitea
, fetchurl
, runCommand
, fcft
, freetype
, pixman
, libxkbcommon
, fontconfig
, wayland
, meson
, ninja
, ncurses
, scdoc
, tllist
, wayland-protocols
, wayland-scanner
, pkg-config
, utf8proc
, allowPgo ? true
, python3 # for PGO
# for clang stdenv check
, foot
, llvmPackages
, llvmPackages_latest
}:
let
version = "1.12.1";
# build stimuli file for PGO build and the script to generate it
# independently of the foot's build, so we can cache the result
# and avoid unnecessary rebuilds as it can take relatively long
# to generate
#
# For every bump, make sure that the hash is still accurate.
stimulusGenerator = stdenv.mkDerivation {
name = "foot-generate-alt-random-writes";
src = fetchurl {
url = "https://codeberg.org/dnkl/foot/raw/tag/${version}/scripts/generate-alt-random-writes.py";
sha256 = "0w4d0rxi54p8lvbynypcywqqwbbzmyyzc0svjab27ngmdj1034ii";
};
dontUnpack = true;
buildInputs = [ python3 ];
installPhase = ''
install -Dm755 $src $out
'';
};
stimuliFile = runCommand "pgo-stimulus-file" { } ''
${stimulusGenerator} \
--rows=67 --cols=135 \
--scroll --scroll-region \
--colors-regular --colors-bright --colors-256 --colors-rgb \
--attr-bold --attr-italic --attr-underline \
--sixel \
--seed=2305843009213693951 \
$out
'';
compilerName =
if stdenv.cc.isClang
then "clang"
else if stdenv.cc.isGNU
then "gcc"
else "unknown";
# https://codeberg.org/dnkl/foot/src/branch/master/INSTALL.md#performance-optimized-pgo
pgoCflags = {
"clang" = "-O3 -Wno-ignored-optimization-argument";
"gcc" = "-O3";
}."${compilerName}";
# ar with lto support
ar = stdenv.cc.bintools.targetPrefix + {
"clang" = "llvm-ar";
"gcc" = "gcc-ar";
"unknown" = "ar";
}."${compilerName}";
# PGO only makes sense if we are not cross compiling and
# using a compiler which foot's PGO build supports (clang or gcc)
doPgo = allowPgo && (stdenv.hostPlatform == stdenv.buildPlatform)
&& compilerName != "unknown";
terminfoDir = "${placeholder "terminfo"}/share/terminfo";
in
stdenv.mkDerivation rec {
pname = "foot";
inherit version;
src = fetchFromGitea {
domain = "codeberg.org";
owner = "dnkl";
repo = pname;
rev = version;
sha256 = "14jqs4sarxbrgi5pxz0afqa9jxq90cb5ayqd21qj2n65whqa5bpk";
};
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
wayland-scanner
meson
ninja
ncurses
scdoc
pkg-config
] ++ lib.optionals (compilerName == "clang") [
stdenv.cc.cc.libllvm.out
];
buildInputs = [
tllist
wayland-protocols
fontconfig
freetype
pixman
wayland
libxkbcommon
fcft
utf8proc
];
# recommended build flags for performance optimized foot builds
# https://codeberg.org/dnkl/foot/src/branch/master/INSTALL.md#release-build
CFLAGS =
if !doPgo
then "-O3 -fno-plt"
else pgoCflags;
# ar with gcc plugins for lto objects
preConfigure = ''
export AR="${ar}"
'';
mesonBuildType = "release";
# See https://codeberg.org/dnkl/foot/src/tag/1.9.2/INSTALL.md#options
# TODO(@sternenseemann): install systemd user units
mesonFlags = [
# Use lto
"-Db_lto=true"
# “Build” and install terminfo db
"-Dterminfo=enabled"
# Ensure TERM=foot is used
"-Ddefault-terminfo=foot"
# Tell foot to set TERMINFO and where to install the terminfo files
"-Dcustom-terminfo-install-location=${terminfoDir}"
];
# build and run binary generating PGO profiles,
# then reconfigure to build the normal foot binary utilizing PGO
preBuild = lib.optionalString doPgo ''
meson configure -Db_pgo=generate
ninja
# make sure there is _some_ profiling data on all binaries
./footclient --version
./foot --version
./tests/test-config
# generate pgo data of wayland independent code
./pgo ${stimuliFile} ${stimuliFile} ${stimuliFile}
meson configure -Db_pgo=use
'' + lib.optionalString (doPgo && compilerName == "clang") ''
llvm-profdata merge default_*profraw --output=default.profdata
'';
# Install example themes which can be added to foot.ini via the include
# directive to a separate output to save a bit of space
postInstall = ''
moveToOutput share/foot/themes "$themes"
'';
outputs = [ "out" "terminfo" "themes" ];
passthru.tests = {
clang-default-compilation = foot.override {
inherit (llvmPackages) stdenv;
};
clang-latest-compilation = foot.override {
inherit (llvmPackages_latest) stdenv;
};
noPgo = foot.override {
allowPgo = false;
};
# By changing name, this will get rebuilt everytime we change version,
# even if the hash stays the same. Consequently it'll fail if we introduce
# a hash mismatch when updating.
stimulus-script-is-current = stimulusGenerator.src.overrideAttrs (_: {
name = "generate-alt-random-writes-${version}.py";
});
};
meta = with lib; {
homepage = "https://codeberg.org/dnkl/foot/";
changelog = "https://codeberg.org/dnkl/foot/releases/tag/${version}";
description = "A fast, lightweight and minimalistic Wayland terminal emulator";
license = licenses.mit;
maintainers = [ maintainers.sternenseemann ];
platforms = platforms.linux;
# From (presumably) ncurses version 6.3, it will ship a foot
# terminfo file. This however won't include some non-standard
# capabilities foot's bundled terminfo file contains. Unless we
# want to have some features in e. g. vim or tmux stop working,
# we need to make sure that the foot terminfo overwrites ncurses'
# one. Due to <nixpkgs/nixos/modules/config/system-path.nix>
# ncurses is always added to environment.systemPackages on
# NixOS with its priority increased by 3, so we need to go
# one bigger.
# This doesn't matter a lot for local use since foot sets
# TERMINFO to a store path, but allows installing foot.terminfo
# on remote systems for proper foot terminfo support.
priority = (ncurses.meta.priority or 5) + 3 + 1;
};
}

View file

@ -0,0 +1,58 @@
{ lib, stdenv
, fetchFromGitHub
, autoreconfHook
, pkg-config
, appstream-glib
, dbus
, pango
, pcre2
, tmux
, vte
, wrapGAppsHook
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "germinal";
version = "26";
src = fetchFromGitHub {
owner = "Keruspe";
repo = "Germinal";
rev = "v${version}";
sha256 = "sha256-HUi+skF4bJj5CY2cNTOC4tl7jhvpXYKqBx2rqKzjlo0=";
};
nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ];
buildInputs = [
appstream-glib
dbus
pango
pcre2
vte
];
configureFlags = [
"--with-dbusservicesdir=${placeholder "out"}/etc/dbus-1/system-services/"
];
dontWrapGApps = true;
fixupPhase = ''
runHook preFixup
wrapProgram $out/bin/germinal \
--prefix PATH ":" "${lib.makeBinPath [ tmux ]}" \
"''${gappsWrapperArgs[@]}"
runHook postFixup
'';
passthru.tests.test = nixosTests.terminal-emulators.germinal;
meta = with lib; {
description = "A minimal terminal emulator";
homepage = "https://github.com/Keruspe/Germinal";
license = with licenses; gpl3Plus;
platforms = with platforms; unix;
maintainers = with maintainers; [ AndersonTorres ];
};
}

View file

@ -0,0 +1,69 @@
{ lib
, stdenv
, fetchurl
, gettext
, gnome
, libgtop
, gtk3
, libhandy
, pcre2
, vte
, appstream-glib
, desktop-file-utils
, git
, meson
, ninja
, pkg-config
, python3
, sassc
, wrapGAppsHook
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "gnome-console";
version = "42.beta";
src = fetchurl {
url = "mirror://gnome/sources/gnome-console/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "Lq/shyAhDcwB5HqpihvGx2+xwVU2Xax7/NerFwR36DQ=";
};
buildInputs = [
gettext
libgtop
gnome.nautilus
gtk3
libhandy
pcre2
vte
];
nativeBuildInputs = [
appstream-glib
desktop-file-utils
git
meson
ninja
pkg-config
python3
sassc
wrapGAppsHook
];
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
};
};
passthru.tests.test = nixosTests.terminal-emulators.kgx;
meta = with lib; {
description = "Simple user-friendly terminal emulator for the GNOME desktop";
homepage = "https://gitlab.gnome.org/GNOME/console";
license = licenses.gpl3Plus;
maintainers = teams.gnome.members ++ (with maintainers; [ zhaofengli ]);
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,79 @@
{ lib
, fetchFromGitHub
, python3
, glibcLocales
, gobject-introspection
, wrapGAppsHook
, gtk3
, keybinder3
, libnotify
, libutempter
, vte
, libwnck
, nixosTests
}:
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 = [
gobject-introspection
wrapGAppsHook
python3.pkgs.pip
];
buildInputs = [
glibcLocales
gtk3
keybinder3
libnotify
libwnck
python3
vte
];
makeWrapperArgs = [ "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive" ];
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 : "${lib.makeLibraryPath [ libutempter ]}")
'';
passthru.tests.test = nixosTests.terminal-emulators.guake;
meta = with lib; {
description = "Drop-down terminal for GNOME";
homepage = "http://guake-project.org";
license = licenses.gpl2;
maintainers = [ maintainers.msteen ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,47 @@
{ lib
, stdenv
, fetchFromGitHub
, libxkbcommon
, pkg-config
, wayland
, wayland-protocols
}:
stdenv.mkDerivation rec {
pname = "havoc";
version = "0.4.0";
src = fetchFromGitHub {
owner = "ii8";
repo = pname;
rev = version;
hash = "sha256-zNKDQqkDeNj5fB5EdMVfAs2H4uBgLh6Fp3uSjiJ1VhQ=";
};
nativeBuildInputs = [
pkg-config
];
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 lib; {
homepage = "https://github.com/ii8/havoc";
description = "A minimal terminal emulator for Wayland";
license = with licenses; [ mit publicDomain ];
platforms = with platforms; unix;
maintainers = with maintainers; [ AndersonTorres ];
};
}

View file

@ -0,0 +1,56 @@
{ stdenv, lib, fetchurl, dpkg, atk, glib, pango, gdk-pixbuf, gtk3, cairo
, freetype, fontconfig, dbus, libXi, libXcursor, libXdamage, libXrandr, libXcomposite
, libXext, libXfixes, libXrender, libX11, libXtst, libXScrnSaver, libxcb, nss, nspr
, alsa-lib, cups, expat, udev, libpulseaudio, at-spi2-atk, at-spi2-core, libxshmfence
, libdrm, libxkbcommon, mesa, nixosTests}:
let
libPath = lib.makeLibraryPath [
stdenv.cc.cc gtk3 atk glib pango gdk-pixbuf cairo freetype fontconfig dbus
libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes libxcb
libXrender libX11 libXtst libXScrnSaver nss nspr alsa-lib cups expat udev libpulseaudio
at-spi2-atk at-spi2-core libxshmfence libdrm libxkbcommon mesa
];
in
stdenv.mkDerivation rec {
pname = "hyper";
version = "3.2.1";
src = fetchurl {
url = "https://github.com/vercel/hyper/releases/download/v${version}/hyper_${version}_amd64.deb";
sha256 = "sha256-nwaJ+lnuHv+Qb/QkKF/9jG8cvq1Z+urz8CPwxSsMmuA=";
};
nativeBuildInputs = [ 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}:$out/opt/Hyper:\$ORIGIN" "$out/opt/Hyper/hyper"
mv usr/* "$out/"
substituteInPlace $out/share/applications/hyper.desktop \
--replace "/opt/Hyper/hyper" "hyper"
'';
passthru.tests.test = nixosTests.terminal-emulators.hyper;
dontPatchELF = true;
meta = with lib; {
description = "A terminal built on web technologies";
homepage = "https://hyper.is/";
maintainers = with maintainers; [ puffnfresh fabiangd ];
license = licenses.mit;
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,42 @@
{ fetchzip, lib, stdenvNoCC }:
/*
This cannot be built from source as it requires entitlements and
for that it needs to be code signed. Automatic updates will have
to be disabled via preferences instead of at build time. To do
that edit $HOME/Library/Preferences/com.googlecode.iterm2.plist
and add:
SUEnableAutomaticChecks = 0;
*/
stdenvNoCC.mkDerivation rec {
pname = "iterm2";
version = "3.4.15";
src = fetchzip {
url = "https://iterm2.com/downloads/stable/iTerm2-${lib.replaceStrings ["."] ["_"] version}.zip";
sha256 = "sha256-ZE/uYBKB2popdIdZWA8AvyJiwMzt32u6u/H/AyNcoVo=";
};
installPhase = ''
runHook preInstall
APP_DIR="$out/Applications/iTerm2.app"
mkdir -p "$APP_DIR"
cp -r . "$APP_DIR"
mkdir -p "$out/bin"
cat << EOF > "$out/bin/iterm2"
#!${stdenvNoCC.shell}
open -na "$APP_DIR" --args "$@"
EOF
chmod +x "$out/bin/iterm2"
runHook postInstall
'';
meta = with lib; {
description = "A replacement for Terminal and the successor to iTerm";
homepage = "https://www.iterm2.com/";
license = licenses.gpl2;
maintainers = with maintainers; [ steinybot tricktron ];
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
};
}

View file

@ -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,

View file

@ -0,0 +1,44 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, gtk3
, pcre
, pkg-config
, vte
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "kermit";
version = "3.7";
src = fetchFromGitHub {
name = "${pname}-${version}-src";
owner = "orhun";
repo = pname;
rev = version;
hash = "sha256-O5jpiQ+aaOTPst4/Z+H5e7ylA8CNBevqNoH50p4uEA4=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
gtk3
pcre
vte
];
passthru.tests.test = nixosTests.terminal-emulators.kermit;
meta = with lib; {
homepage = "https://github.com/orhun/kermit";
description = "A VTE-based, simple and froggy terminal emulator";
license = licenses.gpl3Only;
maintainers = with maintainers; [ AndersonTorres ];
platforms = with platforms; unix;
};
}

View file

@ -0,0 +1,233 @@
{ lib, stdenv, fetchFromGitHub, python3Packages, libunistring
, harfbuzz, fontconfig, pkg-config, ncurses, imagemagick
, libstartup_notification, libGL, libX11, libXrandr, libXinerama, libXcursor
, libxkbcommon, libXi, libXext, wayland-protocols, wayland
, lcms2
, librsync
, installShellFiles
, dbus
, darwin
, Cocoa
, CoreGraphics
, Foundation
, IOKit
, Kernel
, OpenGL
, libcanberra
, libicns
, libpng
, python3
, zlib
, bashInteractive
, zsh
, fish
, fetchpatch
, nixosTests
}:
with python3Packages;
buildPythonApplication rec {
pname = "kitty";
version = "0.25.1";
format = "other";
src = fetchFromGitHub {
owner = "kovidgoyal";
repo = "kitty";
rev = "v${version}";
sha256 = "sha256-wL631cbA6ffXZomi6iDHk7XerRlpIL6T2qlEiQvFSJY=";
};
buildInputs = [
harfbuzz
ncurses
lcms2
librsync
] ++ lib.optionals stdenv.isDarwin [
Cocoa
CoreGraphics
Foundation
IOKit
Kernel
OpenGL
libpng
python3
zlib
] ++ lib.optionals (stdenv.isDarwin && (builtins.hasAttr "UserNotifications" darwin.apple_sdk.frameworks)) [
darwin.apple_sdk.frameworks.UserNotifications
] ++ lib.optionals stdenv.isLinux [
fontconfig libunistring libcanberra libX11
libXrandr libXinerama libXcursor libxkbcommon libXi libXext
wayland-protocols wayland dbus libGL
];
nativeBuildInputs = [
installShellFiles
ncurses
pkg-config
sphinx
furo
sphinx-copybutton
sphinxext-opengraph
sphinx-inline-tabs
] ++ lib.optionals stdenv.isDarwin [
imagemagick
libicns # For the png2icns tool.
];
outputs = [ "out" "terminfo" "shell_integration" ];
patches = [
# Fix to ensure that files in tar files used by SSH kitten have write permissions.
(fetchpatch {
name = "fix-tarball-file-permissions.patch";
url = "https://github.com/kovidgoyal/kitty/commit/8540ca399053e8d42df27283bb5dd4af562ed29b.patch";
sha256 = "sha256-y5w+ritkR+ZEfNSRDQW9r3BU2qt98UNK7vdEX/X+mKU=";
})
# Remove upon next release. Needed because of a missing #define.
(fetchpatch {
name = "fontconfig-1.patch";
url = "https://github.com/kovidgoyal/kitty/commit/bec620a8d30c36453e471b140b07483c7f875bf4.patch";
sha256 = "sha256-r1OTcXdO+RUAXmmIqI07m+z0zXq8DXCzgBRXPpnkGGM=";
})
(fetchpatch {
name = "fontconfig-2.patch";
url = "https://github.com/kovidgoyal/kitty/commit/1283a2b7e552d30cabce9345e5c13e5f9079183d.patch";
sha256 = "sha256-UM/OsumnfVHuHTahpRwyWZOeu6L8WOwbBf3lcjwdTj8=";
})
(fetchpatch {
name = "fontconfig-3.patch";
url = "https://github.com/kovidgoyal/kitty/commit/5c4abe749b1f50ae556a711d24ac7f3e384fac4e.patch";
sha256 = "sha256-amvyv5cZxHGPg7dZv649WjH4MNloFbmz5D4rhjKNzYA=";
})
# Needed on darwin
# Gets `test_ssh_shell_integration` to pass for `zsh` when `compinit` complains about
# permissions.
./zsh-compinit.patch
# Skip login shell detection when login shell is set to nologin
(fetchpatch {
name = "skip-login-shell-detection-for-nologin.patch";
url = "https://github.com/kovidgoyal/kitty/commit/27906ea853ce7862bcb83e324ef80f6337b5d846.patch";
sha256 = "sha256-Zg6uWkiWvb45i4xcp9k6jy0R2IQMT4PXr7BenzZ/md8=";
})
# Skip `test_ssh_bootstrap_with_different_launchers` when launcher is `zsh` since it causes:
# OSError: master_fd is in error condition
./disable-test_ssh_bootstrap_with_different_launchers.patch
];
# Causes build failure due to warning
hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow";
dontConfigure = true;
buildPhase = let
commonOptions = ''
--update-check-interval=0 \
--shell-integration=enabled\ no-rc
'';
in ''
runHook preBuild
${if stdenv.isDarwin then ''
${python.interpreter} setup.py kitty.app \
--disable-link-time-optimization \
${commonOptions}
make man
'' else ''
${python.interpreter} setup.py linux-package \
--egl-library='${lib.getLib libGL}/lib/libEGL.so.1' \
--startup-notification-library='${libstartup_notification}/lib/libstartup-notification-1.so' \
--canberra-library='${libcanberra}/lib/libcanberra.so' \
--fontconfig-library='${fontconfig.lib}/lib/libfontconfig.so' \
${commonOptions}
''}
runHook postBuild
'';
checkInputs = [
pillow
# Shells needed for shell integration tests
bashInteractive
zsh
fish
];
checkPhase =
let buildBinPath =
if stdenv.isDarwin
then "kitty.app/Contents/MacOS"
else "linux-package/bin";
in
''
# Fontconfig error: Cannot load default config file: No such file: (null)
export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
# Required for `test_ssh_shell_integration` to pass.
export TERM=kitty
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:${lib.makeBinPath [ imagemagick ncurses.dev ]}"
installShellCompletion --cmd kitty \
--bash <("$out/bin/kitty" +complete setup bash) \
--fish <("$out/bin/kitty" +complete setup fish2) \
--zsh <("$out/bin/kitty" +complete setup zsh)
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
cp -r 'shell-integration' "$shell_integration"
runHook postInstall
'';
# Patch shebangs that Nix can't automatically patch
preFixup =
let
pathComponent = if stdenv.isDarwin then "Applications/kitty.app/Contents/Resources" else "lib";
in
''
substituteInPlace $out/${pathComponent}/kitty/shell-integration/ssh/askpass.py \
--replace '/usr/bin/env -S ' $out/bin/
substituteInPlace $shell_integration/ssh/askpass.py \
--replace '/usr/bin/env -S ' $out/bin/
'';
passthru.tests.test = nixosTests.terminal-emulators.kitty;
meta = with lib; {
homepage = "https://github.com/kovidgoyal/kitty";
description = "A modern, hackable, featureful, OpenGL based terminal emulator";
license = licenses.gpl3Only;
changelog = "https://sw.kovidgoyal.net/kitty/changelog/";
platforms = platforms.darwin ++ platforms.linux;
maintainers = with maintainers; [ tex rvolosatovs Luflosi ];
};
}

View file

@ -0,0 +1,13 @@
diff --git a/kitty_tests/ssh.py b/kitty_tests/ssh.py
index 1f424146..d3cc191b 100644
--- a/kitty_tests/ssh.py
+++ b/kitty_tests/ssh.py
@@ -166,7 +166,7 @@ def test_ssh_bootstrap_with_different_launchers(self):
for sh in self.all_possible_sh:
if sh == 'sh' or 'python' in sh:
q = shutil.which(launcher)
- if q:
+ if q and not 'zsh' in q:
with self.subTest(sh=sh, launcher=q), tempfile.TemporaryDirectory() as tdir:
self.check_bootstrap(sh, tdir, test_script='env; exit 0', SHELL_INTEGRATION_VALUE='', launcher=q)

View file

@ -0,0 +1,13 @@
diff --git a/kitty_tests/ssh.py b/kitty_tests/ssh.py
index 1f424146..d9a65d25 100644
--- a/kitty_tests/ssh.py
+++ b/kitty_tests/ssh.py
@@ -268,6 +268,8 @@ def check_untar_or_fail():
return 'UNTAR_DONE' in q
pty.wait_till(check_untar_or_fail)
self.assertTrue(os.path.exists(os.path.join(home_dir, '.terminfo/kitty.terminfo')))
+ if login_shell == 'zsh':
+ pty.send_cmd_to_child('y')
if SHELL_INTEGRATION_VALUE != 'enabled':
pty.wait_till(lambda: len(pty.screen_contents().splitlines()) > 1)
self.assertEqual(pty.screen.cursor.shape, 0)

View file

@ -0,0 +1,52 @@
{ lib, stdenv, fetchFromGitHub, automake, autoconf, intltool, pkg-config, gtk3, vte, wrapGAppsHook
, libxslt, docbook_xml_dtd_412, docbook_xsl, libxml2, findXMLCatalogs, nixosTests
}:
stdenv.mkDerivation rec {
pname = "lxterminal";
version = "0.3.2";
src = fetchFromGitHub {
owner = "lxde";
repo = "lxterminal";
rev = version;
sha256 = "sha256-5J21Xvx43Ie01IxB2usyixDl+WZEeFHn2HXZsRS5imo=";
};
configureFlags = [
"--enable-man"
"--enable-gtk3"
];
nativeBuildInputs = [
automake autoconf intltool pkg-config 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;
passthru.tests.test = nixosTests.terminal-emulators.lxterminal;
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 = lib.licenses.gpl2;
maintainers = [ lib.maintainers.velovix ];
platforms = lib.platforms.linux;
};
}

View file

@ -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

View file

@ -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;
};
}

View file

@ -0,0 +1,122 @@
{ stdenv, lib, fetchFromGitHub, pkg-config, autoconf, makeDesktopItem, nixosTests
, 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.2";
src = fetchFromGitHub {
owner = "arakiken";
repo = pname;
rev = version;
sha256 = "sha256-DvGR3rDegInpnLp3H+rXNXktCGhpjsBBPTRMwodeTro=";
};
nativeBuildInputs = [ pkg-config 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 gnome.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 = [ "Application" "System" "TerminalEmulator" ];
startupNotify = false;
};
passthru.tests.test = nixosTests.terminal-emulators.mlterm;
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;
};
}

View file

@ -0,0 +1,58 @@
{ lib
, stdenv
, fetchurl
, libX11
, libXft
, libXi
, xorgproto
, libSM
, libICE
, freetype
, pkg-config
, which
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "mrxvt";
version = "0.5.4";
src = fetchurl {
url = "mirror://sourceforge/materm/mrxvt-${version}.tar.gz";
sha256 = "1mqhmnlz32lvld9rc6c1hyz7gjw4anwf39yhbsjkikcgj1das0zl";
};
buildInputs = [ libX11 libXft libXi xorgproto libSM libICE freetype pkg-config 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";
'';
passthru.tests.test = nixosTests.terminal-emulators.mrxvt;
meta = with 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;
maintainers = with maintainers; [ ];
knownVulnerabilities = [
"Usage of ANSI escape sequences causes unexpected newline-termination, leading to unexpected command execution (https://www.openwall.com/lists/oss-security/2021/05/17/1)"
];
};
}

View file

@ -0,0 +1,25 @@
{ lib, nimPackages, fetchFromGitHub, nim, termbox, pcre }:
nimPackages.buildNimPackage rec {
pname = "nimmm";
version = "0.2.0";
nimBinOnly = true;
src = fetchFromGitHub {
owner = "joachimschmidt557";
repo = "nimmm";
rev = "v${version}";
sha256 = "168n61avphbxsxfq8qzcnlqx6wgvz5yrjvs14g25cg3k46hj4xqg";
};
buildInputs = [ termbox pcre ]
++ (with nimPackages; [ noise nimbox lscolors ]);
meta = with lib; {
description = "Terminal file manager written in nim";
homepage = "https://github.com/joachimschmidt557/nimmm";
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = [ maintainers.joachimschmidt557 ];
};
}

View file

@ -0,0 +1,39 @@
{ at-spi2-core, cmake, dbus, dbus-glib, docbook_xsl, libepoxy, fetchFromGitHub
, glib, gtk3, harfbuzz, libXdmcp, libXtst, libpthreadstubs
, libselinux, libsepol, libtasn1, libxkbcommon, libxslt, p11-kit, pcre2
, pkg-config, lib, stdenv, util-linuxMinimal, vte, wrapGAppsHook, xmlto, nixosTests
}:
stdenv.mkDerivation rec {
pname = "roxterm";
version = "3.12.1";
src = fetchFromGitHub {
owner = "realh";
repo = "roxterm";
rev = version;
sha256 = "sha256-jVcf/nrEq8dM8rw40ZhXGJjt3DQLroCePtIAdAsVIfs=";
};
nativeBuildInputs = [ cmake pkg-config wrapGAppsHook libxslt ];
buildInputs =
[ gtk3 dbus dbus-glib vte pcre2 harfbuzz libpthreadstubs libXdmcp
util-linuxMinimal glib docbook_xsl xmlto libselinux
libsepol libxkbcommon libepoxy at-spi2-core libXtst libtasn1 p11-kit
];
passthru.tests.test = nixosTests.terminal-emulators.roxterm;
meta = with 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;
};
}

View file

@ -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 { };
}

View file

@ -0,0 +1,27 @@
{ lib, 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 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;
};
}

View file

@ -0,0 +1,27 @@
{ lib, fetchurl, perlPackages, pkg-config, 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 = [ pkg-config 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;
};
}

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchFromGitHub, xrdb, xlsfonts }:
stdenv.mkDerivation rec {
pname = "urxvt-font-size";
version = "1.3";
src = fetchFromGitHub {
owner = "majutsushi";
repo = "urxvt-font-size";
rev = "v${version}";
sha256 = "1526ap161cp3378f4ijd09nmsh71ld7bkxxhp8p6razdi2v8r16h";
};
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 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;
};
}

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchFromGitHub, wmctrl }:
stdenv.mkDerivation {
pname = "urxvt-perl";
version = "unstable-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 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;
};
}

View file

@ -0,0 +1,29 @@
{ lib, 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 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;
};
}

View file

@ -0,0 +1,27 @@
{ lib, 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 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;
};
}

View file

@ -0,0 +1,24 @@
{ lib, 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 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;
};
}

View file

@ -0,0 +1,29 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "urxvt-theme-switch";
version = "unstable-2014-12-21";
dontPatchShebangs = true;
src = fetchFromGitHub {
owner = "felixr";
repo = "urxvt-theme-switch";
rev = "cfcbcc3dd5a5b09a3fec0f6a1fea95f4a36a48c4";
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 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 = platforms.unix;
};
}

View file

@ -0,0 +1,27 @@
{ lib, stdenv, fetchgit, perl }:
stdenv.mkDerivation {
pname = "rxvt-unicode-vtwheel";
version = "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 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;
};
}

View file

@ -0,0 +1,116 @@
{ lib, stdenv, fetchurl, fetchpatch, makeDesktopItem
, libX11, libXt, libXft, libXrender
, ncurses, fontconfig, freetype
, pkg-config, gdk-pixbuf, perl
, libptytty
, perlSupport ? true
, gdkPixbufSupport ? true
, unicode3Support ? true
, emojiSupport ? false
, nixosTests
}:
let
pname = "rxvt-unicode";
version = "9.30";
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" ];
};
fetchPatchFromAUR = { package, name, rev, sha256 }:
fetchpatch rec {
url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=${package}&id=${rev}";
extraPrefix = "";
inherit name sha256;
};
in
with 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 = "0badnkjsn3zps24r5iggj8k5v4f00npc77wqg92pcn1q5z8r677y";
};
buildInputs =
[ libX11 libXt libXft ncurses # required to build the terminfo file
fontconfig freetype pkg-config libXrender
libptytty
] ++ optional perlSupport perl
++ optional gdkPixbufSupport gdk-pixbuf;
outputs = [ "out" "terminfo" ];
patches = (if emojiSupport then [
# the required patches to libXft are in nixpkgs by default, see
# ../../../servers/x11/xorg/overrides.nix
(fetchPatchFromAUR {
name = "enable-wide-glyphs.patch";
package = "rxvt-unicode-truecolor-wide-glyphs";
rev = "69701a09c2c206233952b84bc966407f6774f1dc";
sha256 = "0jfcj0ahky4dxdfrhqvh1v83mblhf5nak56dk1vq3bhyifdg7ffq";
})
(fetchPatchFromAUR {
name = "improve-font-rendering.patch";
package = "rxvt-unicode-truecolor-wide-glyphs";
rev = "69701a09c2c206233952b84bc966407f6774f1dc";
sha256 = "1jj5ai2182nq912279adihi4zph1w4dvbdqa1pwacy4na6y0fz9y";
})
] else [
./patches/9.06-font-width.patch
]) ++ [
./patches/256-color-resources.patch
]++ optional stdenv.isDarwin ./patches/makefile-phony.patch;
configureFlags = [
"--with-terminfo=${placeholder "terminfo"}/share/terminfo"
"--enable-256-color"
(enableFeature perlSupport "perl")
(enableFeature unicode3Support "unicode3")
] ++ optional emojiSupport "--enable-wide-glyphs";
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
''
+ 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/
'';
passthru.tests.test = nixosTests.terminal-emulators.urxvt;
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;
};
}

View file

@ -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"),

View file

@ -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;
}

View file

@ -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)
#-------------------------------------------------------------------------

View file

@ -0,0 +1,62 @@
{ callPackage
, symlinkJoin
, makeWrapper
, lib
, rxvt-unicode-unwrapped
, rxvt-unicode-plugins
, perlPackages
, nixosTests
, 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;
nativeBuildInputs = [ 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;
tests.test = nixosTests.terminal-emulators.urxvt;
};
};
in
lib.makeOverridable wrapper { inherit configure; }

View file

@ -0,0 +1,42 @@
{ lib, stdenv, fetchurl
, pkg-config, 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 = [ pkg-config ];
buildInputs = [ libtool libX11 libXt libXpm ];
configurePhase = ''
LIBTOOL=${libtool}/bin/libtool ./configure --prefix=$out --enable-everything --enable-smart-resize --enable-256-color
'';
meta = with 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;
knownVulnerabilities = [
"Usage of ANSI escape sequences causes unexpected newline-termination, leading to unexpected command execution (https://www.openwall.com/lists/oss-security/2021/05/17/1)"
];
};
}

View file

@ -0,0 +1,66 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, glib
, gtk3
, makeWrapper
, pcre2
, perl
, pkg-config
, vte
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "sakura";
version = "3.8.4";
src = fetchFromGitHub {
owner = "dabisu";
repo = pname;
rev = "SAKURA_${lib.replaceStrings [ "." ] [ "_" ] version}";
hash = "sha256-Sqo1gyCvCMlEv1rYqw6P3Dmu10osi/KqB7/WlgTTNAc=";
};
nativeBuildInputs = [
cmake
makeWrapper
perl
pkg-config
];
buildInputs = [
glib
gtk3
pcre2
vte
];
# Set path to gsettings-schemata so sakura knows where to find colorchooser,
# fontchooser etc.
postFixup = ''
wrapProgram $out/bin/sakura \
--suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/
'';
passthru.tests.test = nixosTests.terminal-emulators.sakura;
meta = with 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;
};
}

View file

@ -0,0 +1,68 @@
{ lib
, stdenv
, fetchurl
, pkg-config
, fontconfig
, freetype
, libX11
, libXft
, ncurses
, writeText
, conf ? null
, patches ? [ ]
, extraLibs ? [ ]
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "st";
version = "0.8.5";
src = fetchurl {
url = "https://dl.suckless.org/st/${pname}-${version}.tar.gz";
hash = "sha256-6mgyID7QL/dBgry4raqexFTI+YnnkjLLhZZl4vVEqzc=";
};
inherit patches;
configFile = lib.optionalString (conf != null)
(writeText "config.def.h" conf);
postPatch = lib.optionalString (conf != null) "cp ${configFile} config.def.h"
+ lib.optionalString stdenv.isDarwin ''
substituteInPlace config.mk --replace "-lrt" ""
'';
strictDeps = true;
makeFlags = [
"PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config"
];
nativeBuildInputs = [
pkg-config
ncurses
fontconfig
freetype
];
buildInputs = [
libX11
libXft
] ++ extraLibs;
preInstall = ''
export TERMINFO=$out/share/terminfo
'';
installFlags = [ "PREFIX=$(out)" ];
passthru.tests.test = nixosTests.terminal-emulators.st;
meta = with lib; {
homepage = "https://st.suckless.org/";
description = "Simple Terminal for X from Suckless.org Community";
license = licenses.mit;
maintainers = with maintainers; [ andsild ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,14 @@
diff -Naur old/Makefile new/Makefile
--- old/Makefile 1969-12-31 21:00:01.000000000 -0300
+++ new/Makefile 2021-09-06 00:10:26.972466947 -0300
@@ -40,8 +40,8 @@
rm -rf st-$(VERSION)
install: st
- git submodule init
- git submodule update
+# git submodule init
+# git submodule update
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f st $(DESTDIR)$(PREFIX)/bin
cp -f st-copyout $(DESTDIR)$(PREFIX)/bin

View file

@ -0,0 +1,56 @@
{ lib
, stdenv
, fetchFromGitHub
, fontconfig
, harfbuzz
, libX11
, libXext
, libXft
, ncurses
, pkg-config
}:
stdenv.mkDerivation rec {
pname = "lukesmithxyz-st";
version = "0.pre+unstable=2021-08-10";
src = fetchFromGitHub {
owner = "LukeSmithxyz";
repo = "st";
rev = "e053bd6036331cc7d14f155614aebc20f5371d3a";
hash = "sha256-WwjuNxWoeR/ppJxJgqD20kzrn1kIfgDarkTOedX/W4k=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
fontconfig
harfbuzz
libX11
libXext
libXft
ncurses
];
patches = [
# eliminate useless calls to git inside Makefile
./0000-makefile-fix-install.diff
];
installPhase = ''
runHook preInstall
TERMINFO=$out/share/terminfo make install PREFIX=$out
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/LukeSmithxyz/st";
description = "Luke Smith's fork of st";
license = licenses.mit;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,49 @@
{ lib
, stdenv
, fetchFromGitHub
, fontconfig
, libX11
, libXext
, libXft
, ncurses
, pkg-config
}:
stdenv.mkDerivation rec {
pname = "mcaimi-st";
version = "0.pre+unstable=2021-08-30";
src = fetchFromGitHub {
owner = "mcaimi";
repo = "st";
rev = "1a8cad03692ee6d32c03a136cdc76bdb169e15d8";
hash = "sha256-xyVEvD8s1J9Wj9NB4Gg+0ldvde7M8IVpzCOTttC1IY0=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
fontconfig
libX11
libXext
libXft
ncurses
];
installPhase = ''
runHook preInstall
TERMINFO=$out/share/terminfo make install PREFIX=$out
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/gnotclub/xst";
description = "Suckless Terminal fork";
license = licenses.mit;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,51 @@
{ lib
, stdenv
, fetchFromGitHub
, fontconfig
, harfbuzz
, libX11
, libXext
, libXft
, ncurses
, pkg-config
}:
stdenv.mkDerivation rec {
pname = "siduck76-st";
version = "0.pre+unstable=2021-08-20";
src = fetchFromGitHub {
owner = "siduck76";
repo = "st";
rev = "c9bda1de1f3f94ba507fa0eacc96d6a4f338637f";
hash = "sha256-5n+QkSlVhhku7adtl7TuWhDl3zdwFaXc7Ot1RaIN54A=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
fontconfig
harfbuzz
libX11
libXext
libXft
ncurses
];
installPhase = ''
runHook preInstall
TERMINFO=$out/share/terminfo make install PREFIX=$out
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/siduck76/st";
description = "A fork of st with many add-ons";
license = licenses.mit;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,49 @@
{ lib
, stdenv
, fetchFromGitHub
, fontconfig
, libX11
, libXext
, libXft
, ncurses
, pkg-config
}:
stdenv.mkDerivation rec {
pname = "xst";
version = "0.8.4.1";
src = fetchFromGitHub {
owner = "gnotclub";
repo = pname;
rev = "v${version}";
sha256 = "nOJcOghtzFkl7B/4XeXptn2TdrGQ4QTKBo+t+9npxOA=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
fontconfig
libX11
libXext
libXft
ncurses
];
installPhase = ''
runHook preInstall
TERMINFO=$out/share/terminfo make install PREFIX=$out
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/gnotclub/xst";
description = "Simple terminal fork that can load config from Xresources";
license = licenses.mit;
maintainers = [ maintainers.vyp ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,38 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, vte, gtk, pcre2, nixosTests }:
stdenv.mkDerivation {
pname = "stupidterm";
version = "2019-03-26";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ vte gtk pcre2 ];
src = fetchFromGitHub {
owner = "esmil";
repo = "stupidterm";
rev = "f824e41c2ca9016db73556c5d2f5a2861e235c8e";
sha256 = "1f73wvqqvj5pr3fvb7jjc4bi1iwgkkknz24k8n69mdb75jnfjipp";
};
makeFlags = [ "PKGCONFIG=${pkg-config}/bin/${pkg-config.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"
'';
passthru.tests.test = nixosTests.terminal-emulators.stupidterm;
meta = with 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;
};
}

View file

@ -0,0 +1,42 @@
{ lib, stdenv, fetchurl, pkg-config, perl, unzip, autoPatchelfHook, ncurses, SDL2, alsa-lib }:
stdenv.mkDerivation rec {
pname = "syncterm";
version = "1.1";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}-src.tgz";
sha256 = "19m76bisipp1h3bc8mbq83b851rx3lbysxb0azpbr5nbqr2f8xyi";
};
sourceRoot = "${pname}-${version}/src/syncterm";
CFLAGS = [
"-DHAS_INTTYPES_H"
"-DXPDEV_DONT_DEFINE_INTTYPES"
"-Wno-unused-result"
"-Wformat-overflow=0"
] ++ (lib.optionals stdenv.isLinux [
"-DUSE_ALSA_SOUND" # Don't use OSS for beeps.
]);
makeFlags = [
"PREFIX=$(out)"
"RELEASE=1"
"USE_SDL_AUDIO=1"
];
nativeBuildInputs = [ autoPatchelfHook pkg-config SDL2 perl unzip ]; # SDL2 for `sdl2-config`.
buildInputs = [ ncurses SDL2 ]
++ (lib.optional stdenv.isLinux alsa-lib);
runtimeDependencies = [ ncurses SDL2 ]; # Both of these are dlopen()'ed at runtime.
meta = with lib; {
# error: unsupported option '-fsanitize=safe-stack' for target 'x86_64-apple-darwin'
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
homepage = "https://syncterm.bbsdev.net/";
description = "BBS terminal emulator";
maintainers = with maintainers; [ embr ];
platforms = platforms.unix;
license = licenses.gpl2Plus;
};
}

View file

@ -0,0 +1,81 @@
{ lib
, fetchFromGitHub
, python3
, keybinder3
, intltool
, file
, gtk3
, gobject-introspection
, libnotify
, wrapGAppsHook
, vte
, nixosTests
}:
python3.pkgs.buildPythonApplication rec {
pname = "terminator";
version = "2.1.1";
src = fetchFromGitHub {
owner = "gnome-terminator";
repo = "terminator";
rev = "v${version}";
sha256 = "1pfrzna30xv9yri6dsny1j5k35417m4hsg97c455vssywyl9w4jr";
};
nativeBuildInputs = [
file
intltool
gobject-introspection
wrapGAppsHook
python3.pkgs.pytest-runner
];
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 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'," ""
'';
doCheck = false;
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
passthru.tests.test = nixosTests.terminal-emulators.terminator;
meta = with 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;
};
}

View file

@ -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

View file

@ -0,0 +1,80 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, vte, gtk3, ncurses, pcre2, wrapGAppsHook, nixosTests }:
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";
})
] ++ lib.optional stdenv.isDarwin ./remove_ldflags_macos.patch;
makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
buildInputs = [ vte-ng gtk3 ncurses pcre2 ];
nativeBuildInputs = [ wrapGAppsHook pkg-config ];
outputs = [ "out" "terminfo" ];
passthru = {
inherit vte-ng;
tests = nixosTests.terminal-emulators.termite;
};
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 lib; {
description = "A simple VTE-based terminal";
license = licenses.lgpl2Plus;
homepage = "https://github.com/thestinger/termite/";
maintainers = with maintainers; [ koral ];
platforms = platforms.all;
};
}

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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::to_integral(vte::platform::ClipboardType::PRIMARY)]->str);
+}
+
/**
* vte_terminal_get_cursor_position:
* @terminal: a #VteTerminal

View file

@ -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;
}

View file

@ -0,0 +1,26 @@
{ stdenv, haskellPackages, makeWrapper, packages ? (pkgSet: []), nixosTests }:
let
termonadEnv = haskellPackages.ghcWithPackages (self: [ self.termonad ] ++ packages self);
in stdenv.mkDerivation {
pname = "termonad-with-packages";
inherit (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;
passthru.tests.test = nixosTests.terminal-emulators.termonad;
meta = haskellPackages.termonad.meta // {
mainProgram = "termonad";
};
}

View file

@ -0,0 +1,56 @@
{ lib, stdenv
, fetchFromGitHub
, autoreconfHook
, pkg-config
, expat
, gettext
, gtk
, libconfuse
, pcre2
, vte
, makeWrapper
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "tilda";
version = "1.5.4";
src = fetchFromGitHub {
owner = "lanoxx";
repo = "tilda";
rev = "${pname}-${version}";
sha256 = "sha256-uDx28jmjNUyzJbgTJiHbjI9U5mYb9bnfl/9AjbxNUWA=";
};
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
buildInputs = [
gettext
gtk
libconfuse
pcre2
vte
];
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"
'';
passthru.tests.test = nixosTests.terminal-emulators.tilda;
meta = with lib; {
description = "A Gtk based drop down terminal for Linux and Unix";
homepage = "https://github.com/lanoxx/tilda/";
license = licenses.gpl3Plus;
maintainers = [ maintainers.AndersonTorres ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,79 @@
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, meson
, ninja
, python3
, pkg-config
, ldc
, dconf
, dbus
, gsettings-desktop-schemas
, desktop-file-utils
, gettext
, gtkd
, libsecret
, glib
, wrapGAppsHook
, libunwind
, appstream
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "tilix";
version = "1.9.5";
src = fetchFromGitHub {
owner = "gnunn1";
repo = "tilix";
rev = version;
sha256 = "sha256-sPVL5oYDOmloRVm/nONKkC20vZc907c7ixBF6E2PQ8Y=";
};
# Default upstream else LDC fails to link
mesonBuildType = [
"debugoptimized"
];
nativeBuildInputs = [
desktop-file-utils
ldc
meson
ninja
pkg-config
python3
wrapGAppsHook
appstream
];
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"
'';
passthru.tests.test = nixosTests.terminal-emulators.tilix;
meta = with 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 ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,92 @@
{ stdenv
, lib
, fetchFromGitHub
, pkg-config
, nixosTests
, freetype
, fontconfig
, libGL
, libX11
, libXrandr
, libxcb
, libxkbcommon
, utf8proc
, wayland
, libnotify
, xdg-utils
, makeDesktopItem
}:
let
desktopItem = makeDesktopItem {
desktopName = "Wayst";
name = "wayst";
genericName = "Terminal";
exec = "wayst";
icon = "wayst";
categories = [ "System" "TerminalEmulator" ];
keywords = [ "wayst" "terminal" ];
comment = "A simple terminal emulator";
};
in
stdenv.mkDerivation rec {
pname = "wayst";
version = "unstable-2021-04-05";
src = fetchFromGitHub {
owner = "91861";
repo = pname;
rev = "e72ca78ef72c7b1e92473a98d435a3c85d7eab98";
hash = "sha256-UXAVSfVpk/8KSg4oMw2tVWImD6HqJ7gEioR2MqhUUoQ=";
};
makeFlags = [ "INSTALL_DIR=\${out}/bin" ];
nativeBuildInputs = [ pkg-config ];
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
'';
passthru.tests.test = nixosTests.terminal-emulators.wayst;
meta = with lib; {
description = "A simple terminal emulator";
mainProgram = "wayst";
homepage = "https://github.com/91861/wayst";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ berbiche ];
};
}

View file

@ -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

View file

@ -0,0 +1,125 @@
{ stdenv
, rustPlatform
, lib
, fetchFromGitHub
, ncurses
, perl
, pkg-config
, python3
, fontconfig
, openssl
, libGL
, libX11
, libxcb
, libxkbcommon
, xcbutil
, xcbutilimage
, xcbutilkeysyms
, xcbutilwm
, wayland
, zlib
, CoreGraphics
, Cocoa
, Foundation
, libiconv
, nixosTests
, runCommand
}:
rustPlatform.buildRustPackage rec {
pname = "wezterm";
version = "20220408-101518-b908e2dd";
src = fetchFromGitHub {
owner = "wez";
repo = pname;
rev = version;
fetchSubmodules = true;
sha256 = "sha256-kuuoD+hqgj7QXFRIxa112oc4idtcK0ptFACDpI0bzGY=";
};
postPatch = ''
echo ${version} > .tag
# tests are failing with: Unable to exchange encryption keys
rm -r wezterm-ssh/tests
'';
cargoSha256 = "sha256-iIb2zLUZpn23ooEiOP+yQMYUUmvef/KqvjzgLOFmjs0=";
nativeBuildInputs = [
pkg-config
python3
ncurses # tic for terminfo
] ++ lib.optional stdenv.isDarwin perl;
buildInputs = [
fontconfig
zlib
] ++ lib.optionals stdenv.isLinux [
libX11
libxcb
libxkbcommon
openssl
wayland
xcbutil
xcbutilimage
xcbutilkeysyms
xcbutilwm # contains xcb-ewmh among others
] ++ lib.optionals stdenv.isDarwin [
Cocoa
CoreGraphics
Foundation
libiconv
];
postInstall = ''
mkdir -p $out/nix-support
echo "${passthru.terminfo}" >> $out/nix-support/propagated-user-env-packages
# desktop icon
install -Dm644 assets/icon/terminal.png $out/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
install -Dm644 assets/wezterm.desktop $out/share/applications/org.wezfurlong.wezterm.desktop
install -Dm644 assets/wezterm.appdata.xml $out/share/metainfo/org.wezfurlong.wezterm.appdata.xml
# helper scripts
install -Dm644 assets/shell-integration/wezterm.sh -t $out/etc/profile.d
'';
preFixup = lib.optionalString stdenv.isLinux ''
patchelf --add-needed "${libGL}/lib/libEGL.so.1" $out/bin/wezterm-gui
'' + lib.optionalString stdenv.isDarwin ''
mkdir -p "$out/Applications"
OUT_APP="$out/Applications/WezTerm.app"
cp -r assets/macos/WezTerm.app "$OUT_APP"
rm $OUT_APP/*.dylib
cp -r assets/shell-integration/* "$OUT_APP"
ln -s $out/bin/{wezterm,wezterm-mux-server,wezterm-gui,strip-ansi-escapes} "$OUT_APP"
'';
passthru = {
tests = {
all-terminfo = nixosTests.allTerminfo;
terminal-emulators = nixosTests.terminal-emulators.wezterm;
};
terminfo = runCommand "wezterm-terminfo"
{
nativeBuildInputs = [
ncurses
];
} ''
mkdir -p $out/share/terminfo $out/nix-support
tic -x -o $out/share/terminfo ${src}/termwiz/data/wezterm.terminfo
'';
};
meta = with lib; {
description = "A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust";
homepage = "https://wezfurlong.org/wezterm";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
platforms = platforms.unix;
# Fails on missing UserNotifications framework while linking
broken = stdenv.isDarwin;
};
}

View file

@ -0,0 +1,44 @@
{ lib, 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 lib; {
description = "IBM 3270 terminal emulator for the X Window System";
homepage = "http://x3270.bgp.nu/index.html";
license = licenses.bsd3;
maintainers = [ maintainers.anna328p ];
};
}

View file

@ -0,0 +1,124 @@
{ lib, stdenv, fetchurl, fetchpatch, xorg, ncurses, freetype, fontconfig
, pkg-config, makeWrapper, nixosTests, writeScript, common-updater-scripts, git
, nixfmt, nix, gnused, coreutils, enableDecLocator ? true }:
stdenv.mkDerivation rec {
pname = "xterm";
version = "372";
src = fetchurl {
urls = [
"ftp://ftp.invisible-island.net/xterm/${pname}-${version}.tgz"
"https://invisible-mirror.net/archives/xterm/${pname}-${version}.tgz"
];
sha256 = "xtCBJ8skCcOgS8rlWbcCUZbtdwu3vyZjCry0XZX2CrE=";
};
strictDeps = true;
nativeBuildInputs = [ makeWrapper pkg-config fontconfig ];
buildInputs = [
xorg.libXaw
xorg.xorgproto
xorg.libXt
xorg.libXext
xorg.libX11
xorg.libSM
xorg.libICE
ncurses
freetype
xorg.libXft
xorg.luit
];
patches = [ ./sixel-256.support.patch ]
++ 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"
] ++ 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 = {
customTest = nixosTests.xterm;
standardTest = nixosTests.terminal-emulators.xterm;
};
updateScript = let
# Tags that end in letters are unstable
suffixes = lib.concatStringsSep " "
(map (c: "-c versionsort.suffix='${c}'")
(lib.stringToCharacters "abcdefghijklmnopqrstuvwxyz"));
in writeScript "update.sh" ''
#!${stdenv.shell}
set -o errexit
PATH=${
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 lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ nequissimus vrthra ];
platforms = with lib.platforms; linux ++ darwin;
changelog = "https://invisible-island.net/xterm/xterm.log.html";
};
}

View file

@ -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:

View file

@ -0,0 +1,25 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
version = "3.8";
pname = "xtermcontrol";
src = fetchurl {
url = "https://thrysoee.dk/xtermcontrol/xtermcontrol-${version}.tar.gz";
sha256 = "sha256-Vh6GNiDkjNhaD9U/3fG2LpMLN39L3jRUgG/FQeG1z40=";
};
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 = lib.licenses.gpl2;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.derchris ];
};
}

View file

@ -0,0 +1,25 @@
{ lib, 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 = lib.licenses.mit;
maintainers = [ lib.maintainers.matthiasbeyer ];
platforms = with lib.platforms; linux;
};
}