Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildGoModule, fetchFromGitHub }: 2 3buildGoModule rec { 4 pname = "gotools"; 5 version = "0.7.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 sha256 = "sha256-z5XJ7tflOfDBtv4rp7WEjnHsXIyjNw205PhazEvaYcw="; 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 vendorSha256 = "sha256-fp0pb3EcGRDWlSpgel4pYRdsPJGk8/d57EjWJ+fzq7g="; 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; [ danderson SuperSandro2000 ]; 42 }; 43}