Commit 0bab1a6d authored by Peter Hoeg's avatar Peter Hoeg
Browse files

prometheus-smartctl-exporter: fix path to smartctl

parent 6ab780da
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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}"
  ];