mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 14:45:27 +00:00
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.
This commit is contained in:
parent
00abf42fc6
commit
41e95c68b3
|
@ -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 ];
|
||||
|
|
Loading…
Reference in a new issue