libghostty-vt: init at 0.1.0-unstable-2026-05-03
Adds a standalone build of ghostty's headless VT (terminal sequence) parsing library. Pinned to the ghostty commit referenced by devenv 2.1's flake.lock for ABI compatibility with devenv's libghostty-vt-sys Rust binding. Splits the static archive into the `dev` output and rewrites `libghostty-vt-static.pc` accordingly so both the shared and static pkg-config modules resolve. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
b3a16bd837
commit
4ee19c2336
Generated
+419
@@ -0,0 +1,419 @@
|
||||
# generated by zon2nix (https://github.com/jcollie/zon2nix)
|
||||
{
|
||||
lib,
|
||||
linkFarm,
|
||||
fetchzip,
|
||||
fetchurl,
|
||||
fetchgit,
|
||||
runCommandLocal,
|
||||
zig_0_15,
|
||||
zstd,
|
||||
name ? "zig-packages",
|
||||
}:
|
||||
let
|
||||
unpackZigArtifact =
|
||||
{ name, artifact }:
|
||||
runCommandLocal name { nativeBuildInputs = [ zig_0_15 ]; } ''
|
||||
hash="$(cd "$TMPDIR" && zig fetch --global-cache-dir "$TMPDIR" ${artifact})"
|
||||
mv "$TMPDIR/p/$hash" "$out"
|
||||
chmod 755 "$out"
|
||||
'';
|
||||
|
||||
fetchZig =
|
||||
{
|
||||
name,
|
||||
url,
|
||||
hash,
|
||||
unpack,
|
||||
}:
|
||||
let
|
||||
artifact =
|
||||
if unpack then
|
||||
fetchzip {
|
||||
inherit url hash;
|
||||
nativeBuildInputs = [ zstd ];
|
||||
}
|
||||
else
|
||||
fetchurl { inherit url hash; };
|
||||
in
|
||||
unpackZigArtifact { inherit name artifact; };
|
||||
|
||||
fetchGitZig =
|
||||
{
|
||||
name,
|
||||
url,
|
||||
hash,
|
||||
}:
|
||||
let
|
||||
parts = lib.splitString "#" url;
|
||||
url_base = builtins.elemAt parts 0;
|
||||
url_without_query = builtins.elemAt (lib.splitString "?" url_base) 0;
|
||||
rev_base = builtins.elemAt parts 1;
|
||||
rev =
|
||||
if builtins.match "^[a-fA-F0-9]{40}$" rev_base != null then rev_base else "refs/heads/${rev_base}";
|
||||
in
|
||||
fetchgit {
|
||||
inherit name rev hash;
|
||||
url = url_without_query;
|
||||
deepClone = false;
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
|
||||
fetchZigArtifact =
|
||||
{
|
||||
name,
|
||||
url,
|
||||
hash,
|
||||
unpack,
|
||||
}:
|
||||
let
|
||||
parts = lib.splitString "://" url;
|
||||
proto = builtins.elemAt parts 0;
|
||||
path = builtins.elemAt parts 1;
|
||||
fetcher = {
|
||||
"git+http" = fetchGitZig {
|
||||
inherit name hash;
|
||||
url = "http://${path}";
|
||||
};
|
||||
"git+https" = fetchGitZig {
|
||||
inherit name hash;
|
||||
url = "https://${path}";
|
||||
};
|
||||
http = fetchZig {
|
||||
inherit name hash unpack;
|
||||
url = "http://${path}";
|
||||
};
|
||||
https = fetchZig {
|
||||
inherit name hash unpack;
|
||||
url = "https://${path}";
|
||||
};
|
||||
};
|
||||
in
|
||||
fetcher.${proto};
|
||||
in
|
||||
linkFarm name [
|
||||
{
|
||||
name = "N-V-__8AANT61wB--nJ95Gj_ctmzAtcjloZ__hRqNw5lC1Kr";
|
||||
path = fetchZigArtifact {
|
||||
name = "bindings";
|
||||
url = "https://deps.files.ghostty.org/DearBindings_v0.17_ImGui_v1.92.5-docking.tar.gz";
|
||||
hash = "sha256-i/7FAOAJJvZ5hT7iPWfMOS08MYFzPKRwRzhlHT9wuqM=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AALw2uwF_03u4JRkZwRLc3Y9hakkYV7NKRR9-RIZJ";
|
||||
path = fetchZigArtifact {
|
||||
name = "breakpad";
|
||||
url = "https://deps.files.ghostty.org/breakpad-b99f444ba5f6b98cac261cbb391d8766b34a5918.tar.gz";
|
||||
hash = "sha256-bMqYlD0amQdmzvYQd8Ca/1k4Bj/heh7+EijlQSttatk=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAIrfdwARSa-zMmxWwFuwpXf1T3asIN7s5jqi9c1v";
|
||||
path = fetchZigArtifact {
|
||||
name = "fontconfig";
|
||||
url = "https://deps.files.ghostty.org/fontconfig-2.14.2.tar.gz";
|
||||
hash = "sha256-O6LdkhWHGKzsXKrxpxYEO1qgVcJ7CB2RSvPMtA3OilU=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAKLKpwC4H27Ps_0iL3bPkQb-z6ZVSrB-x_3EEkub";
|
||||
path = fetchZigArtifact {
|
||||
name = "freetype";
|
||||
url = "https://deps.files.ghostty.org/freetype-1220b81f6ecfb3fd222f76cf9106fecfa6554ab07ec7fdc4124b9bb063ae2adf969d.tar.gz";
|
||||
hash = "sha256-QnIB9dUVFnDQXB9bRb713aHy592XHvVPD+qqf/0quQw=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AADcZkgn4cMhTUpIz6mShCKyqqB-NBtf_S2bHaTC-";
|
||||
path = fetchZigArtifact {
|
||||
name = "gettext";
|
||||
url = "https://deps.files.ghostty.org/gettext-0.24.tar.gz";
|
||||
hash = "sha256-yRhQPVk9cNr0hE0XWhPYFq+stmfAb7oeydzVACwVGLc=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AABzkUgISeKGgXAzgtutgJsZc0-kkeqBBscJgMkvy";
|
||||
path = fetchZigArtifact {
|
||||
name = "glslang";
|
||||
url = "https://deps.files.ghostty.org/glslang-12201278a1a05c0ce0b6eb6026c65cd3e9247aa041b1c260324bf29cee559dd23ba1.tar.gz";
|
||||
hash = "sha256-FKLtu1Ccs+UamlPj9eQ12/WXFgS0uDPmPmB26MCpl7U=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "gobject-0.3.0-Skun7ANLnwDvEfIpVmohcppXgOvg_I6YOJFmPIsKfXk-";
|
||||
path = fetchZigArtifact {
|
||||
name = "gobject";
|
||||
url = "https://deps.files.ghostty.org/gobject-2025-11-08-23-1.tar.zst";
|
||||
hash = "sha256-OxS9/XC5aMJj1KhOcFP1ZZN7PI4ADw4f7ocx6V64mOc=";
|
||||
unpack = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AALiNBAA-_0gprYr92CjrMj1I5bqNu0TSJOnjFNSr";
|
||||
path = fetchZigArtifact {
|
||||
name = "gtk4_layer_shell";
|
||||
url = "https://deps.files.ghostty.org/gtk4-layer-shell-1.1.0.tar.gz";
|
||||
hash = "sha256-mChCgSYKXu9bT2OlXxbEv2p4ihAgptsDfssPcfozaYg=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAG02ugUcWec-Ndp-i7JTsJ0dgF8nnJRUInkGLG7G";
|
||||
path = fetchZigArtifact {
|
||||
name = "harfbuzz";
|
||||
url = "https://deps.files.ghostty.org/harfbuzz-11.0.0.tar.xz";
|
||||
hash = "sha256-8WNRuv4hRyX+LB1bWfDZPkmQWkskeJn7kNcM/5U6K5s=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAGmZhABbsPJLfbqrh6JTHsXhY6qCaLAQyx25e0XE";
|
||||
path = fetchZigArtifact {
|
||||
name = "highway";
|
||||
url = "https://deps.files.ghostty.org/highway-66486a10623fa0d72fe91260f96c892e41aceb06.tar.gz";
|
||||
hash = "sha256-h9T4iT704I8iSXNgj/6/lCaKgTgLp5wS6IQZaMgKohI=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAEbOfQBnvcFcCX2W5z7tDaN8vaNZGamEQtNOe0UI";
|
||||
path = fetchZigArtifact {
|
||||
name = "imgui";
|
||||
url = "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.5-docking.tar.gz";
|
||||
hash = "sha256-yBbCDox18+Fa6Gc1DnmSVQLRpqhZOLsac7iSfl8x+cs=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAL6FAwBDPampKgDjoxlJYDIn2jv0VaINS4W6CXJN";
|
||||
path = fetchZigArtifact {
|
||||
name = "iterm2_themes";
|
||||
url = "https://deps.files.ghostty.org/ghostty-themes-release-20260323-152405-a2c7b60.tgz";
|
||||
hash = "sha256-fWgXdUXh2/dNZqERzEu9hz4xyy4nl+GUjLMpUMrsRnA=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAIC5lwAVPJJzxnCAahSvZTIlG-HhtOvnM1uh-66x";
|
||||
path = fetchZigArtifact {
|
||||
name = "jetbrains_mono";
|
||||
url = "https://deps.files.ghostty.org/JetBrainsMono-2.304.tar.gz";
|
||||
hash = "sha256-xXppHouCrQmLWWPzlZAy5AOPORCHr3cViFulkEYQXMQ=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAJrvXQCqAT8Mg9o_tk6m0yf5Fz-gCNEOKLyTSerD";
|
||||
path = fetchZigArtifact {
|
||||
name = "libpng";
|
||||
url = "https://deps.files.ghostty.org/libpng-1220aa013f0c83da3fb64ea6d327f9173fa008d10e28bc9349eac3463457723b1c66.tar.gz";
|
||||
hash = "sha256-/syVtGzwXo4/yKQUdQ4LparQDYnp/fF16U/wQcrxoDo=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "libxev-0.0.0-86vtc4IcEwCqEYxEYoN_3KXmc6A9VLcm22aVImfvecYs";
|
||||
path = fetchZigArtifact {
|
||||
name = "libxev";
|
||||
url = "https://deps.files.ghostty.org/libxev-34fa50878aec6e5fa8f532867001ab3c36fae23e.tar.gz";
|
||||
hash = "sha256-1B9oJExVyOWRj+Y9d9eHkOBTlOYuEkcwGBUKdlgRhkg=";
|
||||
unpack = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAG3RoQEyRC2Vw7Qoro5SYBf62IHn3HjqtNVY6aWK";
|
||||
path = fetchZigArtifact {
|
||||
name = "libxml2";
|
||||
url = "https://deps.files.ghostty.org/libxml2-2.11.5.tar.gz";
|
||||
hash = "sha256-bCgFni4+60K1tLFkieORamNGwQladP7jvGXNxdiaYhU=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAMVLTABmYkLqhZPLXnMl-KyN38R8UVYqGrxqO26s";
|
||||
path = fetchZigArtifact {
|
||||
name = "nerd_fonts_symbols_only";
|
||||
url = "https://deps.files.ghostty.org/NerdFontsSymbolsOnly-3.4.0.tar.gz";
|
||||
hash = "sha256-EWTRuVbUveJI17LwmYxDzJT1ICQxoVZKeTiVsec7DQQ=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAHjwMQDBXnLq3Q2QhaivE0kE2aD138vtX2Bq1g7c";
|
||||
path = fetchZigArtifact {
|
||||
name = "oniguruma";
|
||||
url = "https://deps.files.ghostty.org/oniguruma-1220c15e72eadd0d9085a8af134904d9a0f5dfcbed5f606ad60edc60ebeccd9706bb.tar.gz";
|
||||
hash = "sha256-ABqhIC54RI9MC/GkjHblVodrNvFtks4yB+zP1h2Z8qA=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AADYiAAB_80AWnH1AxXC0tql9thT-R-DYO1gBqTLc";
|
||||
path = fetchZigArtifact {
|
||||
name = "pixels";
|
||||
url = "https://deps.files.ghostty.org/pixels-12207ff340169c7d40c570b4b6a97db614fe47e0d83b5801a932dcd44917424c8806.tar.gz";
|
||||
hash = "sha256-Veg7FtCRCCUCvxSb9FfzH0IJLFmCZQ4/+657SIcb8Ro=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAKYZBAB-CFHBKs3u4JkeiT4BMvyHu3Y5aaWF3Bbs";
|
||||
path = fetchZigArtifact {
|
||||
name = "plasma_wayland_protocols";
|
||||
url = "https://deps.files.ghostty.org/plasma_wayland_protocols-12207e0851c12acdeee0991e893e0132fc87bb763969a585dc16ecca33e88334c566.tar.gz";
|
||||
hash = "sha256-XFi6IUrNjmvKNCbcCLAixGqN2Zeymhs+KLrfccIN9EE=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAPlZGwBEa-gxrcypGBZ2R8Bse4JYSfo_ul8i2jlG";
|
||||
path = fetchZigArtifact {
|
||||
name = "sentry";
|
||||
url = "https://deps.files.ghostty.org/sentry-1220446be831adcca918167647c06c7b825849fa3fba5f22da394667974537a9c77e.tar.gz";
|
||||
hash = "sha256-KsZJfMjWGo0xCT5HrduMmyxFsWsHBbszSoNbZCPDGN8=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AANb6pwD7O1WG6L5nvD_rNMvnSc9Cpg1ijSlTYywv";
|
||||
path = fetchZigArtifact {
|
||||
name = "spirv_cross";
|
||||
url = "https://deps.files.ghostty.org/spirv_cross-1220fb3b5586e8be67bc3feb34cbe749cf42a60d628d2953632c2f8141302748c8da.tar.gz";
|
||||
hash = "sha256-tStvz8Ref6abHwahNiwVVHNETizAmZVVaxVsU7pmV+M=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "uucode-0.1.0-ZZjBPj96QADXyt5sqwBJUnhaDYs_qBeeKijZvlRa0eqM";
|
||||
path = fetchZigArtifact {
|
||||
name = "uucode";
|
||||
url = "git+https://github.com/jacobsandlund/uucode#5f05f8f83a75caea201f12cc8ea32a2d82ea9732";
|
||||
hash = "sha256-sHPh+TQSdUGus/QTbj7KSJJkTuNTrK4VNmQDjS30Lf8=";
|
||||
unpack = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "uucode-0.2.0-ZZjBPqZVVABQepOqZHR7vV_NcaN-wats0IB6o-Exj6m9";
|
||||
path = fetchZigArtifact {
|
||||
name = "uucode";
|
||||
url = "https://deps.files.ghostty.org/uucode-0.2.0-ZZjBPqZVVABQepOqZHR7vV_NcaN-wats0IB6o-Exj6m9.tar.gz";
|
||||
hash = "sha256-jLrhrmCXQ1T+LQP1JTBBB3Jn+1hCZfODbC4SdlfNdKg=";
|
||||
unpack = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "vaxis-0.5.1-BWNV_LosCQAGmCCNOLljCIw6j6-yt53tji6n6rwJ2BhS";
|
||||
path = fetchZigArtifact {
|
||||
name = "vaxis";
|
||||
url = "https://deps.files.ghostty.org/vaxis-7dbb9fd3122e4ffad262dd7c151d80d863b68558.tar.gz";
|
||||
hash = "sha256-zTyrZrIffM+GJIt973tKDeWHmOCwbn7KLDdQxSiK00Y=";
|
||||
unpack = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAKrHGAAs2shYq8UkE6bGcR1QJtLTyOE_lcosMn6t";
|
||||
path = fetchZigArtifact {
|
||||
name = "wayland";
|
||||
url = "https://deps.files.ghostty.org/wayland-9cb3d7aa9dc995ffafdbdef7ab86a949d0fb0e7d.tar.gz";
|
||||
hash = "sha256-6kGR1o5DdnflHzqs3ieCmBAUTpMdOXoyfcYDXiw5xQ0=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAKw-DAAaV8bOAAGqA0-oD7o-HNIlPFYKRXSPT03S";
|
||||
path = fetchZigArtifact {
|
||||
name = "wayland_protocols";
|
||||
url = "https://deps.files.ghostty.org/wayland-protocols-258d8f88f2c8c25a830c6316f87d23ce1a0f12d9.tar.gz";
|
||||
hash = "sha256-XO3K3egbdeYPI+XoO13SuOtO+5+Peb16NH0UiusFMPg=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAFdWDwA0ktbNUi9pFBHCRN4weXIgIfCrVjfGxqgA";
|
||||
path = fetchZigArtifact {
|
||||
name = "wayland_protocols";
|
||||
url = "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/1.47/wayland-protocols-1.47.tar.gz";
|
||||
hash = "sha256-3S3xSrX0EDgleq7cxLX7msDuAY8/D5SvkJcCjmDTMiM=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAAzZywE3s51XfsLbP9eyEw57ae9swYB9aGB6fCMs";
|
||||
path = fetchZigArtifact {
|
||||
name = "wuffs";
|
||||
url = "https://deps.files.ghostty.org/wuffs-122037b39d577ec2db3fd7b2130e7b69ef6cc1807d68607a7c232c958315d381b5cd.tar.gz";
|
||||
hash = "sha256-nkzSCr6W5sTG7enDBXEIhgEm574uLD41UVR2wlC+HBM=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "z2d-0.10.0-j5P_Hu-6FgBsZNgwphIqh17jDnj8_yPtD8yzjO6PpHRQ";
|
||||
path = fetchZigArtifact {
|
||||
name = "z2d";
|
||||
url = "https://deps.files.ghostty.org/z2d-0.10.0-j5P_Hu-6FgBsZNgwphIqh17jDnj8_yPtD8yzjO6PpHRQ.tar.gz";
|
||||
hash = "sha256-qD+XexnAjSanRAwr5ZIaPY1aQhNW5DFVJ4PYLwhIr2E=";
|
||||
unpack = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zf-0.10.3-OIRy8RuJAACKA3Lohoumrt85nRbHwbpMcUaLES8vxDnh";
|
||||
path = fetchZigArtifact {
|
||||
name = "zf";
|
||||
url = "https://deps.files.ghostty.org/zf-3c52637b7e937c5ae61fd679717da3e276765b23.tar.gz";
|
||||
hash = "sha256-BfAZILill3I/nBf1oWwol77N34Jcpm4hudC+XSeMgZY=";
|
||||
unpack = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zig_js-0.0.0-rjCAV-6GAADxFug7rDmPH-uM_XcnJ5NmuAMJCAscMjhi";
|
||||
path = fetchZigArtifact {
|
||||
name = "zig_js";
|
||||
url = "https://deps.files.ghostty.org/zig_js-04db83c617da1956ac5adc1cb9ba1e434c1cb6fd.tar.gz";
|
||||
hash = "sha256-r6GdXwrv+jTu0AkTlyN/FuO+N4X+l20gsbS59wrE7V4=";
|
||||
unpack = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zig_objc-0.0.0-Ir_Sp5gTAQCvxxR7oVIrPXxXwsfKgVP7_wqoOQrZjFeK";
|
||||
path = fetchZigArtifact {
|
||||
name = "zig_objc";
|
||||
url = "https://deps.files.ghostty.org/zig_objc-f356ed02833f0f1b8e84d50bed9e807bf7cdc0ae.tar.gz";
|
||||
hash = "sha256-jWFQ5BrV880qqa9KypltWuRLqNSh21rDxt6Jxp0EoMM=";
|
||||
unpack = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "wayland-0.5.0-dev-lQa1khrMAQDJDwYFKpdH3HizherB7sHo5dKMECfvxQHe";
|
||||
path = fetchZigArtifact {
|
||||
name = "zig_wayland";
|
||||
url = "https://deps.files.ghostty.org/zig_wayland-1b5c038ec10da20ed3a15b0b2a6db1c21383e8ea.tar.gz";
|
||||
hash = "sha256-1wRkixysjdFMyrATxlXdukAc34MwfNj0B6ydYVn+UKw=";
|
||||
unpack = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zigimg-0.1.0-8_eo2vHnEwCIVW34Q14Ec-xUlzIoVg86-7FU2ypPtxms";
|
||||
path = fetchZigArtifact {
|
||||
name = "zigimg";
|
||||
url = "https://github.com/ivanstepanovftw/zigimg/archive/d7b7ab0ba0899643831ef042bd73289510b39906.tar.gz";
|
||||
hash = "sha256-vkcTloGX+vRw7e6GYJLO9eocYaEOYjXYE0dT7jscZ4A=";
|
||||
unpack = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "N-V-__8AAB0eQwD-0MdOEBmz7intriBReIsIDNlukNVoNu6o";
|
||||
path = fetchZigArtifact {
|
||||
name = "zlib";
|
||||
url = "https://deps.files.ghostty.org/zlib-1220fed0c74e1019b3ee29edae2051788b080cd96e90d56836eea857b0b966742efb.tar.gz";
|
||||
hash = "sha256-F+iIY/NgBnKrSRgvIXKBtvxNPHYr3jYZNeQ2qVIU0Fw=";
|
||||
unpack = false;
|
||||
};
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,107 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
callPackage,
|
||||
cctools,
|
||||
fetchFromGitHub,
|
||||
fixDarwinDylibNames,
|
||||
gitMinimal,
|
||||
ncurses,
|
||||
pkg-config,
|
||||
runCommand,
|
||||
xcbuild,
|
||||
zig_0_15,
|
||||
|
||||
optimize ? "ReleaseFast",
|
||||
simd ? true,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libghostty-vt";
|
||||
version = "0.1.0-unstable-2026-05-03";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ghostty-org";
|
||||
repo = "ghostty";
|
||||
rev = "1547dd667ab6d1f4ebcdc7282adc54c95752ee67";
|
||||
hash = "sha256-dZFc+8az7BUIs8+v45XqNnY5G6oXEwVfVVHZQuATSGQ=";
|
||||
};
|
||||
|
||||
# Zig's build runner computes relative paths from `cwd` to the build directory.
|
||||
# The logic is purely lexical, so if the `cwd` is a symlink that resolves to a
|
||||
# different depth during `chdir`, the computed path becomes incorrect.
|
||||
# See: https://codeberg.org/ziglang/zig/issues/32121
|
||||
# Workaround: override `linkFarm` with a copy-farm so deps are real directories.
|
||||
deps = callPackage ./deps.nix {
|
||||
name = "${finalAttrs.pname}-cache-${finalAttrs.version}";
|
||||
linkFarm =
|
||||
name: entries:
|
||||
runCommand name { } ''
|
||||
mkdir -p $out
|
||||
${lib.concatMapStringsSep "\n" (e: ''
|
||||
cp -rL ${e.path} $out/${e.name}
|
||||
'') entries}
|
||||
'';
|
||||
};
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
gitMinimal
|
||||
ncurses
|
||||
pkg-config
|
||||
zig_0_15
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
cctools
|
||||
fixDarwinDylibNames
|
||||
xcbuild
|
||||
];
|
||||
|
||||
buildInputs = [ ];
|
||||
|
||||
dontSetZigDefaultFlags = true;
|
||||
|
||||
zigBuildFlags = [
|
||||
"--system"
|
||||
"${finalAttrs.deps}"
|
||||
"-Dlib-version-string=${finalAttrs.version}"
|
||||
"-Dcpu=baseline"
|
||||
"-Doptimize=${optimize}"
|
||||
"-Dapp-runtime=none"
|
||||
"-Demit-lib-vt=true"
|
||||
"-Dsimd=${lib.boolToString simd}"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"-Demit-xcframework=false"
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p "$dev/lib"
|
||||
mv "$out/lib/libghostty-vt.a" "$dev/lib/"
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace "$dev/share/pkgconfig/libghostty-vt-static.pc" \
|
||||
--replace-fail "$out" "$dev"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Ghostty's VT (terminal sequence) parsing library";
|
||||
homepage = "https://ghostty.org/";
|
||||
license = lib.licenses.mit;
|
||||
pkgConfigModules = [
|
||||
"libghostty-vt"
|
||||
"libghostty-vt-static"
|
||||
];
|
||||
maintainers = with lib.maintainers; [ domenkozar ];
|
||||
platforms = zig_0_15.meta.platforms;
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user