wlroots.examples: prefix example binaries

This commit is contained in:
Cole Mickens 2018-10-24 14:40:20 -07:00
parent dce4042b26
commit 0f144e4195

View File

@ -71,11 +71,12 @@ in stdenv.mkDerivation rec {
# screenshot output-layout multi-pointer rotation tablet touch pointer
# simple
mkdir -p $examples/bin
for binary in $(find ./examples -executable -type f | grep -vE '\.so'); do
cd ./examples
for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do
patchelf \
--set-rpath "$examples/lib:${stdenv.lib.makeLibraryPath buildInputs}" \
"$binary"
cp "$binary" $examples/bin/
cp "$binary" "$examples/bin/wlroots-$binary"
done
'';