about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-07-29 01:10:38 +0200
committeraszlig <aszlig@nix.build>2018-07-29 01:10:38 +0200
commitdaccc42d3ccc2406323dc9af2ec0c6036283c2ab (patch)
tree0af176ded09884d4bcab0f23a14fb9d58926954a /pkgs/games
parent1f428dcbc8efad47cb4cdb4d0dbca9608b2689d7 (diff)
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 <aszlig@nix.build>
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/humblebundle/bastion.nix6
1 files changed, 4 insertions, 2 deletions
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"
   '';