From 733abbcc391f99c4bea3b91058486fe038ccfae2 Mon Sep 17 00:00:00 2001 From: Sander Date: Tue, 21 Apr 2026 22:54:53 +0200 Subject: [PATCH] libghostty-vt: revert .pc changes and use Nix to fix them Keeps the .pc files templated and instead uses Nix to rewrite the libdir for the static library. --- nix/libghostty-vt.nix | 3 --- src/build/GhosttyLibVt.zig | 19 +++++-------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/nix/libghostty-vt.nix b/nix/libghostty-vt.nix index abecceaac..c4f621fe8 100644 --- a/nix/libghostty-vt.nix +++ b/nix/libghostty-vt.nix @@ -59,9 +59,6 @@ stdenv.mkDerivation (finalAttrs: { "-Dapp-runtime=none" "-Demit-lib-vt=true" "-Dsimd=${lib.boolToString simd}" - # Install headers directly into the `dev` output - "--prefix-include-dir" - "${placeholder "dev"}/include" ]; zigCheckFlags = finalAttrs.zigBuildFlags ++ ["test-lib-vt"]; diff --git a/src/build/GhosttyLibVt.zig b/src/build/GhosttyLibVt.zig index cf4f88e8d..ffd4962d9 100644 --- a/src/build/GhosttyLibVt.zig +++ b/src/build/GhosttyLibVt.zig @@ -371,8 +371,8 @@ fn pkgConfigFiles( return .{ .shared = wf.add("libghostty-vt.pc", b.fmt( \\prefix={s} - \\includedir={s} - \\libdir={s} + \\includedir=${{prefix}}/include + \\libdir=${{prefix}}/lib \\ \\Name: libghostty-vt \\URL: https://github.com/ghostty-org/ghostty @@ -382,18 +382,11 @@ fn pkgConfigFiles( \\Libs: -L${{libdir}} -lghostty-vt \\Libs.private: {s} \\Requires.private: {s} - , .{ - b.install_prefix, - b.h_dir, - b.lib_dir, - zig.version, - libs_private, - requires_private, - })), + , .{ b.install_prefix, zig.version, libs_private, requires_private })), .static = wf.add("libghostty-vt-static.pc", b.fmt( \\prefix={s} - \\includedir={s} - \\libdir={s} + \\includedir=${{prefix}}/include + \\libdir=${{prefix}}/lib \\ \\Name: libghostty-vt-static \\URL: https://github.com/ghostty-org/ghostty @@ -405,8 +398,6 @@ fn pkgConfigFiles( \\Requires.private: {s} , .{ b.install_prefix, - b.h_dir, - b.lib_dir, zig.version, staticLibraryName(os_tag), libs_private,