postfix-exporter: 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:19:25 +02:00
parent 68debbe0cb
commit e5a0c1cec1

View File

@ -1,4 +1,4 @@
{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, nixosTests
{ stdenv, lib, buildGoPackage, fetchFromGitHub, makeWrapper, nixosTests
, systemd, withSystemdSupport ? true }:
with stdenv.lib;
@ -44,7 +44,7 @@ buildGoPackage rec {
postInstall = optionalString withSystemdSupport ''
wrapProgram $out/bin/postfix_exporter \
--prefix LD_LIBRARY_PATH : "${systemd.lib}/lib"
--prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib"
'';
passthru.tests = { inherit (nixosTests.prometheus-exporters) postfix; };