summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2019-01-26 14:12:33 +0100
committerVladimír Čunát <vcunat@gmail.com>2019-01-26 14:16:56 +0100
commit2c226107cb544c1f9baf08f9cfa149023cda78e4 (patch)
treec1ce6792f2bc1eb0b739810fd6f49da592a8f8ee /pkgs/os-specific/linux/systemd
parent92a44bd1008cb3adb79f8e4cd427a65c438fa730 (diff)
downloadnixpkgs-2c226107cb544c1f9baf08f9cfa149023cda78e4.tar
nixpkgs-2c226107cb544c1f9baf08f9cfa149023cda78e4.tar.gz
nixpkgs-2c226107cb544c1f9baf08f9cfa149023cda78e4.tar.bz2
nixpkgs-2c226107cb544c1f9baf08f9cfa149023cda78e4.tar.lz
nixpkgs-2c226107cb544c1f9baf08f9cfa149023cda78e4.tar.xz
nixpkgs-2c226107cb544c1f9baf08f9cfa149023cda78e4.tar.zst
nixpkgs-2c226107cb544c1f9baf08f9cfa149023cda78e4.zip
systemd-cryptsetup-generator: fixup linkage
It got broken by 74a64a8a6 #53483.
But IMO it's *this* expression that was written in a too fragile way.
Diffstat (limited to 'pkgs/os-specific/linux/systemd')
-rw-r--r--pkgs/os-specific/linux/systemd/cryptsetup-generator.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix b/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix
index 703d13126a3..2ff0e4cd38f 100644
--- a/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix
+++ b/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix
@@ -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 = ''