Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 24.05-beta 43 lines 1.3 kB view raw
1{ lib, buildGoModule, fetchFromGitHub }: 2 3buildGoModule rec { 4 pname = "gotools"; 5 version = "0.18.0"; 6 7 # using GitHub instead of https://go.googlesource.com/tools because Gitiles UI is to basic to browse 8 src = fetchFromGitHub { 9 owner = "golang"; 10 repo = "tools"; 11 rev = "v${version}"; 12 hash = "sha256-sOT98DdLYtPXovpcX020BbLSH99ByJSaVQeM10IcKG4="; 13 }; 14 15 postPatch = '' 16 # The gopls folder contains a Go submodule which causes a build failure 17 # and lives in its own package named gopls. 18 rm -r gopls 19 # getgo is an experimental go installer which adds generic named server and client binaries to $out/bin 20 rm -r cmd/getgo 21 ''; 22 23 vendorHash = "sha256-gGAEl3yabXy1qbuBJyrpD+TRrKr56cZEOiSaBoBsYc8="; 24 25 doCheck = false; 26 27 # Set GOTOOLDIR for derivations adding this to buildInputs 28 postInstall = '' 29 mkdir -p $out/nix-support 30 substitute ${./setup-hook.sh} $out/nix-support/setup-hook \ 31 --subst-var-by bin $out 32 ''; 33 34 meta = with lib; { 35 description = "Additional tools for Go development"; 36 longDescription = '' 37 This package contains tools like: godoc, goimports, callgraph, digraph, stringer or toolstash. 38 ''; 39 homepage = "https://go.googlesource.com/tools"; 40 license = licenses.bsd3; 41 maintainers = with maintainers; [ SuperSandro2000 ]; 42 }; 43}