cryptsetup-generator: add postFixup
This makes cryptsetup-generator link correctly to the shared systemd library.
This commit is contained in:
parent
e8672c8b37
commit
caed1877eb
|
@ -13,6 +13,17 @@ stdenv.lib.overrideDerivation systemd (p: {
|
||||||
ninja systemd-cryptsetup systemd-cryptsetup-generator
|
ninja systemd-cryptsetup systemd-cryptsetup-generator
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# As ninja install is not used here, the rpath needs to be manually fixed.
|
||||||
|
# Otherwise the resulting binary doesn't properly link against systemd-shared.so
|
||||||
|
postFixup = ''
|
||||||
|
sharedLib=libsystemd-shared-${p.version}.so
|
||||||
|
for prog in `find $out -type f -executable`; do
|
||||||
|
(patchelf --print-needed $prog | grep $sharedLib > /dev/null) && (
|
||||||
|
patchelf --set-rpath `patchelf --print-rpath $prog`:"$out/lib/systemd" $prog
|
||||||
|
) || true
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/lib/systemd/
|
mkdir -p $out/lib/systemd/
|
||||||
cp systemd-cryptsetup $out/lib/systemd/systemd-cryptsetup
|
cp systemd-cryptsetup $out/lib/systemd/systemd-cryptsetup
|
||||||
|
|
Loading…
Reference in New Issue