Unverified Commit 46e144d6 authored by Arne Keller's avatar Arne Keller Committed by GitHub
Browse files

gops: use finalAttrs pattern and writableTmpDirAsHomeHook (#397349)

parents 1ee28ace 971422df
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2,22 +2,23 @@
  lib,
  buildGoModule,
  fetchFromGitHub,
  writableTmpDirAsHomeHook,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "gops";
  version = "0.3.28";

  src = fetchFromGitHub {
    owner = "google";
    repo = "gops";
    rev = "v${version}";
    rev = "v${finalAttrs.version}";
    sha256 = "sha256-HNM487WSfNWNF31ccDIdotsEG8Mj2C7V85UI47a9drU=";
  };

  vendorHash = "sha256-ptC2G7cXcAjthJcAXvuBqI2ZpPuSMBqzO+gJiyaAUP0=";

  preCheck = "export HOME=$(mktemp -d)";
  nativeCheckInputs = [ writableTmpDirAsHomeHook ];

  meta = with lib; {
    description = "Tool to list and diagnose Go processes currently running on your system";
@@ -26,4 +27,4 @@ buildGoModule rec {
    license = licenses.bsd3;
    maintainers = with maintainers; [ pborzenkov ];
  };
}
})