Skip to content

Commit

Permalink
systemd-cryptsetup-generator: fixup linkage
Browse files Browse the repository at this point in the history
It got broken by 74a64a8 #53483.
But IMO it's *this* expression that was written in a too fragile way.
  • Loading branch information
vcunat committed Jan 26, 2019
1 parent 92a44bd commit 2c22610
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkgs/os-specific/linux/systemd/cryptsetup-generator.nix
Expand Up @@ -14,12 +14,13 @@ systemd.overrideAttrs (p: {
# 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 --print-needed $prog | grep 'libsystemd-shared-.*\.so' > /dev/null) && (
patchelf --set-rpath `patchelf --print-rpath $prog`:"$out/lib/systemd" $prog
) || true
done
# test it's OK
"$out"/lib/systemd/systemd-cryptsetup
'';

installPhase = ''
Expand Down

0 comments on commit 2c22610

Please sign in to comment.