gops: use finalAttrs pattern and writableTmpDirAsHomeHook

This commit is contained in:
Daniel Nagy
2025-03-31 11:30:00 +02:00
parent 70f67d28f7
commit 971422df5b

View File

@@ -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 ];
};
}
})