From 5704baf4e60ee3971b97a00b95625ae408c69cf9 Mon Sep 17 00:00:00 2001 From: Chris Marchesi Date: Mon, 1 Jan 2024 12:22:37 -0800 Subject: [PATCH] nix: add libX11 to RUNPATH This adds libX11 to the (wrapped) binary RUNPATH in the Nix package fixupPhase, to ensure that the dlopen we are doing of it now in #1193 functions correctly. Note that we patch ".ghostty-wrapped" here, as this is now the main binary after #1104. --- nix/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/package.nix b/nix/package.nix index 2dc69543c..ea471dd0e 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -151,6 +151,10 @@ in echo "$shell_integration" >> "$out/nix-support/propagated-user-env-packages" ''; + postFixup = '' + patchelf --add-rpath "${lib.makeLibraryPath [libX11]}" "$out/bin/.ghostty-wrapped" + ''; + meta = with lib; { homepage = "https://github.com/mitchellh/ghostty"; license = licenses.mit;