Commit d1e7e929 authored by Elliot Cameron's avatar Elliot Cameron
Browse files

prometheus-dcgm-exporter: 3.2.5-3.1.7 -> 3.3.5-3.4.0

Changes to go.mod are no longer needed because the package upgraded to
go 1.21.
parent f7b4ce1c
Loading
Loading
Loading
Loading
+3 −20
Original line number Diff line number Diff line
@@ -3,31 +3,19 @@
, fetchFromGitHub
, cudaPackages
, dcgm
, linuxPackages
}:
buildGoModule rec {
  pname = "dcgm-exporter";

  # The first portion of this version string corresponds to a compatible DCGM
  # version.
  version = "3.2.5-3.1.7"; # N.B: If you change this, update dcgm as well to the matching version.
  version = "3.3.5-3.4.0"; # N.B: If you change this, update dcgm as well to the matching version.

  src = fetchFromGitHub {
    owner = "NVIDIA";
    repo = pname;
    rev = "refs/tags/${version}";
    hash = "sha256-+Hviq+iu1LBcy2VwmCX5xOq1I/zevfydesVlrVorGOI=";
  };

  # Upgrade to go 1.17 during the vendoring FOD build because it fails otherwise.
  overrideModAttrs = _: {
    preBuild = ''
      substituteInPlace go.mod --replace 'go 1.16' 'go 1.17'
      go mod tidy
    '';
    postInstall = ''
      cp go.mod "$out/go.mod"
    '';
    hash = "sha256-IOVPEK+9ogBZJYns2pTyJwHUBMN8JqG1THTJPvpCwdo=";
  };

  CGO_LDFLAGS = "-ldcgm";
@@ -40,12 +28,7 @@ buildGoModule rec {
  # symbols are available on startup.
  hardeningDisable = [ "bindnow" ];

  # Copy the modified go.mod we got from the vendoring process.
  preBuild = ''
    cp vendor/go.mod go.mod
  '';

  vendorHash = "sha256-Fjvx15e/psxoqoS6c6GhiQfe7g2aI40EmPR26xLhrzg=";
  vendorHash = "sha256-urKa0O8QZnM8cWjPcGVhoAWhx6fCdMmhRX0JOriRaig=";

  nativeBuildInputs = [
    cudaPackages.autoAddOpenGLRunpathHook