From 634e6bb36a8c3bf3b9a742f29159651416a1cdc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 10 Jul 2021 10:24:32 +0200 Subject: [PATCH] leftwm: set rpath in all executables --- .../window-managers/leftwm/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/window-managers/leftwm/default.nix b/pkgs/applications/window-managers/leftwm/default.nix index ca1a98dcdc3..e8330ee2936 100644 --- a/pkgs/applications/window-managers/leftwm/default.nix +++ b/pkgs/applications/window-managers/leftwm/default.nix @@ -1,7 +1,7 @@ -{ lib, fetchFromGitHub, rustPlatform, libX11, libXinerama, makeWrapper }: +{ lib, fetchFromGitHub, rustPlatform, libX11, libXinerama }: let - rpath = lib.makeLibraryPath [ libXinerama libX11 ]; + rpathLibs = [ libXinerama libX11 ]; in rustPlatform.buildRustPackage rec { @@ -17,15 +17,16 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-2prRtdBxpYc2xI/bLZNlqs3mxESfO9GhNUSlKFF//eE="; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ libX11 libXinerama ]; + buildInputs = rpathLibs; postInstall = '' - wrapProgram $out/bin/leftwm --prefix LD_LIBRARY_PATH : "${rpath}" - wrapProgram $out/bin/leftwm-state --prefix LD_LIBRARY_PATH : "${rpath}" - wrapProgram $out/bin/leftwm-worker --prefix LD_LIBRARY_PATH : "${rpath}" + for p in $out/bin/leftwm*; do + patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $p + done ''; + dontPatchELF = true; + meta = with lib; { description = "A tiling window manager for the adventurer"; homepage = "https://github.com/leftwm/leftwm";