diff options
author | Someone <sergei.kozlukov@aalto.fi> | 2024-02-23 14:28:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 14:28:20 +0000 |
commit | 72041f6cc633ea43f1c325afb55decf12b6dd753 (patch) | |
tree | f60f469c21a5270f1765a1ea5281895b016d2ff9 /pkgs/by-name/re | |
parent | fb561a248dae2d2a668adfb6d217f5e729ab74d4 (diff) | |
parent | ddb73feeda7634a6ac4fc948d064a095209e62fa (diff) | |
download | nixlib-72041f6cc633ea43f1c325afb55decf12b6dd753.tar nixlib-72041f6cc633ea43f1c325afb55decf12b6dd753.tar.gz nixlib-72041f6cc633ea43f1c325afb55decf12b6dd753.tar.bz2 nixlib-72041f6cc633ea43f1c325afb55decf12b6dd753.tar.lz nixlib-72041f6cc633ea43f1c325afb55decf12b6dd753.tar.xz nixlib-72041f6cc633ea43f1c325afb55decf12b6dd753.tar.zst nixlib-72041f6cc633ea43f1c325afb55decf12b6dd753.zip |
Merge pull request #290640 from SomeoneSerge/fix/rerun-wayland
rerun: fix wayland support, reduce runtime closure
Diffstat (limited to 'pkgs/by-name/re')
-rw-r--r-- | pkgs/by-name/re/rerun/package.nix | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/pkgs/by-name/re/rerun/package.nix b/pkgs/by-name/re/rerun/package.nix index c2f3842a298c..9c96b86f64c9 100644 --- a/pkgs/by-name/re/rerun/package.nix +++ b/pkgs/by-name/re/rerun/package.nix @@ -71,37 +71,32 @@ rustPlatform.buildRustPackage rec { env.CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "lld"; - addBuildInputRunpathsPhase = '' - declare _extraRunpaths - _sep= - for p in "''${pkgsHostTarget[@]}" ; do - if [[ -d "$p/lib" ]] ; then - _extraRunpaths+="$_sep$p/lib" - if [[ -z "$_sep" ]] ; then - _sep=: - fi - fi - done + addDlopenRunpaths = map (p: "${lib.getLib p}/lib") ( + lib.optionals stdenv.hostPlatform.isLinux [ + libxkbcommon + vulkan-loader + wayland + ] + ); + addDlopenRunpathsPhase = '' elfHasDynamicSection() { patchelf --print-rpath "$1" >& /dev/null } while IFS= read -r -d $'\0' path ; do - if elfHasDynamicSection "$path" ; then - patchelf "$path" --add-rpath "''${_extraRunpaths}" - fi + elfHasDynamicSection "$path" || continue + for dep in $addDlopenRunpaths ; do + patchelf "$path" --add-rpath "$dep" + done done < <( for o in $(getAllOutputNames) ; do find "''${!o}" -type f -and "(" -executable -or -iname '*.so' ")" -print0 done ) - - unset _extraRunpaths - unset _sep ''; - postPhases = lib.optionals stdenv.isLinux [ "addBuildInputRunpathsPhase" ]; + postPhases = lib.optionals stdenv.hostPlatform.isLinux [ "addDlopenRunpathsPhase" ]; cargoTestFlags = [ "-p" |