pkgs: add zutty, use it on stan and europa

This commit is contained in:
Aaron Bieber 2022-09-21 13:07:37 -06:00
parent 6840b451eb
commit 62d7d6db0d
No known key found for this signature in database
4 changed files with 94 additions and 0 deletions

View File

@ -231,6 +231,9 @@ in {
virt-manager
yt-dlp
zig
(callPackage ../../pkgs/zutty.nix { })
];
# for Pharo

View File

@ -121,6 +121,8 @@ in {
virt-manager
wireshark
zig
(callPackage ../../pkgs/zutty.nix { })
];
virtualisation.libvirtd.enable = true;

65
pkgs/zutty.nix Normal file
View File

@ -0,0 +1,65 @@
{ lib, stdenv, fetchpatch, fetchFromGitHub, pkgs, go-font, ... }:
stdenv.mkDerivation rec {
pname = "zutty";
version = "0.13";
src = fetchFromGitHub {
owner = "tomszilagyi";
repo = "zutty";
rev = version;
sha256 = "sha256-1eB5GDhWGwyhiKzxpepzjQ44Co0ZeL9JJI5ppPE1TJw=";
};
patches = [
./zutty_go.diff
];
nativeBuildInputs = with pkgs; [
gcc
pkg-config
python
wafHook
xlibsWrapper
xorg.libXmu
#xorg.libXau
#xorg.libXdmcp
libGL
];
buildInputs = with pkgs; [ freetype fontconfig ];
prePatch = ''
substituteInPlace src/options.h \
--replace "/usr/share/fonts" "${go-font}/share/fonts"
'';
postInstall = ''
mkdir -p $out/share/applications/
for size in 16 32 48 64 96 128; do
mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps/
cp icons/zutty_''${size}x''${size}.png \
$out/share/icons/hicolor/''${size}x''${size}/apps/zutty.png
done
cp icons/zutty.desktop $out/share/applications/
'';
meta = with lib; {
description =
"X terminal emulator rendering through OpenGL ES Compute Shaders";
longDescription = ''
Zutty is a terminal emulator for the X Window System, functionally
similar to several other X terminal emulators such as xterm, rxvt and
countless others. It is also similar to other, much more modern,
GPU-accelerated terminal emulators such as Alacritty and Kitty. What
really sets Zutty apart is its radically simple, yet extremely
efficient rendering implementation, coupled with a sufficiently
complete feature set to make it useful for a wide range of users.
'';
homepage = "" "https://tomscii.sig7.se/zutty/";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ qbit ];
};
}

24
pkgs/zutty_go.diff Normal file
View File

@ -0,0 +1,24 @@
diff --git a/src/options.h b/src/options.h
index 7bac116..67b2e1d 100644
--- a/src/options.h
+++ b/src/options.h
@@ -52,15 +52,15 @@ namespace zutty
// option parseType implValue hardDefault helpDescr
{"altScroll", NoArg, "true", "false", "Alternate scroll mode"},
{"autoCopy", NoArg, "true", "false", "Sync primary to clipboard"},
- {"bg", SepArg, nullptr, "#000", "Background color"},
+ {"bg", SepArg, nullptr, "#ffffea", "Background color"},
{"boldColors", NoArg, "true", "true", "Enable bright for bold"},
{"border", SepArg, nullptr, "2", "Border width in pixels"},
{"cr", SepArg, nullptr, nullptr, "Cursor color"},
{"display", SepArg, nullptr, nullptr, "Display to connect to"},
{"dwfont", SepArg, nullptr, "18x18ja", "Double-width font to use"},
- {"fg", SepArg, nullptr, "#fff", "Foreground color"},
- {"font", SepArg, nullptr, "9x18", "Font to use"},
- {"fontsize", SepArg, nullptr, "16", "Font size"},
+ {"fg", SepArg, nullptr, "#000", "Foreground color"},
+ {"font", SepArg, nullptr, "go-mono", "Font to use"},
+ {"fontsize", SepArg, nullptr, "13", "Font size"},
{"fontpath", SepArg, nullptr, fontpath, "Font search path"},
{"geometry", SepArg, nullptr, "80x24", "Terminal size in chars"},
{"glinfo", NoArg, "true", "false", "Print OpenGL information"},