diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-04-04 19:22:04 +0300 |
|---|---|---|
| committer | Can Celik <ogulcancelik@gmail.com> | 2026-04-05 01:23:06 +0300 |
| commit | 41dd733ca7123c9ac4bfc6c781697a660e95b052 (patch) | |
| tree | 3fc91815ca139ef2e0b281bba0abda4ef15175f4 /vendor/libghostty-vt/nix | |
| parent | 55c138263e190a1e79d4b997bfb9397306c0ec1f (diff) | |
feat: finish ghostty pane backend integration
Diffstat (limited to 'vendor/libghostty-vt/nix')
32 files changed, 1639 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/nix/build-support/build-inputs.nix b/vendor/libghostty-vt/nix/build-support/build-inputs.nix new file mode 100644 index 00000000..8f39968a --- /dev/null +++ b/vendor/libghostty-vt/nix/build-support/build-inputs.nix @@ -0,0 +1,46 @@ +{ + pkgs, + lib, + stdenv, + enableX11 ? true, + enableWayland ? true, +}: +[ + pkgs.libGL +] +++ lib.optionals stdenv.hostPlatform.isLinux [ + pkgs.bzip2 + pkgs.expat + pkgs.fontconfig + pkgs.freetype + pkgs.harfbuzz + pkgs.libpng + pkgs.libxml2 + pkgs.oniguruma + pkgs.simdutf + pkgs.zlib + + pkgs.glslang + pkgs.spirv-cross + + pkgs.libxkbcommon + + pkgs.glib + pkgs.gobject-introspection + pkgs.gsettings-desktop-schemas + pkgs.gst_all_1.gst-plugins-base + pkgs.gst_all_1.gst-plugins-good + pkgs.gst_all_1.gstreamer + pkgs.gtk4 + pkgs.libadwaita +] +++ lib.optionals (stdenv.hostPlatform.isLinux && enableX11) [ + pkgs.libx11 + pkgs.libxcursor + pkgs.libxi + pkgs.libxrandr +] +++ lib.optionals (stdenv.hostPlatform.isLinux && enableWayland) [ + pkgs.gtk4-layer-shell + pkgs.wayland +] diff --git a/vendor/libghostty-vt/nix/build-support/check-blueprints.sh b/vendor/libghostty-vt/nix/build-support/check-blueprints.sh new file mode 100755 index 00000000..8325981c --- /dev/null +++ b/vendor/libghostty-vt/nix/build-support/check-blueprints.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -o nounset -o pipefail -o errexit + +find src -name \*.blp -exec blueprint-compiler format {} \+ +find src -name \*.blp -exec blueprint-compiler compile --output=/dev/null {} \; diff --git a/vendor/libghostty-vt/nix/build-support/check-zig-cache.sh b/vendor/libghostty-vt/nix/build-support/check-zig-cache.sh new file mode 100755 index 00000000..9a392784 --- /dev/null +++ b/vendor/libghostty-vt/nix/build-support/check-zig-cache.sh @@ -0,0 +1,120 @@ +#!/usr/bin/env bash +# +# This script checks if the build.zig.zon.nix file is up-to-date. +# If the `--update` flag is passed, it will update all necessary +# files to be up to date. +# +# The files owned by this are: +# +# - build.zig.zon.nix +# - build.zig.zon.txt +# - build.zig.zon.json +# - flatpak/zig-packages.json +# +# All of these are auto-generated and should not be edited manually. + +# Nothing in this script should fail. +set -e + +WORK_DIR=$(mktemp -d) + +if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then + echo "could not create temp dir" + exit 1 +fi + +function cleanup { + rm -rf "$WORK_DIR" +} + +trap cleanup EXIT + +help() { + echo "" + echo "To fix, please (manually) re-run the script from the repository root," + echo "commit, and submit a PR with the update:" + echo "" + echo " ./nix/build-support/check-zig-cache.sh --update" + echo " git add build.zig.zon.nix build.zig.zon.txt build.zig.zon.json flatpak/zig-packages.json" + echo " git commit -m \"nix: update build.zig.zon.nix build.zig.zon.txt build.zig.zon.json flatpak/zig-packages.json\"" + echo "" +} + +ROOT="$(realpath "$(dirname "$0")/../../")" +BUILD_ZIG_ZON="$ROOT/build.zig.zon" +BUILD_ZIG_ZON_NIX="$ROOT/build.zig.zon.nix" +BUILD_ZIG_ZON_TXT="$ROOT/build.zig.zon.txt" +BUILD_ZIG_ZON_JSON="$ROOT/build.zig.zon.json" +ZIG_PACKAGES_JSON="$ROOT/flatpak/zig-packages.json" + +if [ -f "${BUILD_ZIG_ZON_NIX}" ]; then + OLD_HASH_NIX=$(sha512sum "${BUILD_ZIG_ZON_NIX}" | awk '{print $1}') +elif [ "$1" != "--update" ]; then + echo -e "\nERROR: build.zig.zon.nix missing." + help + exit 1 +fi + +if [ -f "${BUILD_ZIG_ZON_TXT}" ]; then + OLD_HASH_TXT=$(sha512sum "${BUILD_ZIG_ZON_TXT}" | awk '{print $1}') +elif [ "$1" != "--update" ]; then + echo -e "\nERROR: build.zig.zon.txt missing." + help + exit 1 +fi + +if [ -f "${BUILD_ZIG_ZON_JSON}" ]; then + OLD_HASH_JSON=$(sha512sum "${BUILD_ZIG_ZON_JSON}" | awk '{print $1}') +elif [ "$1" != "--update" ]; then + echo -e "\nERROR: build.zig.zon.json missing." + help + exit 1 +fi + +if [ -f "${ZIG_PACKAGES_JSON}" ]; then + OLD_HASH_FLATPAK=$(sha512sum "${ZIG_PACKAGES_JSON}" | awk '{print $1}') +elif [ "$1" != "--update" ]; then + echo -e "\nERROR: flatpak/zig-packages.json missing." + help + exit 1 +fi + +zon2nix "$BUILD_ZIG_ZON" --15 --nix "$WORK_DIR/build.zig.zon.nix" --txt "$WORK_DIR/build.zig.zon.txt" --json "$WORK_DIR/build.zig.zon.json" --flatpak "$WORK_DIR/zig-packages.json" +alejandra --quiet "$WORK_DIR/build.zig.zon.nix" +prettier --log-level warn --write "$WORK_DIR/build.zig.zon.json" +prettier --log-level warn --write "$WORK_DIR/zig-packages.json" + +NEW_HASH_NIX=$(sha512sum "$WORK_DIR/build.zig.zon.nix" | awk '{print $1}') +NEW_HASH_TXT=$(sha512sum "$WORK_DIR/build.zig.zon.txt" | awk '{print $1}') +NEW_HASH_JSON=$(sha512sum "$WORK_DIR/build.zig.zon.json" | awk '{print $1}') +NEW_HASH_FLATPAK=$(sha512sum "$WORK_DIR/zig-packages.json" | awk '{print $1}') + +if [ "${OLD_HASH_NIX}" == "${NEW_HASH_NIX}" ] && [ "${OLD_HASH_TXT}" == "${NEW_HASH_TXT}" ] && [ "${OLD_HASH_JSON}" == "${NEW_HASH_JSON}" ] && [ "${OLD_HASH_FLATPAK}" == "${NEW_HASH_FLATPAK}" ]; then + echo -e "\nOK: build.zig.zon.nix unchanged." + echo -e "OK: build.zig.zon.txt unchanged." + echo -e "OK: build.zig.zon.json unchanged." + echo -e "OK: flatpak/zig-packages.json unchanged." + exit 0 +elif [ "$1" != "--update" ]; then + echo -e "\nERROR: build.zig.zon.nix, build.zig.zon.txt, or build.zig.zon.json needs to be updated.\n" + echo " * Old build.zig.zon.nix hash: ${OLD_HASH_NIX}" + echo " * New build.zig.zon.nix hash: ${NEW_HASH_NIX}" + echo " * Old build.zig.zon.txt hash: ${OLD_HASH_TXT}" + echo " * New build.zig.zon.txt hash: ${NEW_HASH_TXT}" + echo " * Old build.zig.zon.json hash: ${OLD_HASH_JSON}" + echo " * New build.zig.zon.json hash: ${NEW_HASH_JSON}" + echo " * Old flatpak/zig-packages.json hash: ${OLD_HASH_FLATPAK}" + echo " * New flatpak/zig-packages.json hash: ${NEW_HASH_FLATPAK}" + help + exit 1 +else + mv "$WORK_DIR/build.zig.zon.nix" "$BUILD_ZIG_ZON_NIX" + echo -e "\nOK: build.zig.zon.nix updated." + mv "$WORK_DIR/build.zig.zon.txt" "$BUILD_ZIG_ZON_TXT" + echo -e "OK: build.zig.zon.txt updated." + mv "$WORK_DIR/build.zig.zon.json" "$BUILD_ZIG_ZON_JSON" + echo -e "OK: build.zig.zon.json updated." + mv "$WORK_DIR/zig-packages.json" "$ZIG_PACKAGES_JSON" + echo -e "OK: flatpak/zig-packages.json updated." + exit 0 +fi diff --git a/vendor/libghostty-vt/nix/build-support/fetch-zig-cache.sh b/vendor/libghostty-vt/nix/build-support/fetch-zig-cache.sh new file mode 100755 index 00000000..9cc3dce2 --- /dev/null +++ b/vendor/libghostty-vt/nix/build-support/fetch-zig-cache.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# NOTE THIS IS A TEMPORARY SCRIPT TO SUPPORT PACKAGE MAINTAINERS. +# +# A future Zig version will hopefully fix the issue where +# `zig build --fetch` doesn't fetch transitive dependencies[1]. When that +# is resolved, we won't need any special machinery for the general use case +# at all and packagers can just use `zig build --fetch`. +# +# [1]: https://github.com/ziglang/zig/issues/20976 + +if [ -z ${ZIG_GLOBAL_CACHE_DIR+x} ] +then + echo "must set ZIG_GLOBAL_CACHE_DIR!" + exit 1 +fi + +# Go through each line of our build.zig.zon.txt and fetch it. +SCRIPT_PATH="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)" +ZON_TXT_FILE="$SCRIPT_PATH/../../build.zig.zon.txt" +while IFS= read -r url; do + echo "Fetching: $url" + zig fetch "$url" >/dev/null 2>&1 || { + echo "Failed to fetch: $url" >&2 + exit 1 + } +done < "$ZON_TXT_FILE" diff --git a/vendor/libghostty-vt/nix/build-support/gi-typelib-path.nix b/vendor/libghostty-vt/nix/build-support/gi-typelib-path.nix new file mode 100644 index 00000000..2e9533cb --- /dev/null +++ b/vendor/libghostty-vt/nix/build-support/gi-typelib-path.nix @@ -0,0 +1,17 @@ +{ + pkgs, + lib, + stdenv, +}: +lib.makeSearchPath "lib/girepository-1.0" (map (lib.getOutput "lib") (lib.optionals stdenv.hostPlatform.isLinux [ + pkgs.cairo + pkgs.gdk-pixbuf + pkgs.glib + pkgs.gobject-introspection + pkgs.graphene + pkgs.gtk4 + pkgs.gtk4-layer-shell + pkgs.harfbuzz + pkgs.libadwaita + pkgs.pango +])) diff --git a/vendor/libghostty-vt/nix/build-support/ld-library-path.nix b/vendor/libghostty-vt/nix/build-support/ld-library-path.nix new file mode 100644 index 00000000..b90a56d9 --- /dev/null +++ b/vendor/libghostty-vt/nix/build-support/ld-library-path.nix @@ -0,0 +1,10 @@ +{ + pkgs, + lib, + stdenv, + enableX11 ? true, + enableWayland ? true, +}: +lib.makeLibraryPath (import ./build-inputs.nix { + inherit pkgs lib stdenv enableX11 enableWayland; +}) diff --git a/vendor/libghostty-vt/nix/build-support/update-mirror.nu b/vendor/libghostty-vt/nix/build-support/update-mirror.nu new file mode 100755 index 00000000..8571ddea --- /dev/null +++ b/vendor/libghostty-vt/nix/build-support/update-mirror.nu @@ -0,0 +1,96 @@ +#!/usr/bin/env nu + +# This script downloads external dependencies from build.zig.zon.json that +# are not already mirrored at deps.files.ghostty.org, saves them to a local +# directory, and updates build.zig.zon to point to the new mirror URLs. +# +# The downloaded files are unmodified so their checksums and content hashes +# will match the originals. +# +# After running this script, the files in the output directory can be uploaded +# to blob storage, and build.zig.zon will already be updated with the new URLs. +def main [ + --output: string = "tmp-mirror", # Output directory for the mirrored files + --prefix: string = "https://deps.files.ghostty.org/", # Final URL prefix to ignore + --dry-run, # Print what would be downloaded without downloading +] { + let script_dir = ($env.CURRENT_FILE | path dirname) + let input_file = ($script_dir | path join ".." ".." "build.zig.zon.json") + let zon_file = ($script_dir | path join ".." ".." "build.zig.zon") + let output_dir = $output + + # Ensure the output directory exists + mkdir $output_dir + + # Read and parse the JSON file + let deps = open $input_file + + # Track URL replacements for build.zig.zon + mut url_replacements = [] + + # Process each dependency + for entry in ($deps | transpose key value) { + let key = $entry.key + let name = $entry.value.name + let url = $entry.value.url + + # Skip URLs that don't start with http(s) + if not ($url | str starts-with "http") { + continue + } + + # Skip URLs already hosted at the prefix + if ($url | str starts-with $prefix) { + continue + } + + # Extract the file extension from the URL + let extension = ($url | parse -r '(\.[a-z0-9]+(?:\.[a-z0-9]+)?)$' | get -o capture0.0 | default "") + + # Try to extract commit hash (40 hex chars) from URL + let commit_hash = ($url | parse -r '([a-f0-9]{40})' | get -o capture0.0 | default "") + + # Try to extract date pattern (YYYY-MM-DD or YYYYMMDD with optional suffixes) + let date_pattern = ($url | parse -r '((?:release-)?20\d{2}(?:-?\d{2}){2}(?:[-]\d+)*(?:[-][a-z0-9]+)?)' | get -o capture0.0 | default "") + + # Build filename based on what we found + let filename = if (not ($commit_hash | is-empty)) { + $"($name)-($commit_hash)($extension)" + } else if (not ($date_pattern | is-empty)) { + $"($name)-($date_pattern)($extension)" + } else { + $"($key)($extension)" + } + let new_url = $"($prefix)($filename)" + print $"($url) -> ($filename)" + + # Track the replacement + $url_replacements = ($url_replacements | append {old: $url, new: $new_url}) + + # Download the file + if not $dry_run { + http get $url | save -f ($output_dir | path join $filename) + } + } + + if $dry_run { + print "Dry run complete - no files were downloaded\n" + print $"Would update ($url_replacements | length) URLs in build.zig.zon" + } else { + print "All dependencies downloaded successfully\n" + print $"Updating ($zon_file)..." + + # Backup the old file + let backup_file = $"($zon_file).bak" + cp $zon_file $backup_file + print $"Backed up to ($backup_file)" + + mut zon_content = (open $zon_file) + for replacement in $url_replacements { + $zon_content = ($zon_content | str replace $replacement.old $replacement.new) + } + $zon_content | save -f $zon_file + + print $"Updated ($url_replacements | length) URLs in build.zig.zon" + } +} diff --git a/vendor/libghostty-vt/nix/devShell.nix b/vendor/libghostty-vt/nix/devShell.nix new file mode 100644 index 00000000..df08fc20 --- /dev/null +++ b/vendor/libghostty-vt/nix/devShell.nix @@ -0,0 +1,234 @@ +{ + mkShell, + lib, + stdenv, + bashInteractive, + doxygen, + nushell, + appstream, + flatpak-builder, + gdb, + cmake, + #, glxinfo # unused + ncurses, + nodejs, + nodePackages, + oniguruma, + parallel, + pkg-config, + python3, + qemu, + scdoc, + # snapcraft, + valgrind, + #, vulkan-loader # unused + vttest, + wabt, + wasmtime, + wraptest, + zig, + zig_0_15, + zip, + llvmPackages_latest, + bzip2, + expat, + fontconfig, + freetype, + glib, + glslang, + gtk4, + gtk4-layer-shell, + gobject-introspection, + gst_all_1, + libadwaita, + blueprint-compiler, + gettext, + adwaita-icon-theme, + hicolor-icon-theme, + harfbuzz, + libpng, + libxkbcommon, + libX11, + libXcursor, + libXext, + libXi, + libXinerama, + libXrandr, + libxml2, + spirv-cross, + simdutf, + zlib, + alejandra, + jq, + minisign, + pandoc, + pinact, + hyperfine, + poop, + typos, + shellcheck, + swiftlint, + uv, + wayland, + wayland-scanner, + wayland-protocols, + zon2nix, + pkgs, + # needed by GTK for loading SVG icons while running from within the + # developer shell + glycin-loaders, + librsvg, +}: let + # See package.nix. Keep in sync. + ld_library_path = import ./build-support/ld-library-path.nix { + inherit pkgs lib stdenv; + }; + gi_typelib_path = import ./build-support/gi-typelib-path.nix { + inherit pkgs lib stdenv; + }; +in + mkShell { + name = "ghostty"; + packages = + [ + # For builds + cmake + doxygen + jq + llvmPackages_latest.llvm + minisign + ncurses + pandoc + pkg-config + scdoc + zig + zip + zon2nix.packages.${stdenv.hostPlatform.system}.zon2nix + + # For web and wasm stuff + nodejs + + # Linting + nodePackages.prettier + alejandra + pinact + typos + shellcheck + + # Testing + parallel + python3 + vttest + hyperfine + + # wasm + wabt + wasmtime + + # Localization + gettext + + # CI + uv + + # Scripting + nushell + + # We need these GTK-related deps on all platform so we can build + # dist tarballs. + blueprint-compiler + libadwaita + gtk4 + + # Python packages + (python3.withPackages (python-pkgs: [ + python-pkgs.ucs-detect + ])) + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + # My nix shell environment installs the non-interactive version + # by default so we have to include this. + bashInteractive + + # Used for testing SIMD codegen. This is Linux only because the macOS + # build only has the qemu-system files. + qemu + + appstream + flatpak-builder + gdb + # snapcraft + valgrind + wraptest + + bzip2 + expat + fontconfig + freetype + harfbuzz + libpng + libxml2 + oniguruma + simdutf + zlib + + glslang + spirv-cross + + libxkbcommon + libX11 + libXcursor + libXext + libXi + libXinerama + libXrandr + + # Only needed for GTK builds + gtk4-layer-shell + glib + gobject-introspection + wayland + wayland-scanner + wayland-protocols + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + + # needed by GTK for loading SVG icons while running from within the + # developer shell + glycin-loaders + librsvg + + # for benchmarking + poop + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + swiftlint + ]; + + # This should be set onto the rpath of the ghostty binary if you want + # it to be "portable" across the system. + LD_LIBRARY_PATH = ld_library_path; + GI_TYPELIB_PATH = gi_typelib_path; + + shellHook = + (lib.optionalString stdenv.hostPlatform.isLinux '' + # On Linux we need to setup the environment so that all GTK data + # is available (namely icons). + + # Minimal subset of env set by wrapGAppsHook4 for icons and global settings + export XDG_DATA_DIRS=$XDG_DATA_DIRS:${hicolor-icon-theme}/share:${adwaita-icon-theme}/share + export XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH # from glib setup hook + '') + + (lib.optionalString stdenv.hostPlatform.isDarwin '' + # On macOS, we unset the macOS SDK env vars that Nix sets up because + # we rely on a system installation. Nix only provides a macOS SDK + # and we need iOS too. + unset SDKROOT + unset DEVELOPER_DIR + + # We need to remove "xcrun" from the PATH. It is injected by + # some dependency but we need to rely on system Xcode tools + export PATH=$(echo "$PATH" | awk -v RS=: -v ORS=: '$0 !~ /xcrun/ || $0 == "/usr/bin" {print}' | sed 's/:$//') + ''); + } diff --git a/vendor/libghostty-vt/nix/libghostty-vt.nix b/vendor/libghostty-vt/nix/libghostty-vt.nix new file mode 100644 index 00000000..fbe87ef0 --- /dev/null +++ b/vendor/libghostty-vt/nix/libghostty-vt.nix @@ -0,0 +1,85 @@ +{ + lib, + stdenv, + callPackage, + git, + pkg-config, + zig_0_15, + revision ? "dirty", + optimize ? "Debug", +}: +stdenv.mkDerivation (finalAttrs: { + pname = "ghostty"; + version = "0.1.0-dev"; + + # We limit source like this to try and reduce the amount of rebuilds as possible + # thus we only provide the source that is needed for the build + # + # NOTE: as of the current moment only linux files are provided, + # since darwin support is not finished + src = lib.fileset.toSource { + root = ../.; + fileset = lib.fileset.intersection (lib.fileset.fromSource (lib.sources.cleanSource ../.)) ( + lib.fileset.unions [ + ../dist/linux + ../images + ../include + ../po + ../pkg + ../src + ../vendor + ../build.zig + ../build.zig.zon + ../build.zig.zon.nix + ] + ); + }; + + deps = callPackage ../build.zig.zon.nix {name = "ghostty-cache-${finalAttrs.version}";}; + + nativeBuildInputs = [ + git + pkg-config + zig_0_15 + ]; + + buildInputs = []; + + dontSetZigDefaultFlags = true; + + zigBuildFlags = [ + "--system" + "${finalAttrs.deps}" + "-Dversion-string=${finalAttrs.version}-${revision}-nix" + "-Dcpu=baseline" + "-Doptimize=${optimize}" + "-Dapp-runtime=none" + "-Demit-lib-vt=true" + ]; + + outputs = [ + "out" + "dev" + ]; + + postInstall = '' + mkdir -p "$dev/lib" + mv "$out/lib/libghostty-vt.a" "$dev/lib" + rm "$out/lib/libghostty-vt.so" + mv "$out/include" "$dev" + mv "$out/share" "$dev" + + ln -sf "$out/lib/libghostty-vt.so.0" "$dev/lib/libghostty-vt.so" + ''; + + postFixup = '' + substituteInPlace "$dev/share/pkgconfig/libghostty-vt.pc" \ + --replace "$out" "$dev" + ''; + + meta = { + homepage = "https://ghostty.org"; + license = lib.licenses.mit; + platforms = zig_0_15.meta.platforms; + }; +}) diff --git a/vendor/libghostty-vt/nix/package.nix b/vendor/libghostty-vt/nix/package.nix new file mode 100644 index 00000000..8287b088 --- /dev/null +++ b/vendor/libghostty-vt/nix/package.nix @@ -0,0 +1,141 @@ +{ + lib, + stdenv, + callPackage, + gobject-introspection, + blueprint-compiler, + libxml2, + gettext, + wrapGAppsHook4, + git, + ncurses, + pkg-config, + zig_0_15, + pandoc, + revision ? "dirty", + optimize ? "Debug", + enableX11 ? true, + enableWayland ? true, + wayland-protocols, + wayland-scanner, + pkgs, +}: let + gi_typelib_path = import ./build-support/gi-typelib-path.nix { + inherit pkgs lib stdenv; + }; + buildInputs = import ./build-support/build-inputs.nix { + inherit pkgs lib stdenv enableX11 enableWayland; + }; + strip = optimize != "Debug" && optimize != "ReleaseSafe"; +in + stdenv.mkDerivation (finalAttrs: { + pname = "ghostty"; + version = "1.3.2-dev"; + + # We limit source like this to try and reduce the amount of rebuilds as possible + # thus we only provide the source that is needed for the build + # + # NOTE: as of the current moment only linux files are provided, + # since darwin support is not finished + src = lib.fileset.toSource { + root = ../.; + fileset = lib.fileset.intersection (lib.fileset.fromSource (lib.sources.cleanSource ../.)) ( + lib.fileset.unions [ + ../dist/linux + ../images + ../include + ../po + ../pkg + ../src + ../vendor + ../build.zig + ../build.zig.zon + ../build.zig.zon.nix + ] + ); + }; + + deps = callPackage ../build.zig.zon.nix {name = "ghostty-cache-${finalAttrs.version}";}; + + nativeBuildInputs = + [ + git + ncurses + pandoc + pkg-config + zig_0_15 + gobject-introspection + wrapGAppsHook4 + blueprint-compiler + libxml2 # for xmllint + gettext + ] + ++ lib.optionals enableWayland [ + wayland-scanner + wayland-protocols + ]; + + buildInputs = buildInputs; + + dontStrip = !strip; + + GI_TYPELIB_PATH = gi_typelib_path; + + dontSetZigDefaultFlags = true; + + zigBuildFlags = [ + "--system" + "${finalAttrs.deps}" + "-Dversion-string=${finalAttrs.version}-${revision}-nix" + "-Dgtk-x11=${lib.boolToString enableX11}" + "-Dgtk-wayland=${lib.boolToString enableWayland}" + "-Dcpu=baseline" + "-Doptimize=${optimize}" + "-Dstrip=${lib.boolToString strip}" + ]; + + outputs = [ + "out" + "terminfo" + "shell_integration" + "vim" + ]; + + postInstall = '' + terminfo_src=${ + if stdenv.hostPlatform.isDarwin + then ''"$out/Applications/Ghostty.app/Contents/Resources/terminfo"'' + else "$out/share/terminfo" + } + + mkdir -p "$out/nix-support" + + mkdir -p "$terminfo/share" + mv "$terminfo_src" "$terminfo/share/terminfo" + ln -sf "$terminfo/share/terminfo" "$terminfo_src" + echo "$terminfo" >> "$out/nix-support/propagated-user-env-packages" + + mkdir -p "$shell_integration" + mv "$out/share/ghostty/shell-integration" "$shell_integration/shell-integration" + ln -sf "$shell_integration/shell-integration" "$out/share/ghostty/shell-integration" + echo "$shell_integration" >> "$out/nix-support/propagated-user-env-packages" + + mv $out/share/vim/vimfiles "$vim" + ln -sf "$vim" "$out/share/vim/vimfiles" + echo "$vim" >> "$out/nix-support/propagated-user-env-packages" + + echo "gst_all_1.gstreamer" >> "$out/nix-support/propagated-user-env-packages" + echo "gst_all_1.gst-plugins-base" >> "$out/nix-support/propagated-user-env-packages" + echo "gst_all_1.gst-plugins-good" >> "$out/nix-support/propagated-user-env-packages" + ''; + + meta = { + homepage = "https://ghostty.org"; + license = lib.licenses.mit; + platforms = [ + "x86_64-linux" + "aarch64-linux" + ]; + mainProgram = "ghostty"; + }; + }) diff --git a/vendor/libghostty-vt/nix/pkgs/blessed.nix b/vendor/libghostty-vt/nix/pkgs/blessed.nix new file mode 100644 index 00000000..da5d6958 --- /dev/null +++ b/vendor/libghostty-vt/nix/pkgs/blessed.nix @@ -0,0 +1,40 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + flit-core, + six, + wcwidth, +}: +buildPythonPackage (finalAttrs: { + pname = "blessed"; + version = "1.31"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "jquast"; + repo = "blessed"; + tag = finalAttrs.version; + hash = "sha256-Nn+aiDk0Qwk9xAvAqtzds/WlrLAozjPL1eSVNU75tJA="; + }; + + build-system = [flit-core]; + + propagatedBuildInputs = [ + wcwidth + six + ]; + + doCheck = false; + dontCheckRuntimeDeps = true; + + meta = with lib; { + homepage = "https://github.com/jquast/blessed"; + description = "Thin, practical wrapper around terminal capabilities in Python"; + maintainers = []; + license = licenses.mit; + }; +}) diff --git a/vendor/libghostty-vt/nix/pkgs/ucs-detect.nix b/vendor/libghostty-vt/nix/pkgs/ucs-detect.nix new file mode 100644 index 00000000..5bbcdd07 --- /dev/null +++ b/vendor/libghostty-vt/nix/pkgs/ucs-detect.nix @@ -0,0 +1,47 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + hatchling, + # Dependencies + blessed, + wcwidth, + pyyaml, + prettytable, + requests, +}: +buildPythonPackage (finalAttrs: { + pname = "ucs-detect"; + version = "2.0.2"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "jquast"; + repo = "ucs-detect"; + tag = finalAttrs.version; + hash = "sha256-pCJNrJN+SO0pGveNJuISJbzOJYyxP9Tbljp8PwqbgYU="; + }; + + dependencies = [ + blessed + wcwidth + pyyaml + prettytable + requests + ]; + + nativeBuildInputs = [hatchling]; + + doCheck = false; + dontCheckRuntimeDeps = true; + + meta = with lib; { + description = "Measures number of Terminal column cells of wide-character codes"; + homepage = "https://github.com/jquast/ucs-detect"; + license = licenses.mit; + maintainers = []; + }; +}) diff --git a/vendor/libghostty-vt/nix/pkgs/wcwidth.nix b/vendor/libghostty-vt/nix/pkgs/wcwidth.nix new file mode 100644 index 00000000..4bbd1373 --- /dev/null +++ b/vendor/libghostty-vt/nix/pkgs/wcwidth.nix @@ -0,0 +1,27 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + hatchling, +}: +buildPythonPackage rec { + pname = "wcwidth"; + version = "0.6.0"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-zcTkJi1u+aGlfgGDhMvrEgjYq7xkF2An4sJFXIExMVk="; + }; + + build-system = [hatchling]; + + doCheck = false; + + meta = with lib; { + description = "Measures the displayed width of unicode strings in a terminal"; + homepage = "https://github.com/jquast/wcwidth"; + license = licenses.mit; + maintainers = []; + }; +} diff --git a/vendor/libghostty-vt/nix/pkgs/wraptest.nix b/vendor/libghostty-vt/nix/pkgs/wraptest.nix new file mode 100644 index 00000000..a5cd89b7 --- /dev/null +++ b/vendor/libghostty-vt/nix/pkgs/wraptest.nix @@ -0,0 +1,43 @@ +{ + stdenv, + fetchFromGitHub, + autoPatchelfHook, +}: +stdenv.mkDerivation rec { + version = "0.1.0-e7a96089"; + pname = "wraptest"; + + src = fetchFromGitHub { + owner = "mattiase"; + repo = pname; + rev = "e7a960892873035d2ef56b9770c32b43635821fb"; + sha256 = "sha256-+v6xpPCmvKfsDkPmBSv6+6yAg2Kzame5Zwx2WKjQreI="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + ]; + + buildPhase = '' + runHook preBuild + + cc -O3 -o wraptest wraptest.c + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp wraptest $out/bin/ + + runHook postInstall + ''; + + meta = { + description = "Test of DEC VT terminal line-wrapping semantics"; + homepage = "https://github.com/mattiase/wraptest"; + platforms = ["aarch64-linux" "i686-linux" "x86_64-linux"]; + }; +} diff --git a/vendor/libghostty-vt/nix/tests.nix b/vendor/libghostty-vt/nix/tests.nix new file mode 100644 index 00000000..28fefbf2 --- /dev/null +++ b/vendor/libghostty-vt/nix/tests.nix @@ -0,0 +1,284 @@ +{ + self, + system, + nixpkgs, + home-manager, + ... +}: let + nixos-version = nixpkgs.lib.trivial.release; + + pkgs = import nixpkgs { + inherit system; + overlays = [ + self.overlays.debug + ]; + }; + + pink_value = "#FF0087"; + + color_test = '' + import tempfile + import subprocess + + def check_for_pink(final=False) -> bool: + with tempfile.NamedTemporaryFile() as tmpin: + machine.send_monitor_command("screendump {}".format(tmpin.name)) + + cmd = 'convert {} -define histogram:unique-colors=true -format "%c" histogram:info:'.format( + tmpin.name + ) + ret = subprocess.run(cmd, shell=True, capture_output=True) + if ret.returncode != 0: + raise Exception( + "image analysis failed with exit code {}".format(ret.returncode) + ) + + text = ret.stdout.decode("utf-8") + return "${pink_value}" in text + ''; + + mkNodeGnome = { + config, + pkgs, + settings, + sshPort ? null, + ... + }: { + imports = [ + ./vm/wayland-gnome.nix + settings + ]; + + virtualisation = { + forwardPorts = pkgs.lib.optionals (sshPort != null) [ + { + from = "host"; + host.port = sshPort; + guest.port = 22; + } + ]; + + vmVariant = { + virtualisation.host.pkgs = pkgs; + }; + }; + + services.openssh = { + enable = true; + settings = { + PermitRootLogin = "yes"; + PermitEmptyPasswords = "yes"; + }; + }; + + security.pam.services.sshd.allowNullPassword = true; + + users.groups.ghostty = { + gid = 1000; + }; + + users.users.ghostty = { + uid = 1000; + }; + + home-manager = { + users = { + ghostty = { + home = { + username = config.users.users.ghostty.name; + homeDirectory = config.users.users.ghostty.home; + stateVersion = nixos-version; + }; + programs.ssh = { + enable = true; + enableDefaultConfig = false; + extraOptionOverrides = { + StrictHostKeyChecking = "accept-new"; + UserKnownHostsFile = "/dev/null"; + }; + }; + }; + }; + }; + + system.stateVersion = nixos-version; + }; + + mkTestGnome = { + name, + settings, + testScript, + ocr ? false, + }: + pkgs.testers.runNixOSTest { + name = name; + + enableOCR = ocr; + + extraBaseModules = { + imports = [ + home-manager.nixosModules.home-manager + ]; + }; + + nodes = { + machine = { + config, + pkgs, + ... + }: + mkNodeGnome { + inherit config pkgs settings; + sshPort = 2222; + }; + }; + + testScript = testScript; + }; +in { + basic-version-check = pkgs.testers.runNixOSTest { + name = "basic-version-check"; + nodes = { + machine = {pkgs, ...}: { + users.groups.ghostty = {}; + users.users.ghostty = { + isNormalUser = true; + group = "ghostty"; + extraGroups = ["wheel"]; + hashedPassword = ""; + packages = [ + pkgs.ghostty + ]; + }; + }; + }; + testScript = {...}: '' + machine.succeed("su - ghostty -c 'ghostty +version'") + ''; + }; + + basic-window-check-gnome = mkTestGnome { + name = "basic-window-check-gnome"; + settings = { + home-manager.users.ghostty = { + xdg.configFile = { + "ghostty/config".text = '' + background = ${pink_value} + ''; + }; + }; + }; + ocr = true; + testScript = {nodes, ...}: let + user = nodes.machine.users.users.ghostty; + bus_path = "/run/user/${toString user.uid}/bus"; + bus = "DBUS_SESSION_BUS_ADDRESS=unix:path=${bus_path}"; + gdbus = "${bus} gdbus"; + ghostty = "${bus} ghostty"; + su = command: "su - ${user.name} -c '${command}'"; + gseval = "call --session -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval"; + wm_class = su "${gdbus} ${gseval} global.display.focus_window.wm_class"; + in '' + ${color_test} + + with subtest("wait for x"): + start_all() + machine.wait_for_x() + + machine.wait_for_file("${bus_path}") + + with subtest("Ensuring no pink is present without the terminal."): + assert ( + check_for_pink() == False + ), "Pink was present on the screen before we even launched a terminal!" + + machine.systemctl("enable app-com.mitchellh.ghostty-debug.service", user="${user.name}") + machine.succeed("${su "${ghostty} +new-window"}") + machine.wait_until_succeeds("${wm_class} | grep -q 'com.mitchellh.ghostty-debug'") + + machine.sleep(2) + + with subtest("Have the terminal display a color."): + assert( + check_for_pink() == True + ), "Pink was not found on the screen!" + + machine.systemctl("stop app-com.mitchellh.ghostty-debug.service", user="${user.name}") + ''; + }; + + ssh-integration-test = pkgs.testers.runNixOSTest { + name = "ssh-integration-test"; + extraBaseModules = { + imports = [ + home-manager.nixosModules.home-manager + ]; + }; + nodes = { + server = {...}: { + users.groups.ghostty = {}; + users.users.ghostty = { + isNormalUser = true; + group = "ghostty"; + extraGroups = ["wheel"]; + hashedPassword = ""; + packages = []; + }; + services.openssh = { + enable = true; + settings = { + PermitRootLogin = "yes"; + PermitEmptyPasswords = "yes"; + }; + }; + security.pam.services.sshd.allowNullPassword = true; + }; + client = { + config, + pkgs, + ... + }: + mkNodeGnome { + inherit config pkgs; + settings = { + home-manager.users.ghostty = { + xdg.configFile = { + "ghostty/config".text = let + in '' + shell-integration-features = ssh-terminfo + ''; + }; + }; + }; + sshPort = 2222; + }; + }; + testScript = {nodes, ...}: let + user = nodes.client.users.users.ghostty; + bus_path = "/run/user/${toString user.uid}/bus"; + bus = "DBUS_SESSION_BUS_ADDRESS=unix:path=${bus_path}"; + gdbus = "${bus} gdbus"; + ghostty = "${bus} ghostty"; + su = command: "su - ${user.name} -c '${command}'"; + gseval = "call --session -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval"; + wm_class = su "${gdbus} ${gseval} global.display.focus_window.wm_class"; + in '' + with subtest("Start server and wait for ssh to be ready."): + server.start() + server.wait_for_open_port(22) + + with subtest("Start client and wait for ghostty window."): + client.start() + client.wait_for_x() + client.wait_for_file("${bus_path}") + client.systemctl("enable app-com.mitchellh.ghostty-debug.service", user="${user.name}") + client.succeed("${su "${ghostty} +new-window"}") + client.wait_until_succeeds("${wm_class} | grep -q 'com.mitchellh.ghostty-debug'") + + with subtest("SSH from client to server and verify that the Ghostty terminfo is copied."): + client.sleep(2) + client.send_chars("ssh ghostty@server\n") + server.wait_for_file("${user.home}/.terminfo/x/xterm-ghostty", timeout=30) + ''; + }; +} diff --git a/vendor/libghostty-vt/nix/vm/common-cinnamon.nix b/vendor/libghostty-vt/nix/vm/common-cinnamon.nix new file mode 100644 index 00000000..dabe5e70 --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/common-cinnamon.nix @@ -0,0 +1,18 @@ +{...}: { + imports = [ + ./common.nix + ]; + + services.xserver = { + displayManager = { + lightdm = { + enable = true; + }; + }; + desktopManager = { + cinnamon = { + enable = true; + }; + }; + }; +} diff --git a/vendor/libghostty-vt/nix/vm/common-gnome.nix b/vendor/libghostty-vt/nix/vm/common-gnome.nix new file mode 100644 index 00000000..d8d48407 --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/common-gnome.nix @@ -0,0 +1,149 @@ +{ + config, + lib, + pkgs, + ... +}: { + imports = [ + ./common.nix + ]; + + services = { + displayManager = { + gdm = { + enable = true; + autoSuspend = false; + }; + }; + desktopManager = { + gnome = { + enable = true; + }; + }; + }; + + systemd.user.services = { + "org.gnome.Shell@wayland" = { + serviceConfig = { + ExecStart = [ + # Clear the list before overriding it. + "" + # Eval API is now internal so Shell needs to run in unsafe mode. + "${pkgs.gnome-shell}/bin/gnome-shell --unsafe-mode" + ]; + }; + }; + }; + + environment.systemPackages = [ + pkgs.gnomeExtensions.no-overview + ]; + + environment.gnome.excludePackages = with pkgs; [ + atomix + baobab + cheese + epiphany + evince + file-roller + geary + gnome-backgrounds + gnome-calculator + gnome-calendar + gnome-clocks + gnome-connections + gnome-contacts + gnome-disk-utility + gnome-extension-manager + gnome-logs + gnome-maps + gnome-music + gnome-photos + gnome-software + gnome-system-monitor + gnome-text-editor + gnome-themes-extra + gnome-tour + gnome-user-docs + gnome-weather + hitori + iagno + loupe + nautilus + orca + seahorse + simple-scan + snapshot + sushi + tali + totem + yelp + ]; + + programs.dconf = { + enable = true; + profiles.user.databases = [ + { + settings = with lib.gvariant; { + "org/gnome/desktop/background" = { + picture-uri = "file://${pkgs.ghostty}/share/icons/hicolor/512x512/apps/com.mitchellh.ghostty.png"; + picture-uri-dark = "file://${pkgs.ghostty}/share/icons/hicolor/512x512/apps/com.mitchellh.ghostty.png"; + picture-options = "centered"; + primary-color = "#000000000000"; + secondary-color = "#000000000000"; + }; + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + "org/gnome/desktop/notifications" = { + show-in-lock-screen = false; + }; + "org/gnome/desktop/screensaver" = { + lock-enabled = false; + picture-uri = "file://${pkgs.ghostty}/share/icons/hicolor/512x512/apps/com.mitchellh.ghostty.png"; + picture-options = "centered"; + primary-color = "#000000000000"; + secondary-color = "#000000000000"; + }; + "org/gnome/desktop/session" = { + idle-delay = mkUint32 0; + }; + "org/gnome/shell" = { + disable-user-extensions = false; + enabled-extensions = builtins.map (x: x.extensionUuid) ( + lib.filter (p: p ? extensionUuid) config.environment.systemPackages + ); + }; + }; + } + ]; + }; + + programs.geary.enable = false; + + services.gnome = { + gnome-browser-connector.enable = false; + gnome-initial-setup.enable = false; + gnome-online-accounts.enable = false; + gnome-remote-desktop.enable = false; + rygel.enable = false; + }; + + system.activationScripts = { + face = { + text = '' + mkdir -p /var/lib/AccountsService/{icons,users} + + cp ${pkgs.ghostty}/share/icons/hicolor/1024x1024/apps/com.mitchellh.ghostty.png /var/lib/AccountsService/icons/ghostty + + echo -e "[User]\nIcon=/var/lib/AccountsService/icons/ghostty\n" > /var/lib/AccountsService/users/ghostty + + chown root:root /var/lib/AccountsService/users/ghostty + chmod 0600 /var/lib/AccountsService/users/ghostty + + chown root:root /var/lib/AccountsService/icons/ghostty + chmod 0444 /var/lib/AccountsService/icons/ghostty + ''; + }; + }; +} diff --git a/vendor/libghostty-vt/nix/vm/common-plasma6.nix b/vendor/libghostty-vt/nix/vm/common-plasma6.nix new file mode 100644 index 00000000..e5c9bd4d --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/common-plasma6.nix @@ -0,0 +1,21 @@ +{...}: { + imports = [ + ./common.nix + ]; + + services = { + displayManager = { + sddm = { + enable = true; + wayland = { + enable = true; + }; + }; + }; + desktopManager = { + plasma6 = { + enable = true; + }; + }; + }; +} diff --git a/vendor/libghostty-vt/nix/vm/common-xfce.nix b/vendor/libghostty-vt/nix/vm/common-xfce.nix new file mode 100644 index 00000000..12a20d8d --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/common-xfce.nix @@ -0,0 +1,18 @@ +{...}: { + imports = [ + ./common.nix + ]; + + services.xserver = { + displayManager = { + lightdm = { + enable = true; + }; + }; + desktopManager = { + xfce = { + enable = true; + }; + }; + }; +} diff --git a/vendor/libghostty-vt/nix/vm/common.nix b/vendor/libghostty-vt/nix/vm/common.nix new file mode 100644 index 00000000..b2fec28e --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/common.nix @@ -0,0 +1,75 @@ +{pkgs, ...}: { + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + documentation.nixos.enable = false; + + virtualisation.vmVariant = { + virtualisation.memorySize = 2048; + }; + + nix = { + settings = { + trusted-users = [ + "root" + "ghostty" + ]; + }; + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; + + users.mutableUsers = false; + + users.groups.ghostty = {}; + + users.users.ghostty = { + isNormalUser = true; + description = "Ghostty"; + group = "ghostty"; + extraGroups = ["wheel"]; + hashedPassword = ""; + }; + + environment.systemPackages = [ + pkgs.kitty + pkgs.fish + pkgs.ghostty + pkgs.helix + pkgs.neovim + pkgs.xterm + pkgs.zsh + ]; + + security.polkit = { + enable = true; + }; + + services.dbus = { + enable = true; + }; + + services.displayManager = { + autoLogin = { + enable = true; + user = "ghostty"; + }; + }; + + services.libinput = { + enable = true; + }; + + services.qemuGuest = { + enable = true; + }; + + services.spice-vdagentd = { + enable = true; + }; + + services.xserver = { + enable = true; + }; +} diff --git a/vendor/libghostty-vt/nix/vm/create-cinnamon.nix b/vendor/libghostty-vt/nix/vm/create-cinnamon.nix new file mode 100644 index 00000000..a9d9e44d --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/create-cinnamon.nix @@ -0,0 +1,12 @@ +{ + system, + nixpkgs, + overlay, + module, + uid ? 1000, + gid ? 1000, +}: +import ./create.nix { + inherit system nixpkgs overlay module uid gid; + common = ./common-cinnamon.nix; +} diff --git a/vendor/libghostty-vt/nix/vm/create-gnome.nix b/vendor/libghostty-vt/nix/vm/create-gnome.nix new file mode 100644 index 00000000..bcd31f2b --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/create-gnome.nix @@ -0,0 +1,12 @@ +{ + system, + nixpkgs, + overlay, + module, + uid ? 1000, + gid ? 1000, +}: +import ./create.nix { + inherit system nixpkgs overlay module uid gid; + common = ./common-gnome.nix; +} diff --git a/vendor/libghostty-vt/nix/vm/create-plasma6.nix b/vendor/libghostty-vt/nix/vm/create-plasma6.nix new file mode 100644 index 00000000..ede5371f --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/create-plasma6.nix @@ -0,0 +1,12 @@ +{ + system, + nixpkgs, + overlay, + module, + uid ? 1000, + gid ? 1000, +}: +import ./create.nix { + inherit system nixpkgs overlay module uid gid; + common = ./common-plasma6.nix; +} diff --git a/vendor/libghostty-vt/nix/vm/create-xfce.nix b/vendor/libghostty-vt/nix/vm/create-xfce.nix new file mode 100644 index 00000000..d1789472 --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/create-xfce.nix @@ -0,0 +1,12 @@ +{ + system, + nixpkgs, + overlay, + module, + uid ? 1000, + gid ? 1000, +}: +import ./create.nix { + inherit system nixpkgs overlay module uid gid; + common = ./common-xfce.nix; +} diff --git a/vendor/libghostty-vt/nix/vm/create.nix b/vendor/libghostty-vt/nix/vm/create.nix new file mode 100644 index 00000000..f8fe8500 --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/create.nix @@ -0,0 +1,42 @@ +{ + system, + nixpkgs, + overlay, + module, + common ? ./common.nix, + uid ? 1000, + gid ? 1000, +}: let + pkgs = import nixpkgs { + inherit system; + overlays = [ + overlay + ]; + }; +in + nixpkgs.lib.nixosSystem { + system = builtins.replaceStrings ["darwin"] ["linux"] system; + modules = [ + { + virtualisation.vmVariant = { + virtualisation.host.pkgs = pkgs; + }; + + nixpkgs.overlays = [ + overlay + ]; + + users.groups.ghostty = { + gid = gid; + }; + + users.users.ghostty = { + uid = uid; + }; + + system.stateVersion = nixpkgs.lib.trivial.release; + } + common + module + ]; + } diff --git a/vendor/libghostty-vt/nix/vm/wayland-cinnamon.nix b/vendor/libghostty-vt/nix/vm/wayland-cinnamon.nix new file mode 100644 index 00000000..531c882b --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/wayland-cinnamon.nix @@ -0,0 +1,7 @@ +{...}: { + imports = [ + ./common-cinnamon.nix + ]; + + services.displayManager.defaultSession = "cinnamon-wayland"; +} diff --git a/vendor/libghostty-vt/nix/vm/wayland-gnome.nix b/vendor/libghostty-vt/nix/vm/wayland-gnome.nix new file mode 100644 index 00000000..eb277d5d --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/wayland-gnome.nix @@ -0,0 +1,9 @@ +{...}: { + imports = [ + ./common-gnome.nix + ]; + + services.displayManager = { + defaultSession = "gnome"; + }; +} diff --git a/vendor/libghostty-vt/nix/vm/wayland-plasma6.nix b/vendor/libghostty-vt/nix/vm/wayland-plasma6.nix new file mode 100644 index 00000000..6e5a253b --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/wayland-plasma6.nix @@ -0,0 +1,6 @@ +{...}: { + imports = [ + ./common-plasma6.nix + ]; + services.displayManager.defaultSession = "plasma"; +} diff --git a/vendor/libghostty-vt/nix/vm/x11-cinnamon.nix b/vendor/libghostty-vt/nix/vm/x11-cinnamon.nix new file mode 100644 index 00000000..636f235a --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/x11-cinnamon.nix @@ -0,0 +1,7 @@ +{...}: { + imports = [ + ./common-cinnamon.nix + ]; + + services.displayManager.defaultSession = "cinnamon"; +} diff --git a/vendor/libghostty-vt/nix/vm/x11-plasma6.nix b/vendor/libghostty-vt/nix/vm/x11-plasma6.nix new file mode 100644 index 00000000..7818a80c --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/x11-plasma6.nix @@ -0,0 +1,6 @@ +{...}: { + imports = [ + ./common-plasma6.nix + ]; + services.displayManager.defaultSession = "plasmax11"; +} diff --git a/vendor/libghostty-vt/nix/vm/x11-xfce.nix b/vendor/libghostty-vt/nix/vm/x11-xfce.nix new file mode 100644 index 00000000..71eb87f2 --- /dev/null +++ b/vendor/libghostty-vt/nix/vm/x11-xfce.nix @@ -0,0 +1,7 @@ +{...}: { + imports = [ + ./common-xfce.nix + ]; + + services.displayManager.defaultSession = "xfce"; +} diff --git a/vendor/libghostty-vt/nix/zigCacheHash.nix b/vendor/libghostty-vt/nix/zigCacheHash.nix new file mode 100644 index 00000000..12f855e5 --- /dev/null +++ b/vendor/libghostty-vt/nix/zigCacheHash.nix @@ -0,0 +1,3 @@ +# This file is auto-generated! check build-support/check-zig-cache-hash.sh for +# more details. +"sha256-S8kS+gO17dl9LJGKL1+kgDUre+vPTmdTvXzgc585Fl8=" |
