nixpkgs/pkgs/by-name/go/gotools/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.2 KiB
Nix
Raw Normal View History

2024-10-03 01:19:52 +00:00
{
lib,
buildGoModule,
fetchFromGitHub,
}:
2016-06-06 00:28:52 +00:00
buildGoModule rec {
pname = "gotools";
2024-10-03 01:18:04 +00:00
version = "0.25.0";
2016-06-06 00:28:52 +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";
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 = ''
# 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
doCheck = false;
2016-06-06 00:28:52 +00:00
# Set GOTOOLDIR for derivations adding this to buildInputs
postInstall = ''
mkdir -p $out/nix-support
substitute ${./setup-hook.sh} $out/nix-support/setup-hook \
--subst-var-by bin $out
2016-06-06 00:28:52 +00:00
'';
meta = with lib; {
description = "Additional tools for Go development";
longDescription = ''
This package contains tools like: godoc, goimports, callgraph, digraph, stringer or toolstash.
'';
homepage = "https://go.googlesource.com/tools";
license = licenses.bsd3;
maintainers = with maintainers; [
SuperSandro2000
techknowlogick
];
};
}