mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
gops: use finalAttrs pattern and writableTmpDirAsHomeHook
This commit is contained in:
@@ -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 ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user