diff options
-rw-r--r-- | pkgs/development/go-modules/generic/default.nix | 7 | ||||
-rw-r--r-- | pkgs/top-level/go-packages.nix | 20 |
2 files changed, 16 insertions, 11 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 021b57c0a19..fafefd325df 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -16,6 +16,10 @@ , dontRenameImports ? false +# Do not enable this without good reason +# IE: programs coupled with the compiler +, allowGoReference ? false + , meta ? {}, ... } @ args': if disabled then throw "${name} not supported for go ${go.meta.branch}" else @@ -161,7 +165,8 @@ go.stdenv.mkDerivation ( runHook postInstall ''; - disallowedReferences = [ go ] ++ lib.optional (!dontRenameImports) govers; + disallowedReferences = lib.optional (!allowGoReference) go + ++ lib.optional (!dontRenameImports) govers; passthru = passthru // lib.optionalAttrs (goPackageAliases != []) { inherit goPackageAliases; }; diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index cbfb28a7947..470548ed6b7 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -117,9 +117,12 @@ let goPackageAliases = [ "github.com/golang/text" ]; }; - tools = buildGoPackage rec { - rev = "7d75e8b219c3efda2d08ae38acd6b42f8da4f5f9"; - name = "tools-${stdenv.lib.strings.substring 0 7 rev}"; + tools = buildFromGitHub { + rev = "93604a3dc2a5ae0168456c672ec35cc90ea881e6"; + date = "2015-08-19"; + owner = "golang"; + repo = "tools"; + sha256 = "1yd3hwsbsjrmx85nihss55wy91y8sld7p0599j5k9xi0n1mrxdci"; goPackagePath = "golang.org/x/tools"; goPackageAliases = [ "code.google.com/p/go.tools" ]; @@ -135,14 +138,11 @@ let excludedPackages = "testdata"; - src = fetchFromGitHub { - inherit rev; - owner = "golang"; - repo = "tools"; - sha256 = "0vq0l3pjhgsp97v6ndlr3jcs029r5zilwai30snwfq74s580sriq"; - }; - buildInputs = [ net ]; + + # Do not copy this without a good reason for enabling + # In this case tools is heavily coupled with go itself and embeds paths. + allowGoReference = true; }; ## THIRD PARTY |