wlroots: Fix the ELF binaries (rootston + examples)
Due to stdenv changes the binaries where broken during the fixup phase (while stripping all binaries). The current solution isn't optimal but there must not be any cyclic dependencies on $out.
This commit is contained in:
parent
4bff986b92
commit
bda21694d1
@ -40,14 +40,21 @@ in stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# Install rootston (the reference compositor) to $bin and $examples
|
# Copy the library to $bin and $examples
|
||||||
|
for output in "$bin" "$examples"; do
|
||||||
|
mkdir -p $output/lib
|
||||||
|
cp -P libwlroots* $output/lib/
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
# Install rootston (the reference compositor) to $bin and $examples (this
|
||||||
|
# has to be done after the fixup phase to prevent broken binaries):
|
||||||
for output in "$bin" "$examples"; do
|
for output in "$bin" "$examples"; do
|
||||||
mkdir -p $output/bin
|
mkdir -p $output/bin
|
||||||
cp rootston/rootston $output/bin/
|
cp rootston/rootston $output/bin/
|
||||||
mkdir $output/lib
|
|
||||||
cp libwlroots* $output/lib/
|
|
||||||
patchelf \
|
patchelf \
|
||||||
--set-rpath "$output/lib:${stdenv.lib.makeLibraryPath buildInputs}" \
|
--set-rpath "$(patchelf --print-rpath $output/bin/rootston | sed s,$out,$output,g)" \
|
||||||
$output/bin/rootston
|
$output/bin/rootston
|
||||||
mkdir $output/etc
|
mkdir $output/etc
|
||||||
cp ../rootston/rootston.ini.example $output/etc/rootston.ini
|
cp ../rootston/rootston.ini.example $output/etc/rootston.ini
|
||||||
@ -59,10 +66,10 @@ in stdenv.mkDerivation rec {
|
|||||||
mkdir -p $examples/bin
|
mkdir -p $examples/bin
|
||||||
cd ./examples
|
cd ./examples
|
||||||
for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do
|
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/wlroots-$binary"
|
cp "$binary" "$examples/bin/wlroots-$binary"
|
||||||
|
patchelf \
|
||||||
|
--set-rpath "$(patchelf --print-rpath $output/bin/rootston | sed s,$out,$examples,g)" \
|
||||||
|
"$examples/bin/wlroots-$binary"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user