From b7066ff12f8379abc26fef6f46d67a0920cc39b8 Mon Sep 17 00:00:00 2001 From: Edwin Mackenzie-Owen Date: Sat, 18 Jan 2025 14:54:07 +0100 Subject: [PATCH] waypipe: add missing runtime dependencies Waypipe dynamically loads ffmpeg[^1] and libgbm[^2] at runtime, therefore their library paths need to be included in the binary's RUNPATH. libvulkan.so.1 also needs to be in the RUNPATH, because the ash Rust crate used by Waypipe loads it dynamically at runtime[^3]. https://github.com/NixOS/nixpkgs/pull/374615 removed all runtimeDependencies and the autoPatchelfHook that adds them to the RUNPATH. This commit readds the autoPatchelfHook and adds the three dynamically loaded libraries to the runtimeDependencies. In addition, it replaces the mesa buildInput with libgbm (which was used before https://github.com/NixOS/nixpkgs/pull/373212) because Waypipe depends only on libgbm. Resolves https://github.com/NixOS/nixpkgs/issues/374595 [^1]: https://gitlab.freedesktop.org/mstoeckl/waypipe/-/blob/cb53f342af8a3009561e0566ed81962acbde6fc0/wrap-ffmpeg/build.rs#L110-111 [^2]: https://gitlab.freedesktop.org/mstoeckl/waypipe/-/blob/cb53f342af8a3009561e0566ed81962acbde6fc0/wrap-gbm/build.rs#L76-77l [^3]: https://github.com/ash-rs/ash?tab=readme-ov-file#optional-linking --- pkgs/by-name/wa/waypipe/package.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/wa/waypipe/package.nix b/pkgs/by-name/wa/waypipe/package.nix index 0ed176805199..d58ed7329061 100644 --- a/pkgs/by-name/wa/waypipe/package.nix +++ b/pkgs/by-name/wa/waypipe/package.nix @@ -6,7 +6,7 @@ ninja, pkg-config, scdoc, - mesa, + libgbm, lz4, zstd, ffmpeg, @@ -55,11 +55,12 @@ llvmPackages.stdenv.mkDerivation rec { rustc wayland-scanner rustPlatform.cargoSetupHook + autoPatchelfHook rust-bindgen ]; buildInputs = [ - mesa + libgbm lz4 zstd ffmpeg @@ -67,6 +68,12 @@ llvmPackages.stdenv.mkDerivation rec { vulkan-loader ]; + runtimeDependencies = [ + libgbm + ffmpeg.lib + vulkan-loader + ]; + meta = with lib; { description = "Network proxy for Wayland clients (applications)"; longDescription = ''