2024-10-03 01:19:52 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
|
|
|
}:
|
2016-06-06 00:28:52 +00:00
|
|
|
|
2019-03-08 23:14:33 +00:00
|
|
|
buildGoModule rec {
|
2022-03-26 22:01:35 +00:00
|
|
|
pname = "gotools";
|
2024-10-03 01:18:04 +00:00
|
|
|
version = "0.25.0";
|
2016-06-06 00:28:52 +00:00
|
|
|
|
2023-03-23 16:33:04 +00:00
|
|
|
# using GitHub instead of https://go.googlesource.com/tools because Gitiles UI is to basic to browse
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "golang";
|
|
|
|
repo = "tools";
|
2022-03-26 22:01:35 +00:00
|
|
|
rev = "v${version}";
|
2024-10-03 01:18:04 +00:00
|
|
|
hash = "sha256-iM6mGIQF+TOo1iV8hH9/4iOPdNiS9ymPmhslhDVnIIs=";
|
2023-04-18 14:27:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-03-23 16:33:04 +00:00
|
|
|
# The gopls folder contains a Go submodule which causes a build failure
|
|
|
|
# and lives in its own package named gopls.
|
2023-04-18 14:27:56 +00:00
|
|
|
rm -r gopls
|
|
|
|
'';
|
2016-06-06 00:28:52 +00:00
|
|
|
|
2024-10-03 01:18:04 +00:00
|
|
|
vendorHash = "sha256-9NSgtranuyRqtBq1oEnHCPIDFOIUJdVh5W/JufqN2Ko=";
|
2016-06-06 00:28:52 +00:00
|
|
|
|
2020-08-04 00:26:27 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2016-06-06 00:28:52 +00:00
|
|
|
# Set GOTOOLDIR for derivations adding this to buildInputs
|
|
|
|
postInstall = ''
|
2019-03-08 23:14:33 +00:00
|
|
|
mkdir -p $out/nix-support
|
2022-07-26 23:46:29 +00:00
|
|
|
substitute ${./setup-hook.sh} $out/nix-support/setup-hook \
|
2020-01-21 05:09:11 +00:00
|
|
|
--subst-var-by bin $out
|
2016-06-06 00:28:52 +00:00
|
|
|
'';
|
2019-03-08 23:14:33 +00:00
|
|
|
|
2022-03-26 22:01:35 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Additional tools for Go development";
|
2023-03-23 16:33:04 +00:00
|
|
|
longDescription = ''
|
|
|
|
This package contains tools like: godoc, goimports, callgraph, digraph, stringer or toolstash.
|
|
|
|
'';
|
|
|
|
homepage = "https://go.googlesource.com/tools";
|
2022-03-26 22:01:35 +00:00
|
|
|
license = licenses.bsd3;
|
2024-10-03 01:20:31 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
SuperSandro2000
|
|
|
|
techknowlogick
|
|
|
|
];
|
2022-03-26 22:01:35 +00:00
|
|
|
};
|
2020-07-31 03:58:04 +00:00
|
|
|
}
|