From 8b918f954397fff4718efd8960a46c763c982eff Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 1 Feb 2018 22:09:16 +0100 Subject: 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 --- pkgs/games/build-support/build-game.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pkgs/games/build-support') 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 -- cgit 1.4.1