From 34f9310ce5c89082137c316d891fa06752b2ccf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Fri, 26 Sep 2025 01:47:00 -0400 Subject: [PATCH] veloren: use autoPatchelfHook --- pkgs/by-name/ve/veloren/package.nix | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/ve/veloren/package.nix b/pkgs/by-name/ve/veloren/package.nix index 4b7044b74948..33dfbb07240f 100644 --- a/pkgs/by-name/ve/veloren/package.nix +++ b/pkgs/by-name/ve/veloren/package.nix @@ -9,10 +9,12 @@ shaderc, libxcb, libxkbcommon, + autoPatchelfHook, libX11, libXi, libXcursor, libXrandr, + stdenv, }: let @@ -51,12 +53,18 @@ rustPlatform.buildRustPackage { EOF ''; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + autoPatchelfHook + pkg-config + ]; + buildInputs = [ alsa-lib udev libxcb libxkbcommon + shaderc + stdenv.cc.cc # libgcc_s.so.1 ]; buildNoDefaultFeatures = true; @@ -81,18 +89,17 @@ rustPlatform.buildRustPackage { # Some tests require internet access doCheck = false; - postFixup = '' - # Add required but not explicitly requested libraries - patchelf --add-rpath '${ - lib.makeLibraryPath [ + appendRunpaths = [ + (lib.makeLibraryPath + [ libX11 libXi libXcursor libXrandr vulkan-loader ] - }' "$out/bin/veloren-voxygen" - ''; + ) + ]; postInstall = '' # Icons