about summary refs log tree commit diff
path: root/pkgs/games/build-support
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-02-01 22:09:16 +0100
committeraszlig <aszlig@nix.build>2018-02-01 22:28:30 +0100
commit8b918f954397fff4718efd8960a46c763c982eff (patch)
tree2ccfbc7de3cc1f547db2f29e0a486e92ba1c5fef /pkgs/games/build-support
parent349b2a4232e2a3dfe25b7509cb9d77c7d2a10377 (diff)
auto-patchelf: Move checkElfDep into buildGame
Having a function in autoPatchelfHook that's unused inside the setup
hook is a bit of weird, because the actual usage is within buildGame and
thus it should stay there for now.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/games/build-support')
-rw-r--r--pkgs/games/build-support/build-game.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/games/build-support/build-game.nix b/pkgs/games/build-support/build-game.nix
index e4d019af..ea97d72a 100644
--- a/pkgs/games/build-support/build-game.nix
+++ b/pkgs/games/build-support/build-game.nix
@@ -51,6 +51,13 @@ buildSandbox (stdenv.mkDerivation ({
 
     echo "checking dependencies for libraries and executables" >&2
 
+    checkElfDep() {
+        local errors ldout="$(ldd "$1" 2> /dev/null)"
+        if errors="$(echo "$ldout" | grep -F "not found")"; then
+            echo -e "Library dependencies missing for $1:\n$errors"
+        fi
+    }
+
     local errors="$(
         IFS=$'\n'
         for elf in $(findElfs "$prefix"); do checkElfDep "$elf"; done