From 41e95c68b35c06b0f03d0ad6d17408b359910368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 15 Sep 2013 11:57:52 +0200 Subject: [PATCH] go: adding an option to remove external references in godoc godoc pages point to googleapis and google plus URLs, for every visit in your local godoc. I added an option to disable that (the hard way, it takes out the references). I don't think it removes any feature of godoc. --- pkgs/development/compilers/go/1.1.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/go/1.1.nix b/pkgs/development/compilers/go/1.1.nix index 5aeb053e110..dfb545bb368 100644 --- a/pkgs/development/compilers/go/1.1.nix +++ b/pkgs/development/compilers/go/1.1.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc }: +{ stdenv, fetchurl, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc +, removeGodocExternals ? false }: let loader386 = "${glibc}/lib/ld-linux.so.2"; @@ -50,6 +51,8 @@ stdenv.mkDerivation { sed -i 's,/bin/pwd,'"`type -P pwd`", src/pkg/os/os_test.go # Disable the hostname test sed -i '/TestHostname/areturn' src/pkg/os/os_test.go + '' + stdenv.lib.optionalString removeGodocExternals '' + sed -i -e '/googleapi/d' -e '/javascript">$/,+6d' lib/godoc/godoc.html ''; patches = [ ./cacert.patch ];