Merge pull request #129823 from Mic92/leftwm

leftwm: set rpath in all executables
This commit is contained in:
Jörg Thalheim 2021-07-10 14:07:46 +01:00 committed by GitHub
commit ac7bd48b0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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";