From 6eecaddcedc75dd127f10b72cdba0c7f9b8d8c80 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Mon, 18 May 2015 10:12:30 -0700 Subject: [PATCH] goPackages.tools: Make the build work with the go decoupling --- pkgs/top-level/go-packages.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index 44da3e7e8367..7fd57bb74efc 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -122,12 +122,26 @@ let name = "tools-${stdenv.lib.strings.substring 0 7 rev}"; goPackagePath = "golang.org/x/tools"; + preConfigure = '' + # Make the builtin tools available here + mkdir -p $out/bin + eval $(go env | grep GOTOOLDIR) + find $GOTOOLDIR -type f | while read x; do + ln -sv "$x" "$out/bin" + done + export GOTOOLDIR=$out/bin + ''; + + excludedPackages = "testdata"; + src = fetchFromGitHub { inherit rev; owner = "golang"; repo = "tools"; sha256 = "0vq0l3pjhgsp97v6ndlr3jcs029r5zilwai30snwfq74s580sriq"; }; + + buildInputs = [ net ]; }; ## THIRD PARTY