filebeat7: use lib.getLib systemd instead of systemd.lib

This will pick the `lib` output if it exists, otherwise default to `out`.
This commit is contained in:
Florian Klink 2020-08-12 20:18:56 +02:00
parent 8ccbb4747e
commit 05a61fc30a

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, elk7Version, buildGoPackage, libpcap, systemd }: { stdenv, lib, fetchFromGitHub, elk7Version, buildGoPackage, libpcap, systemd }:
let beat = package : extraArgs : buildGoPackage (rec { let beat = package : extraArgs : buildGoPackage (rec {
name = "${package}-${version}"; name = "${package}-${version}";
@ -45,7 +45,7 @@ in {
journal entries from Linuxes with systemd. journal entries from Linuxes with systemd.
''; '';
buildInputs = [ systemd.dev ]; buildInputs = [ systemd.dev ];
postFixup = let libPath = stdenv.lib.makeLibraryPath [ systemd.lib ]; in '' postFixup = let libPath = stdenv.lib.makeLibraryPath [ (lib.getLib systemd) ]; in ''
patchelf --set-rpath ${libPath} "$out/bin/journalbeat" patchelf --set-rpath ${libPath} "$out/bin/journalbeat"
''; '';
}; };