prometheus-smartctl-exporter: fix path to smartctl

This commit is contained in:
Peter Hoeg 2024-07-27 10:27:12 +02:00
parent 6ab780da86
commit 0bab1a6d6e

View File

@ -2,6 +2,7 @@
, fetchFromGitHub
, buildGoModule
, nixosTests
, smartmontools
}:
buildGoModule rec {
@ -17,6 +18,11 @@ buildGoModule rec {
vendorHash = "sha256-WUB2FgBl4Tybz7T0yvcSYIlG75NEhXpn1F0yuB9F21g=";
postPatch = ''
substituteInPlace main.go README.md \
--replace-fail /usr/sbin/smartctl ${lib.getExe smartmontools}
'';
ldflags = [
"-X github.com/prometheus/common/version.Version=${version}"
];