aboutsummaryrefslogtreecommitdiff
path: root/pkgs/os-specific/linux/systemd
diff options
context:
space:
mode:
authorxeji <36407913+xeji@users.noreply.github.com>2018-05-05 17:41:40 +0200
committerGitHub <noreply@github.com>2018-05-05 17:41:40 +0200
commite450d9fb908c996e4ae832a35975e3ac92f4f64e (patch)
treeb7e6f860c36dae341d63a97507a661727e4f9c7e /pkgs/os-specific/linux/systemd
parent8f22baa40f99e24b1e2bc52f750875805ae8a505 (diff)
parentcaed1877ebf7a84f16ac1eb6af641af155e47b5b (diff)
Merge pull request #38961 from bachp/cryptsetup-generator
cryptsetup-generator: add postFixup
Diffstat (limited to 'pkgs/os-specific/linux/systemd')
-rw-r--r--pkgs/os-specific/linux/systemd/cryptsetup-generator.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix b/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix
index d02a531f67f..c89a8ff9147 100644
--- a/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix
+++ b/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix
@@ -11,6 +11,17 @@ stdenv.lib.overrideDerivation systemd (p: {
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 = ''
mkdir -p $out/lib/systemd/
cp systemd-cryptsetup $out/lib/systemd/systemd-cryptsetup