From daccc42d3ccc2406323dc9af2ec0c6036283c2ab Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 29 Jul 2018 01:10:38 +0200 Subject: games/bastion: Fix patching of libfmodex I've recently moved the autoPatchelfHook execution to postFixup in NixOS/nixpkgs@f1fbf818c4a94c67fcdb171ba00f1fef4a0aef2a, because it was conflicting with patchelf's own setup hook. So we now need to run the fixup of libfmodex after the autoPatchelfHook, which we do by adding another phase in postPhases. Alongside this I also fixed a small escaping error with ${rpath:+:}, which needs to be quoted using two single quotes. Signed-off-by: aszlig --- pkgs/games/humblebundle/bastion.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pkgs') diff --git a/pkgs/games/humblebundle/bastion.nix b/pkgs/games/humblebundle/bastion.nix index 7edfec2e..3a4af115 100644 --- a/pkgs/games/humblebundle/bastion.nix +++ b/pkgs/games/humblebundle/bastion.nix @@ -130,11 +130,13 @@ buildGame rec { # Add all of the libraries in $runtimeDependencies to the FMOD Ex library, # because it tries to dlopen() libpulse-simple and libasound.so and we don't # have a main ELF binary where we could add that search path. - postFixup = '' + postPhases = [ "fixFModex" ]; + fixFModex = '' rpath="$(patchelf --print-rpath "$out/libexec/bastion/libfmodex.so")" for dep in $runtimeDependencies; do - rpath="$rpath${rpath:+:}$dep/lib" + rpath="$rpath''${rpath:+:}$dep/lib" done + echo "setting RPATH for libfmodex to: $rpath" >&2 patchelf --set-rpath "$rpath" "$out/libexec/bastion/libfmodex.so" ''; -- cgit 1.4.1