git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #86376 from c00w/vendor_mod
commit1694c0b3f7ab9416f266e719001f74116878e1fa authorJörg Thalheim <Mic92@users.noreply.github.com> dateThu 14 May 2020, 08:25 (7 years ago) parent85a0587e6907df
221 files changed+3365−508
doc/languages-frameworks/go.xml+7−7 nixos/doc/manual/release-notes/rl-2009.xml+7 pkgs/applications/blockchains/go-ethereum.nix+15−1 pkgs/applications/blockchains/lnd.nix+2−2 pkgs/applications/editors/glow/default.nix+2−2 pkgs/applications/graphics/pdfcpu/default.nix+2−3 pkgs/applications/misc/archiver/default.nix+2−2 pkgs/applications/misc/cheat/default.nix+1−1 pkgs/applications/misc/exercism/default.nix+2−2 pkgs/applications/misc/geoipupdate/default.nix+2−2 pkgs/applications/misc/gomatrix/default.nix+2−2 pkgs/applications/misc/hugo/default.nix+17−3 pkgs/applications/misc/sampler/default.nix+2−2 pkgs/applications/misc/terminal-parrot/default.nix+2−2 pkgs/applications/misc/todoist/default.nix+2−2 pkgs/applications/misc/wtf/default.nix+2−2 pkgs/applications/networking/cloudflared/default.nix+3−2 pkgs/applications/networking/cluster/argo/default.nix+2−2 pkgs/applications/networking/cluster/argocd/default.nix+2−2 pkgs/applications/networking/cluster/atlantis/default.nix+2−2 pkgs/applications/networking/cluster/docker-machine/hyperkit.nix+2−2 pkgs/applications/networking/cluster/docker-machine/kvm2.nix+2−2 pkgs/applications/networking/cluster/fluxctl/default.nix+2−2 pkgs/applications/networking/cluster/helm/default.nix+2−2 pkgs/applications/networking/cluster/helmfile/default.nix+2−2 pkgs/applications/networking/cluster/helmsman/default.nix+1−1 pkgs/applications/networking/cluster/hetzner-kube/default.nix+2−2 pkgs/applications/networking/cluster/jx/3321-fix-location-of-thrift.patch−36 pkgs/applications/networking/cluster/jx/default.nix+4−9 pkgs/applications/networking/cluster/k9s/default.nix+2−2 pkgs/applications/networking/cluster/kube3d/default.nix+2−2 pkgs/applications/networking/cluster/kubeseal/default.nix+2−2 pkgs/applications/networking/cluster/kubeval/default.nix+2−2 pkgs/applications/networking/cluster/linkerd/default.nix+5−5 pkgs/applications/networking/cluster/minikube/default.nix+1−1 pkgs/applications/networking/cluster/node-problem-detector/default.nix+2−9 pkgs/applications/networking/cluster/prow/default.nix+2−2 pkgs/applications/networking/cluster/qbec/default.nix+2−2 pkgs/applications/networking/cluster/terraform-providers/elasticsearch/default.nix+2−2 pkgs/applications/networking/cluster/terraform-providers/lxd/default.nix+2−2 pkgs/applications/networking/cluster/terraform-providers/vpsadmin/default.nix+2−2 pkgs/applications/networking/cluster/terragrunt/default.nix+2−2 pkgs/applications/networking/gmailctl/default.nix+2−3 pkgs/applications/networking/hydroxide/default.nix+2−2 pkgs/applications/networking/instant-messengers/gomuks/default.nix+3−2 pkgs/applications/networking/instant-messengers/gomuks/gomod.patch+20 pkgs/applications/networking/ipfs-cluster/default.nix+2−3 pkgs/applications/networking/ipfs-migrator/default.nix+2−2 pkgs/applications/networking/ipfs/default.nix+14−13 pkgs/applications/networking/mailreaders/aerc/default.nix+17−2 pkgs/applications/networking/mailreaders/hasmail/default.nix+2−2 pkgs/applications/networking/p2p/magnetico/default.nix+2−2 pkgs/applications/networking/syncthing/default.nix+2−2 pkgs/applications/networking/websocketd/default.nix+2−2 pkgs/applications/version-management/git-and-tools/gh/default.nix+2−2 pkgs/applications/version-management/git-and-tools/ghq/default.nix+2−2 pkgs/applications/version-management/git-and-tools/git-bug/default.nix+2−2 pkgs/applications/version-management/git-and-tools/git-subtrac/default.nix+2−2 pkgs/applications/version-management/git-and-tools/lab/default.nix+2−2 pkgs/applications/version-management/git-and-tools/lefthook/default.nix+2−2 pkgs/applications/version-management/sourcehut/builds.nix+2−2 pkgs/applications/version-management/sourcehut/git.nix+5−5 pkgs/applications/virtualization/firectl/default.nix+4−2 pkgs/applications/virtualization/firectl/gomod.patch+15 pkgs/applications/virtualization/gvisor/containerd-shim.nix+2−2 pkgs/development/compilers/go-jsonnet/default.nix+2−2 pkgs/development/compilers/tinygo/default.nix+16−2 pkgs/development/compilers/tinygo/go.mod+13 pkgs/development/compilers/tinygo/main.go+18 pkgs/development/go-modules/generic/default.nix+39−20 pkgs/development/go-modules/generic/old.nix+229 pkgs/development/interpreters/joker/default.nix+2−2 pkgs/development/libraries/packr/default.nix+3−3 pkgs/development/libraries/protolock/default.nix+2−2 pkgs/development/tools/analysis/tflint/default.nix+2−2 pkgs/development/tools/azcopy/default.nix+2−2 pkgs/development/tools/bazel-gazelle/default.nix+2−2 pkgs/development/tools/bazelisk/default.nix+4−2 pkgs/development/tools/bazelisk/gomod.patch+12 pkgs/development/tools/build-managers/mage/default.nix+2−2 pkgs/development/tools/conftest/default.nix+2−2 pkgs/development/tools/continuous-integration/drone-cli/default.nix+2−2 pkgs/development/tools/continuous-integration/drone/default.nix+2−2 pkgs/development/tools/continuous-integration/fly/default.nix+2−2 pkgs/development/tools/cue/default.nix+2−2 pkgs/development/tools/database/dbmate/default.nix+2−2 pkgs/development/tools/dive/default.nix+2−2 pkgs/development/tools/go-protobuf/default.nix+2−2 pkgs/development/tools/go-tools/default.nix+2−2 pkgs/development/tools/godef/default.nix+2−2 pkgs/development/tools/gofumpt/default.nix+2−2 pkgs/development/tools/gogetdoc/default.nix+2−2 pkgs/development/tools/golangci-lint/default.nix+1−1 pkgs/development/tools/gomodifytags/default.nix+2−2 pkgs/development/tools/gopkgs/default.nix+2−2 pkgs/development/tools/gopls/default.nix+2−2 pkgs/development/tools/gotestsum/default.nix+2−2 pkgs/development/tools/gotools/default.nix+2−2 pkgs/development/tools/hcloud/default.nix+2−2 pkgs/development/tools/kcli/default.nix+2−2 pkgs/development/tools/kind/default.nix+1−1 pkgs/development/tools/kubeprompt/default.nix+2−2 pkgs/development/tools/kustomize/default.nix+2−2 pkgs/development/tools/misc/act/default.nix+2−2 pkgs/development/tools/misc/circleci-cli/default.nix+2−2 pkgs/development/tools/misc/editorconfig-checker/default.nix+2−2 pkgs/development/tools/misc/go-license-detector/default.nix+2−2 pkgs/development/tools/misc/mkcert/default.nix+2−2 pkgs/development/tools/misc/reviewdog/default.nix+1−1 pkgs/development/tools/misc/terracognita/default.nix+2−2 pkgs/development/tools/mod/default.nix+2−2 pkgs/development/tools/packet-cli/default.nix+2−2 pkgs/development/tools/pet/default.nix+2−2 pkgs/development/tools/proto-contrib/default.nix+2−2 pkgs/development/tools/protoc-gen-doc/default.nix+2−2 pkgs/development/tools/prototool/default.nix+2−2 pkgs/development/tools/reftools/default.nix+2−2 pkgs/development/tools/renderizer/default.nix+2−2 pkgs/development/tools/richgo/default.nix+2−2 pkgs/development/tools/run/default.nix+2−2 pkgs/development/tools/yq-go/default.nix+2−2 pkgs/development/web/flyctl/default.nix+2−3 pkgs/development/web/minify/default.nix+2−2 pkgs/os-specific/darwin/smimesign/default.nix+1−1 pkgs/os-specific/linux/fscrypt/default.nix+2−2 pkgs/servers/blockbook/default.nix+15−1 pkgs/servers/caddy/default.nix+2−2 pkgs/servers/caddy/v2.nix+1−2 pkgs/servers/consul/default.nix+2−1 pkgs/servers/dns/coredns/default.nix+2−2 pkgs/servers/documize-community/default.nix+10−5 pkgs/servers/documize-community/vendor.patch+2392 pkgs/servers/echoip/default.nix+2−2 pkgs/servers/gobetween/default.nix+20−4 pkgs/servers/gobetween/gomod.patch+21 pkgs/servers/gortr/default.nix+2−2 pkgs/servers/gotify/default.nix+1−1 pkgs/servers/gotify/mod-sha.nix−1 pkgs/servers/hasura/cli.nix+2−2 pkgs/servers/imgproxy/default.nix+2−2 pkgs/servers/matterbridge/default.nix+2−2 pkgs/servers/mautrix-whatsapp/default.nix+17−2 pkgs/servers/minio/default.nix+2−2 pkgs/servers/monitoring/do-agent/default.nix+2−2 pkgs/servers/monitoring/mtail/default.nix+2−2 pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix+2−2 pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix+2−2 pkgs/servers/monitoring/prometheus/varnish-exporter.nix+2−2 pkgs/servers/monitoring/sensu-go/default.nix+2−2 pkgs/servers/monitoring/telegraf/default.nix+2−2 pkgs/servers/monitoring/thanos/default.nix+2−2 pkgs/servers/nosql/influxdb/default.nix+2−2 pkgs/servers/sql/dolt/default.nix+2−2 pkgs/servers/tailscale/default.nix+9−2 pkgs/servers/traefik/default.nix+2−2 pkgs/servers/web-apps/shiori/default.nix+2−2 pkgs/shells/elvish/default.nix+2−2 pkgs/shells/zsh/antibody/default.nix+2−2 pkgs/shells/zsh/zsh-history/default.nix+2−2 pkgs/tools/admin/aws-vault/default.nix+2−2 pkgs/tools/admin/awsweeper/default.nix+8−2 pkgs/tools/admin/berglas/default.nix+2−2 pkgs/tools/admin/certigo/default.nix+2−2 pkgs/tools/admin/clair/default.nix+2−2 pkgs/tools/admin/eksctl/default.nix+1−1 pkgs/tools/admin/iamy/default.nix+2−2 pkgs/tools/admin/lego/default.nix+1−1 pkgs/tools/audio/mpd-mpris/default.nix+2−3 pkgs/tools/backup/wal-g/default.nix+2−2 pkgs/tools/misc/3mux/default.nix+2−2 pkgs/tools/misc/chezmoi/default.nix+2−2 pkgs/tools/misc/clipman/default.nix+2−2 pkgs/tools/misc/docui/default.nix+2−2 pkgs/tools/misc/fzf/default.nix+2−2 pkgs/tools/misc/gotify-cli/default.nix+2−2 pkgs/tools/misc/kepubify/default.nix+2−2 pkgs/tools/misc/lf/default.nix+2−2 pkgs/tools/misc/libgen-cli/default.nix+2−2 pkgs/tools/misc/mutagen/default.nix+2−2 pkgs/tools/misc/neo-cowsay/default.nix+2−2 pkgs/tools/misc/pg_flame/default.nix+2−2 pkgs/tools/misc/pgcenter/default.nix+2−2 pkgs/tools/misc/pgmetrics/default.nix+2−2 pkgs/tools/misc/pistol/default.nix+2−3 pkgs/tools/misc/powerline-go/default.nix+2−2 pkgs/tools/misc/up/default.nix+4−2 pkgs/tools/misc/up/gomod.patch+23 pkgs/tools/networking/amass/default.nix+1−1 pkgs/tools/networking/cassowary/default.nix+2−2 pkgs/tools/networking/clash/default.nix+2−2 pkgs/tools/networking/corerad/default.nix+3−1 pkgs/tools/networking/croc/default.nix+2−2 pkgs/tools/networking/curlie/default.nix+2−2 pkgs/tools/networking/dnsproxy/default.nix+2−2 pkgs/tools/networking/frp/default.nix+2−2 pkgs/tools/networking/grpcui/default.nix+2−2 pkgs/tools/networking/hey/default.nix+2−2 pkgs/tools/networking/minio-client/default.nix+2−2 pkgs/tools/networking/nebula/default.nix+2−2 pkgs/tools/networking/obfs4/default.nix+2−2 pkgs/tools/networking/pixiecore/default.nix+2−2 pkgs/tools/networking/shadowfox/default.nix+2−2 pkgs/tools/networking/tendermint/default.nix+2−2 pkgs/tools/networking/termshark/default.nix+2−2 pkgs/tools/networking/v2ray/generic.nix+2−2 pkgs/tools/networking/yggdrasil/default.nix+2−2 pkgs/tools/package-management/mynewt-newt/default.nix+2−2 pkgs/tools/package-management/nfpm/default.nix+2−2 pkgs/tools/security/age/default.nix+2−2 pkgs/tools/security/bettercap/default.nix+2−2 pkgs/tools/security/browserpass/default.nix+2−2 pkgs/tools/security/gobuster/default.nix+2−2 pkgs/tools/security/gopass/default.nix+2−2 pkgs/tools/security/saml2aws/default.nix+15−2 pkgs/tools/security/sops/default.nix+2−2 pkgs/tools/system/ctop/default.nix+2−2 pkgs/tools/system/gotop/default.nix+2−2 pkgs/tools/system/jump/default.nix+2−2 pkgs/tools/system/netdata/go.d.plugin.nix+2−2 pkgs/tools/text/gjo/default.nix+2−3 pkgs/tools/text/shfmt/default.nix+2−2
doc/languages-frameworks/go.xml+7−7
@@ -36,7 +36,7 @@ pet = buildGoModule rec {
3636 sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s";
3737 };
3838
39− modSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j"; <co xml:id='ex-buildGoModule-1' />
39+ vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j"; <co xml:id='ex-buildGoModule-1' />
4040
4141 subPackages = [ "." ]; <co xml:id='ex-buildGoModule-2' />
4242
@@ -56,7 +56,7 @@ pet = buildGoModule rec {
5656 <calloutlist>
5757 <callout arearefs='ex-buildGoModule-1'>
5858 <para>
59− <varname>modSha256</varname> is the hash of the output of the intermediate fetcher derivation.
59+ <varname>vendorSha256</varname> is the hash of the output of the intermediate fetcher derivation.
6060 </para>
6161 </callout>
6262 <callout arearefs='ex-buildGoModule-2'>
@@ -68,12 +68,12 @@ pet = buildGoModule rec {
6868 </para>
6969
7070 <para>
71− <varname>modSha256</varname> can also take <varname>null</varname> as an input.
71+ <varname>vendorSha256</varname> can also take <varname>null</varname> as an input.
7272
73− When `null` is used as a value, the derivation won't be a
74− fixed-output derivation but disable the build sandbox instead. This can be useful outside
75− of nixpkgs where re-generating the modSha256 on each mod.sum changes is cumbersome,
76− but will fail to build by Hydra, as builds with a disabled sandbox are discouraged.
73+ When `null` is used as a value, rather than fetching the dependencies
74+ and vendoring them, we use the vendoring included within the source repo.
75+ If you'd like to not have to update this field on dependency changes,
76+ run `go mod vendor` in your source repo and set 'vendorSha256 = null;'
7777 </para>
7878 </section>
7979
nixos/doc/manual/release-notes/rl-2009.xml+7
@@ -98,6 +98,13 @@
9898 </para>
9999
100100 <itemizedlist>
101+ <listitem>
102+ <para>
103+ The go-modules builder now uses vendorSha256 instead of modSha256 to pin
104+ fetched version data. This is currently a warning, but will be removed in the next release.
105+</programlisting>
106+ </para>
107+ </listitem>
101108 <listitem>
102109 <para>
103110 Grafana is now built without support for phantomjs by default. Phantomjs support has been
pkgs/applications/blockchains/go-ethereum.nix+15−1
@@ -11,7 +11,21 @@ buildGoModule rec {
1111 sha256 = "1yqqflp73yvjy6bp05xd1nv5fc6p1nx7g4spbssxf3ws96pdh425";
1212 };
1313
14− modSha256 = "07xrw3fivfpbkg4mp8ghrj1bishfas82dbd780fymgs2h74iigf3";
14+ usb = fetchFromGitHub {
15+ owner = "karalabe";
16+ repo = "usb";
17+ rev = "911d15fe12a9c411cf5d0dd5635231c759399bed";
18+ sha256 = "0asd5fz2rhzkjmd8wjgmla5qmqyz4jaa6qf0n2ycia16jsck6wc2";
19+ };
20+
21+ vendorSha256 = "12aw8b8ci7nssidh1yz8d2hk43csdacq5jca9y70rjakpl3zndsz";
22+
23+ overrideModAttrs = (_: {
24+ postBuild = ''
25+ cp -r --reflink=auto ${usb}/libusb vendor/github.com/karalabe/usb
26+ cp -r --reflink=auto ${usb}/hidapi vendor/github.com/karalabe/usb
27+ '';
28+ });
1529
1630 subPackages = [
1731 "cmd/abidump"
pkgs/applications/blockchains/lnd.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1amciz924s2h6qhy7w34jpv1jc25p5ayfxzvjph6hhx0bccrm88w";
1212 };
1313
14− modSha256 = "15i4h3pkvyav9qsbfinzifram0knkylg24j6j0mxs4bnj80j4ycm";
14+ vendorSha256 = "1iyghg11cxvbzi0gl40fvv8pl3d3k52j179w3x5m1f09r5ji223y";
1515
1616 subPackages = ["cmd/lncli" "cmd/lnd"];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = lib.licenses.mit;
2222 maintainers = with maintainers; [ cypherpunk2140 ];
2323 };
24−}
24+}
pkgs/applications/editors/glow/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0vhl8d7xxqqyl916nh8sgm1xdaf7xlc3r18464bd2av22q9yz68n";
1212 };
1313
14− modSha256 = "0r0yq7kgz7i1wf4gxxihdrn1c8mi4wcyhadncxbln24s9c5apxsf";
14+ vendorSha256 = "1c16s5xiqr36azh2w90wg14jlw67ca2flbgjijpz7qd0ypxyfqlk";
1515
1616 buildFlagsArray = [ "-ldflags=" "-X=main.Version=${version}" ];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = licenses.mit;
2222 maintainers = with maintainers; [ ehmry filalex77 ];
2323 };
24−}
24+}
pkgs/applications/graphics/pdfcpu/default.nix+2−3
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0a7d36hzcvj68apzc726r2vqsjyrkcynxif5laarxapm6p67g3z4";
1212 };
1313
14− modSha256 = "0ak34wr5cbcvblndslsxdd24vfj3h02xqjqnj5amkll5iqn5mzi1";
14+ vendorSha256 = "09alkpfyxapycv6zsaz7prgbr0a1jzd78n7w2mh01mg4hhb2j3k7";
1515
1616 subPackages = [ "cmd/pdfcpu" ];
1717
@@ -22,5 +22,4 @@ buildGoModule rec {
2222 maintainers = with maintainers; [ doronbehar ];
2323 platforms = platforms.all;
2424 };
25−}
26−
25+}
pkgs/applications/misc/archiver/default.nix+2−2
@@ -14,7 +14,7 @@ buildGoModule rec {
1414 sha256 = "1yr2jhidqvbwh1y08lpqaidwpr5yx3bhvznm5fc9pk64s7z5kq3h";
1515 };
1616
17− modSha256 = "1mrfqhd0zb78rlqlj2ncb0srwjfl7rzhy2p9mwa82pgysvlp08gv";
17+ vendorSha256 = "1ikrgl03r9zkn86kxkqi2kf540g3qzzz24i5wvh6g3d5q49nygl9";
1818
1919 meta = with lib; {
2020 description = "Easily create & extract archives, and compress & decompress files of various formats";
@@ -23,4 +23,4 @@ buildGoModule rec {
2323 maintainers = with maintainers; [ kalbasit ];
2424 platforms = platforms.all;
2525 };
26−}
26+}
pkgs/applications/misc/cheat/default.nix+1−1
@@ -20,7 +20,7 @@ buildGoModule rec {
2020 installShellCompletion scripts/cheat.{bash,fish,zsh}
2121 '';
2222
23− modSha256 = "1z4za3rivc3vqv59p5yb5c9dcpmq669rzmf4z7zilbvmgm0pbgfp";
23+ vendorSha256 = null;
2424
2525 meta = with stdenv.lib; {
2626 description = "Create and view interactive cheatsheets on the command-line";
pkgs/applications/misc/exercism/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "17gvz9a0sn4p36hf4l77bxhhfipf4x998iay31layqwbnzmb4xy7";
1212 };
1313
14− modSha256 = "0pg0hxrr6jjd03wbjn5y65x02md3h352mnm1gr6vyiv7hn4ws14m";
14+ vendorSha256 = "0b2m9xkac60k5rbxmb03cxf530m23av14pnsjk8067l998sm4vqi";
1515
1616 subPackages = [ "./exercism" ];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = licenses.mit;
2222 maintainers = [ maintainers.rbasso ];
2323 };
24−}
24+}
pkgs/applications/misc/geoipupdate/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "057f9kp8g3wixjh9dm58g0qvzfcmhwbk1d573ldly4g5404r9bvf";
1212 };
1313
14− modSha256 = "1bypanvrkcqp8rk84cv2569671irgaf3cy27lcrknyina4pdvir5";
14+ vendorSha256 = "0q4byhvs1c1xm4qjvs2vyf98vdv121qn0z51arcf7k4ayrys5xcx";
1515
1616 meta = with stdenv.lib; {
1717 description = "Automatic GeoIP database updater";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 platforms = platforms.all;
2121 maintainers = with maintainers; [ das_j ];
2222 };
23−}
23+}
pkgs/applications/misc/gomatrix/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1wq55rvpyz0gjn8kiwwj49awsmi86zy1fdjcphzgb7883xalgr2m";
1212 };
1313
14− modSha256 = "13higizadnf4ypk8qn1b5s6mdg7n6l3indb43mjp1b4cfzjsyl91";
14+ vendorSha256 = "1yw0gph4zfg8w4343882l6b9lggwyak2zz8ic1l1m2m44p3aq169";
1515
1616 meta = with lib; {
1717 description = ''Displays "The Matrix" in a terminal'';
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 maintainers = with maintainers; [ skykanin ];
2020 homepage = "https://github.com/GeertJohan/gomatrix";
2121 };
22−}
22+}
pkgs/applications/misc/hugo/default.nix+17−3
@@ -1,10 +1,10 @@
1−{ stdenv, buildGoModule, fetchFromGitHub }:
1+{ stdenv, buildGoModule, fetchFromGitHub, libsass }:
22
33buildGoModule rec {
44 pname = "hugo";
55 version = "0.70.0";
66
7− goPackagePath = "github.com/gohugoio/hugo";
7+ buildInputs = [ libsass ];
88
99 src = fetchFromGitHub {
1010 owner = "gohugoio";
@@ -13,7 +13,21 @@ buildGoModule rec {
1313 sha256 = "14g1x95jh91z9xm3xkv2psw2jn7z6bv2009miyv727df4d58nh6m";
1414 };
1515
16− modSha256 = "015ha8pjz1fv8qg558xa6hl52fp2qd486ir9m01dvxw63xqx76ss";
16+ golibsass = fetchFromGitHub {
17+ owner = "bep";
18+ repo = "golibsass";
19+ rev = "8a04397f0baba474190a9f58019ff499ec43057a";
20+ sha256 = "0xk3m2ynbydzx87dz573ihwc4ryq0r545vz937szz175ivgfrhh3";
21+ };
22+
23+ overrideModAttrs = (_: {
24+ postBuild = ''
25+ rm -rf vendor/github.com/bep/golibsass/
26+ cp -r --reflink=auto ${golibsass} vendor/github.com/bep/golibsass
27+ '';
28+ });
29+
30+ vendorSha256 = "1wl9pg5wf1n5n7gq6lyz0l5ij4icjpfinl4myxwj93l2hqqyx2lf";
1731
1832 buildFlags = [ "-tags" "extended" ];
1933
pkgs/applications/misc/sampler/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1lanighxhnn28dfzils7i55zgxbw2abd6y723mq7x9wg1aa2bd0z";
1212 };
1313
14− modSha256 = "02ai193lpzsxdn1hpbndkfxdc88nyl4kcgbadhy122kgx13crcy8";
14+ vendorSha256 = "04nywhkil5xkipcibrp6vi63rfcvqgv7yxbxmmrhqys2cdxfvazv";
1515
1616 subPackages = [ "." ];
1717
@@ -24,4 +24,4 @@ buildGoModule rec {
2424 maintainers = with maintainers; [ uvnikita ];
2525 platforms = platforms.unix;
2626 };
27−}
27+}
pkgs/applications/misc/terminal-parrot/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1b4vr4s1zpkpf5kc1r2kdlp3hf88qp1f7h05g8kd62zf4sfbj722";
1212 };
1313
14− modSha256 = "01i8fim9z2l8rpdgfaih9ldvbap7gcx5767a15miv8q7sxpr90cp";
14+ vendorSha256 = "1qalnhhq3fmyzj0hkzc5gk9wbypr558mz3ik5msw7fid68k2i48c";
1515
1616 meta = with stdenv.lib; {
1717 description = "Shows colorful, animated party parrot in your terminial";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 platforms = platforms.all;
2121 maintainers = [ maintainers.heel ];
2222 };
23−}
23+}
pkgs/applications/misc/todoist/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0d3c621jaqxd6i58xm6nvi0avrh5mk23r169i95bn73igzw62w33";
1212 };
1313
14− modSha256 = "1nnp5ijz4n34gc97rar4wlvlbx21ndpjyb2mc6gxdk1wzx3mgswp";
14+ vendorSha256 = "0cznb8glh36dwyyn1gx1ggkwa9zffrrxg52k78brnaczsl0rsmky";
1515
1616 meta = {
1717 homepage = "https://github.com/sachaos/todoist";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = lib.licenses.mit;
2020 platforms = lib.platforms.unix;
2121 };
22−}
22+}
pkgs/applications/misc/wtf/default.nix+2−2
@@ -16,7 +16,7 @@ buildGoModule rec {
1616 sha256 = "0v6yafpz3sycq6yb7w4dyxqclszvdgwbyhqs5ii8ckynqcf6ifn7";
1717 };
1818
19− modSha256 = "0csxc5q7i2iq8z71ysfan2kwf4mghi89i5zja5g1a4cvmcabiq1g";
19+ vendorSha256 = "1q54bl1z9ljpsf63i5r6vzv7f143slja0n8lyppaxxdcg18h8gn0";
2020
2121 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
2222
@@ -36,4 +36,4 @@ buildGoModule rec {
3636 maintainers = with maintainers; [ kalbasit ];
3737 platforms = platforms.linux ++ platforms.darwin;
3838 };
39−}
39+}
pkgs/applications/networking/cloudflared/default.nix+3−2
@@ -1,4 +1,4 @@
1−{ stdenv, buildGoModule, fetchFromGitHub }:
1+{ stdenv, buildGoModule, fetchFromGitHub, runCommand }:
22
33buildGoModule rec {
44 pname = "cloudflared";
@@ -11,7 +11,8 @@ buildGoModule rec {
1111 sha256 = "1vbxm5z72y9zfg4carmja3fc1vhkanmc25pgnlw550p1l14y6404";
1212 };
1313
14− modSha256 = "1mnfp8nhbllv8msglci1hq4026rqsc1yibrh2xnwwbf2f3yqx8h0";
14+ vendorSha256 = "14w2iz3ycbzfvlr8a6qn86aaa8687cm203d73wpfkfskp277hwz0";
15+ deleteVendor = true;
1516
1617 buildFlagsArray = "-ldflags=-X main.Version=${version}";
1718
pkgs/applications/networking/cluster/argo/default.nix+2−2
@@ -28,7 +28,7 @@ buildGoModule rec {
2828 sha256 = "12wq79h4m8wlzf18r66965mbbjjb62kvnxdj50ra7nxa8jjxpsmf";
2929 };
3030
31− modSha256 = "1394bav1k1xv9n1rvji0j9a09mibk97xpha24640jkgmy9bnmg45";
31+ vendorSha256 = "0dhzr62x2lzf3w0j2r496cr7jvkdcavfqaqr2xh972k3qqc9caky";
3232
3333 subPackages = [ "cmd/argo" ];
3434
@@ -46,4 +46,4 @@ buildGoModule rec {
4646 maintainers = with maintainers; [ groodt ];
4747 platforms = platforms.unix;
4848 };
49−}
49+}
pkgs/applications/networking/cluster/argocd/default.nix+2−2
@@ -12,7 +12,7 @@ buildGoModule rec {
1212 sha256 = "01vsyrks1k5yfvrarv8ia0isr7snilr21b7lfiy860si82r2r8hj";
1313 };
1414
15− modSha256 = "1qivg7yy7ymmgkrvl365x29d8jnsphbz18j1ykgwwysyw3n4jkdg";
15+ vendorSha256 = "0r2nh7v00m6zbdnhsgjn01q9pkiz41ckkqgfnpqmkxaqmjz31iyj";
1616
1717 nativeBuildInputs = [ packr ];
1818
@@ -37,4 +37,4 @@ buildGoModule rec {
3737 license = licenses.asl20;
3838 maintainers = with maintainers; [ shahrukh330 ];
3939 };
40−}
40+}
pkgs/applications/networking/cluster/atlantis/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "16zz4xwpqipdmszbz93xxw31hbh7s8pfa9dm64ybyni7wc4lvdy6";
1212 };
1313
14− modSha256 = "18f7cf61yn5jkji5a4v6xw6c7xl40nj32n5w34xmcmszzf64cwkn";
14+ vendorSha256 = null;
1515
1616 subPackages = [ "." ];
1717
@@ -22,4 +22,4 @@ buildGoModule rec {
2222 license = licenses.asl20;
2323 maintainers = with maintainers; [ jpotier ];
2424 };
25−}
25+}
pkgs/applications/networking/cluster/docker-machine/hyperkit.nix+2−2
@@ -1,7 +1,7 @@
11{ lib, buildGoModule, minikube }:
22
33buildGoModule rec {
4− inherit (minikube) version src nativeBuildInputs buildInputs modSha256 commit;
4+ inherit (minikube) version src nativeBuildInputs buildInputs vendorSha256 commit;
55
66 pname = "docker-machine-hyperkit";
77
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 maintainers = with maintainers; [ atkinschang ];
2121 platforms = platforms.darwin;
2222 };
23−}
23+}
pkgs/applications/networking/cluster/docker-machine/kvm2.nix+2−2
@@ -1,7 +1,7 @@
11{ lib, buildGoModule, minikube }:
22
33buildGoModule rec {
4− inherit (minikube) version src nativeBuildInputs buildInputs modSha256 commit;
4+ inherit (minikube) version src nativeBuildInputs buildInputs vendorSha256 commit;
55
66 pname = "docker-machine-kvm2";
77
@@ -24,4 +24,4 @@ buildGoModule rec {
2424 maintainers = with maintainers; [ tadfisher atkinschang ];
2525 platforms = platforms.linux;
2626 };
27−}
27+}
pkgs/applications/networking/cluster/fluxctl/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1w6ndp0nrpps6pkxnq38hikbnzwahi6j9gn8l0bxd0qkf7cjc5w0";
1212 };
1313
14− modSha256 = "0zwq7n1lggj27j5yxgfplbaccw5fhbm7vm0sja839r1jamrn3ips";
14+ vendorSha256 = "0w5l1lkzx4frllflkbilj8qqwf54wkz7hin7q8xn1vflkv3lxcnp";
1515
1616 subPackages = [ "cmd/fluxctl" ];
1717
@@ -23,4 +23,4 @@ buildGoModule rec {
2323 license = licenses.asl20;
2424 maintainers = with maintainers; [ Gonzih filalex77 ];
2525 };
26−}
26+}
pkgs/applications/networking/cluster/helm/default.nix+2−2
@@ -10,7 +10,7 @@ buildGoModule rec {
1010 rev = "v${version}";
1111 sha256 = "1x05xnc3czk7vpn9qnfdavdjy5agv800nh7jyqczpiw125l9jfyd";
1212 };
13− modSha256 = "000knqwsajlqika4abp3fh721mn1vykcsnv3c1qw0mzffkmzwsqd";
13+ vendorSha256 = "0j25m56cwzjd9b75v7xlb26q81bsmln77k23h9n8v2f2gqwwpkrl";
1414
1515 subPackages = [ "cmd/helm" ];
1616 buildFlagsArray = [ "-ldflags=-w -s -X helm.sh/helm/v3/internal/version.version=v${version}" ];
@@ -28,4 +28,4 @@ buildGoModule rec {
2828 license = licenses.asl20;
2929 maintainers = with maintainers; [ rlupton20 edude03 saschagrunert Frostman ];
3030 };
31−}
31+}
pkgs/applications/networking/cluster/helmfile/default.nix+2−2
@@ -15,7 +15,7 @@ buildGoModule {
1515
1616 goPackagePath = "github.com/roboll/helmfile";
1717
18− modSha256 = "0j7w12rrnsv2h5v0bqh6sjq9anm51zs0p3nzlhwsksw9c98r9avk";
18+ vendorSha256 = "0m16l3px2ykdsrmlirf7c4lwgmigs6p3rdr61l49acwsmniz2m8a";
1919
2020 nativeBuildInputs = [ makeWrapper ];
2121
@@ -36,4 +36,4 @@ buildGoModule {
3636 maintainers = with lib.maintainers; [ pneumaticat yurrriq ];
3737 platforms = lib.platforms.unix;
3838 };
39−}
39+}
pkgs/applications/networking/cluster/helmsman/default.nix+1−1
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0i7sg3iwxb07gjxcz6chpdcx3fqykzldmf7s1c9m02hkps910ca8";
1212 };
1313
14− modSha256 = "19qdrrwmjc32nw8m0zi251z32wqj2d956wgd1dkcvx1x0n4p435g";
14+ vendorSha256 = "05vnysr5r3hbayss1pyifgp989kjw81h95iack8ady62k6ys5njl";
1515
1616 meta = with lib; {
1717 description = "Helm Charts (k8s applications) as Code tool";
pkgs/applications/networking/cluster/hetzner-kube/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1iqgpmljqx6rhmvsir2675waj78amcfiw08knwvlmavjgpxx2ysw";
1212 };
1313
14− modSha256 = "0jjrk93wdi13wrb5gchhqk7rgwm74kcizrbqsibgkgs2dszwfazh";
14+ vendorSha256 = "1jh2f66ys6rmrrwrf5zqfprgcvziyq6l4z8bfqwxgf1ysnxx525h";
1515
1616 buildFlagsArray = ''
1717 -ldflags=
@@ -25,4 +25,4 @@ buildGoModule rec {
2525 maintainers = with lib.maintainers; [ eliasp ];
2626 platforms = lib.platforms.unix;
2727 };
28−}
28+}
pkgs/applications/networking/cluster/jx/3321-fix-location-of-thrift.patchdeleted−36
@@ -1,36 +0,0 @@
1−From 40b8eaacb3a24c466c17c8a65938330d5805b112 Mon Sep 17 00:00:00 2001
2−From: "Wael M. Nasreddine" <wael.nasreddine@gmail.com>
3−Date: Fri, 8 Mar 2019 14:10:11 -0800
4−Subject: [PATCH] chore: fix the location of thrift
5−
6−Thrift is no longer available at the git.apache.org and it's now
7−distributed on GitHub at github.com/apache/thrift.
8−
9−fixes #3320
10−---
11− go.mod | 2 ++
12− go.sum | 1 +
13− 2 files changed, 3 insertions(+)
14−
15−diff --git a/go.mod b/go.mod
16−index 04bcc84cc..e26c4cf1d 100644
17−--- a/go.mod
18−+++ b/go.mod
19−@@ -184,3 +184,5 @@ replace k8s.io/metrics => k8s.io/metrics v0.0.0-20181128195641-3954d62a524d
20− replace k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190122181752-bebe27e40fb7
21−
22− replace k8s.io/client-go => k8s.io/client-go v2.0.0-alpha.0.0.20190115164855-701b91367003+incompatible
23−+
24−+replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999
25−diff --git a/go.sum b/go.sum
26−index c9fdf8768..6ed69e69d 100644
27−--- a/go.sum
28−+++ b/go.sum
29−@@ -87,6 +87,7 @@ github.com/antham/chyle v1.4.0/go.mod h1:D94Z4aE/ECudyNoTHwkhqu77mjGPZtfPG8dNoeI
30− github.com/antham/envh v1.2.0/go.mod h1:ocIRPHuwwjyBVBtuUJOJc2TYzGg+d23xSAZexl4y9hQ=
31− github.com/antham/strumt v0.0.0-20171215230529-6776189777d3/go.mod h1:sE7EYIUE0nQzPiv5zQAmw2aVkei0j2xmb4gTIIqSFSI=
32− github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ=
33−+github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
34− github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
35− github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
36− github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I=
pkgs/applications/networking/cluster/jx/default.nix+4−9
@@ -1,22 +1,17 @@
11{ buildGoModule, fetchFromGitHub, lib }:
22
33buildGoModule rec {
4− name = "jx";
5− version = "1.3.967";
4+ pname = "jx";
5+ version = "2.1.31";
66
77 src = fetchFromGitHub {
88 owner = "jenkins-x";
99 repo = "jx";
1010 rev = "v${version}";
11− sha256 = "0a25m7sz134kch21bg6l86kvwl4cg6babqf57kqidq6kid1zgdaq";
11+ sha256 = "1rbdmqi6m042jxd3hhqw821l567s9zzzgp0cvx8467yfi449qipn";
1212 };
1313
14− patches = [
15− # https://github.com/jenkins-x/jx/pull/3321
16− ./3321-fix-location-of-thrift.patch
17− ];
18−
19− modSha256 = "0ljf0c0c3pc12nmhdbrwflcaj6hs8igzjw5hi6fyhi6n9cy87vac";
14+ vendorSha256 = "1jn636sv6ak6hngw4fpgxqm6gfay2ip6g3gafjb3m4adcc5n9f8s";
2015
2116 subPackages = [ "cmd/jx" ];
2217
pkgs/applications/networking/cluster/k9s/default.nix+2−2
@@ -18,7 +18,7 @@ buildGoModule rec {
1818 -X github.com/derailed/k9s/cmd.commit=${src.rev}
1919 '';
2020
21− modSha256 = "11jxyzajlk6b5j19sg1kjr7qdzpxkwjwrvyhx9mwy6jb5sgqbzv8";
21+ vendorSha256 = "0vvzv5v7j77v809h2ial9n23244j1sy3xhkarsv0wwkifc3swvq5";
2222
2323 meta = with stdenv.lib; {
2424 description = "Kubernetes CLI To Manage Your Clusters In Style.";
@@ -26,4 +26,4 @@ buildGoModule rec {
2626 license = licenses.asl20;
2727 maintainers = with maintainers; [ Gonzih ];
2828 };
29−}
29+}
pkgs/applications/networking/cluster/kube3d/default.nix+2−2
@@ -21,7 +21,7 @@ buildGoModule rec {
2121 -X github.com/rancher/k3d/version.K3sVersion=v${k3sVersion}
2222 '';
2323
24− modSha256 = "0c8bfl0hz5cfhi6jzhhylz051jiix6s7s20fn23w7wri4xaqrjn8";
24+ vendorSha256 = null;
2525
2626 meta = with stdenv.lib; {
2727 homepage = "https://github.com/rancher/k3d";
@@ -30,4 +30,4 @@ buildGoModule rec {
3030 platforms = platforms.linux;
3131 maintainers = with maintainers; [ kuznero jlesquembre ngerstle ];
3232 };
33−}
33+}
pkgs/applications/networking/cluster/kubeseal/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0z51iwdc4m0y8wyyx3mcvbzxlrgws7n5wkcd0g7nr73irnsld4lh";
1212 };
1313
14− modSha256 = "029h0zr3fpzlsv9hf1d1x5j7aalxkcsyszsxjz8fqrhjafqc7zvq";
14+ vendorSha256 = null;
1515
1616 subPackages = [ "cmd/kubeseal" ];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = licenses.asl20;
2222 maintainers = with maintainers; [ groodt ];
2323 };
24−}
24+}
pkgs/applications/networking/cluster/kubeval/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "05li0qv4q7fy2lr50r6c1r8dhx00jb1g01qmgc72a9zqp378yiq0";
1212 };
1313
14− modSha256 = "0y9x44y3bchi8xg0a6jmp2rmi8dybkl6qlywb6nj1viab1s8dd4y";
14+ vendorSha256 = "1kpwvi84i3h1yjprd6m6hn8l9j235931871y3qk9cl0g8q0hv9ja";
1515
1616 meta = with lib; {
1717 description = "Validate your Kubernetes configuration files";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 maintainers = with maintainers; [ johanot nicknovitski ];
2121 platforms = platforms.all;
2222 };
23−}
23+}
pkgs/applications/networking/cluster/linkerd/default.nix+5−5
@@ -2,16 +2,16 @@
22
33buildGoModule {
44 pname = "linkerd-unstablle";
5− version = "2019-07-26";
5+ version = "2020-05-01";
66
77 src = fetchFromGitHub {
88 owner = "linkerd";
99 repo = "linkerd2";
10− rev = "065dd3ec9d4b84c90383b31be16ccadd34a8ab0d";
11− sha256 = "01m8g627sd126as0a74fy9svmymwd41sifd897nhn6kz78a21gq8";
10+ rev = "9e9f3bb1e2aeab8cf20f98f5cad159bbb6f24883";
11+ sha256 = "1pvj31wz1klwhcqga1m8kixdqsxwmppp9ix6r3wpp4dwfig45fm0";
1212 };
1313
14− modSha256 = "0gahhywpcj16ww4l8s3wjwvavq24fpy258snhyf94ipy6lb797sl";
14+ vendorSha256 = "0vls58ld50jca5yn73kvg3lx4z83cc7skky54a90pkbj737y58pz";
1515
1616 subPackages = [ "cli/cmd" ];
1717
@@ -21,4 +21,4 @@ buildGoModule {
2121 license = licenses.asl20;
2222 maintainers = with maintainers; [ Gonzih ];
2323 };
24−}
24+}
pkgs/applications/networking/cluster/minikube/default.nix+1−1
@@ -16,7 +16,7 @@ buildGoModule rec {
1616 # for -ldflags
1717 commit = "63ab801ac27e5742ae442ce36dff7877dcccb278";
1818
19− modSha256 = "1g94jjwr5higg1b297zwp6grkj7if3mrdafjq9vls9y2svh11xr8";
19+ vendorSha256 = "1l9dxn7yy21x4b3cg6l5a08wx2ng8qf531ilg8yf1rznwfwjajrv";
2020
2121 src = fetchFromGitHub {
2222 owner = "kubernetes";
pkgs/applications/networking/cluster/node-problem-detector/default.nix+2−9
@@ -11,14 +11,7 @@ buildGoModule rec {
1111 sha256 = "02avknglmkr9k933a64hkw0rjfxvyh4sc3x70p41b8q2g6vzv2gs";
1212 };
1313
14− # Project upstream recommends building through vendoring
15− overrideModAttrs = (_: {
16− buildCommand = ''
17− echo "Skipping go.mod, using vendoring instead." && touch $out
18− '';
19− });
20−
21− modSha256 = "0ip26j2h11n1kgkz36rl4akv694yz65hr72q4kv4b3lxcbi65b3p";
14+ vendorSha256 = null;
2215
2316 # Optionally, a log counter binary can be created to parse journald logs.
2417 # The binary is dynamically linked against systemd libraries, making it a
@@ -47,4 +40,4 @@ buildGoModule rec {
4740 license = licenses.asl20;
4841 maintainers = with maintainers; [ lbpdt ];
4942 };
50−}
43+}
pkgs/applications/networking/cluster/prow/default.nix+2−2
@@ -13,7 +13,7 @@ buildGoModule rec {
1313 sha256 = "0mc3ynmbf3kidibdy8k3v3xjlvmxl8w7zm1z2m0skmhd0y4bpmk4";
1414 };
1515
16− modSha256 = "1xajdg10a27icc7g1y3ym4pkgg64rp4afybbjlhbg3k3whir9xa1";
16+ vendorSha256 = "16fdc5r28andm8my4fxj0f1yygx6j2mvn92i6xdfhbcra0lvr4ql";
1717
1818 subPackages = [
1919 "prow/cmd/admission"
@@ -63,4 +63,4 @@ buildGoModule rec {
6363 maintainers = with maintainers; [ kalbasit ];
6464 platforms = platforms.linux ++ platforms.darwin;
6565 };
66−}
66+}
pkgs/applications/networking/cluster/qbec/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0krdfaha19wzi10rh0wfhki5nknbd5mndaxhrq7y9m840xy43d6d";
1212 };
1313
14− modSha256 = "1wb15vrkb4ryvrjp68ygmadnf78s354106ya210pnmsbb53rbhaz";
14+ vendorSha256 = "1cyr621fb6hxwswz9lf75brc9qjy1n9rqjkwi6r8s3y6nhw20db6";
1515
1616 meta = with lib; {
1717 description = "Configure kubernetes objects on multiple clusters using jsonnet https://qbec.io";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.asl20;
2020 maintainers = with maintainers; [ groodt ];
2121 };
22−}
22+}
pkgs/applications/networking/cluster/terraform-providers/elasticsearch/default.nix+2−2
@@ -10,7 +10,7 @@ buildGoModule rec {
1010 sha256 = "0ci9gcn9ijdbx25wa99iy0b3sl7akqa7b6gi9wnnl1dawpqznj7v";
1111 };
1212
13− modSha256 = "1xk21xswqwpv34j4ba4fj8lcbvfdd12x7rq1hrdyd21mdhmrhw0p";
13+ vendorSha256 = "1rdvyypdl3fk6af66gfjhyl271cnlx5xgrl1w68sc6sbvq00bqkd";
1414
1515 subPackages = [ "." ];
1616
@@ -24,4 +24,4 @@ buildGoModule rec {
2424 license = licenses.mpl20;
2525 maintainers = with maintainers; [ basvandijk ];
2626 };
27−}
27+}
pkgs/applications/networking/cluster/terraform-providers/lxd/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1k54021178zybh9dqly2ly8ji9x5rka8dn9xd6rv7gkcl5w3y6fv";
1212 };
1313
14− modSha256 = "1h95ng9by3i3v15s1ws1fv86a47vglivn42xbffdy94s108g0908";
14+ vendorSha256 = "1shdpl1zsbbpc3mfs0l65ykq2h15ggvqylaixcap4j4lfl7m9my0";
1515
1616 postBuild = "mv ../go/bin/terraform-provider-lxd{,_v${version}}";
1717
@@ -22,4 +22,4 @@ buildGoModule rec {
2222 license = licenses.mpl20;
2323 maintainers = with maintainers; [ gila ];
2424 };
25−}
25+}
pkgs/applications/networking/cluster/terraform-providers/vpsadmin/default.nix+2−2
@@ -10,7 +10,7 @@ buildGoModule rec {
1010 hash = "sha256-+6jRjcManQdoKh7ewOJI1UaulY5OSbkIUHmtrBI33u4=";
1111 };
1212
13− modSha256 = "sha256-gz+t50uHFj4BQnJg6kOJI/joJVE+usLpVzTqziek2wY=";
13+ vendorSha256 = "0j90fnzba23mwf9bzf9w5h0hszkl3h61p5i780s9v9c0hbzhbqsh";
1414
1515 subPackages = [ "." ];
1616
@@ -24,4 +24,4 @@ buildGoModule rec {
2424 license = licenses.mpl20;
2525 maintainers = with maintainers; [ zimbatm ];
2626 };
27−}
27+}
pkgs/applications/networking/cluster/terragrunt/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1znb9d4n9zv3dq10dw17kb1h04gj8iz6gwx1a741fcf4ygp8zpy1";
1212 };
1313
14− modSha256 = "0pjqsb6lxk73prc6jxj07iwd1wyy5gqz24kigb308r3n0c2vcnky";
14+ vendorSha256 = "0h737h25f80zfx84vm6ry0581c32ylcb5h9givqk5k5kh5qgkbgx";
1515
1616 buildInputs = [ makeWrapper ];
1717
@@ -30,4 +30,4 @@ buildGoModule rec {
3030 license = licenses.mit;
3131 maintainers = with maintainers; [ peterhoeg ];
3232 };
33−}
33+}
pkgs/applications/networking/gmailctl/default.nix+2−3
@@ -14,7 +14,7 @@ buildGoModule rec {
1414 sha256 = "08q4yjfbwlldirf3j5db18l8kn6sf288wd364s50jlcx2ka8w50j";
1515 };
1616
17− modSha256 = "1c7dk6l8lkq2j04cp5g97hwkwfmmyn5r0vpr5zpavvalxgjidsf4";
17+ vendorSha256 = "0qp8n7z3vcsbc6safp7i18i0i3r4hy4nidzwl85i981sg12vcg6b";
1818
1919 meta = with stdenv.lib; {
2020 description = "Declarative configuration for Gmail filters";
@@ -23,5 +23,4 @@ buildGoModule rec {
2323 maintainers = [ maintainers.doronbehar ];
2424 platforms = platforms.unix;
2525 };
26−}
27−
26+}
pkgs/applications/networking/hydroxide/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0d8wjyzmw89yhrszz487f7i19rcz7xlx4w2wd4c69k5nsdrs6dys";
1212 };
1313
14− modSha256 = "0888ikywclhjb4n7xqxc7hvzlhx1qhf4c3skaddqs3nrxm171jwn";
14+ vendorSha256 = "0d8yfmsl8rycbq8gjnvc657j14644lq0zmr9l88ik360szw6v6gc";
1515
1616 subPackages = [ "cmd/hydroxide" ];
1717
@@ -22,4 +22,4 @@ buildGoModule rec {
2222 maintainers = with maintainers; [ filalex77 ];
2323 platforms = platforms.unix;
2424 };
25−}
25+}
pkgs/applications/networking/instant-messengers/gomuks/default.nix+3−2
@@ -5,6 +5,7 @@ buildGoModule rec {
55 version = "2020-03-20";
66
77 goPackagePath = "maunium.net/go/gomuks";
8+ patches = [ ./gomod.patch ];
89
910 src = fetchFromGitHub {
1011 owner = "tulir";
@@ -13,7 +14,7 @@ buildGoModule rec {
1314 sha256 = "0f7i88vrvl1xl4hmjplq3wwihqwijbgxy6nk5fkvc8pfmm5hsjcs";
1415 };
1516
16− modSha256 = "10w0bjhnf6bbqx5jbgfv2jxxyqswzx25p64kkjmvh5qamjzpbjz2";
17+ vendorSha256 = "0awiw41nzgp4gj9fd8lcgk880aa07n535jksn0ya1cmsgavcfbvc";
1718
1819 postInstall = ''
1920 cp -r ${
@@ -37,4 +38,4 @@ buildGoModule rec {
3738 maintainers = with maintainers; [ tilpner emily ];
3839 platforms = platforms.unix;
3940 };
40−}
41+}
pkgs/applications/networking/instant-messengers/gomuks/gomod.patchnew file+20
@@ -0,0 +1,20 @@
1+diff --git a/go.mod b/go.mod
2+index 75d4a09..ef2a7ef 100644
3+--- a/go.mod
4++++ b/go.mod
5+@@ -9,13 +9,14 @@ require (
6+ github.com/lithammer/fuzzysearch v1.1.0
7+ github.com/lucasb-eyer/go-colorful v1.0.3
8+ github.com/mattn/go-runewidth v0.0.8
9++ github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
10+ github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
11+ github.com/pkg/errors v0.9.1
12+ github.com/rivo/uniseg v0.1.0
13+ github.com/russross/blackfriday/v2 v2.0.1
14+ github.com/sasha-s/go-deadlock v0.2.0
15+ github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
16+- github.com/stretchr/testify v1.5.1
17++ github.com/stretchr/testify v1.3.0
18+ go.etcd.io/bbolt v1.3.3
19+ golang.org/x/image v0.0.0-20200119044424-58c23975cae1
20+ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
pkgs/applications/networking/ipfs-cluster/default.nix+2−3
@@ -5,7 +5,7 @@ buildGoModule rec {
55 version = "0.12.1";
66 rev = "v${version}";
77
8− modSha256 = "0bn47lcb9plzvl2vqqj7p33ishz6bbqpsgf2i6p34g13bwwpq647";
8+ vendorSha256 = "1n0zb3v83wsy8y3k7xbpjc2ykh1b2n6p10d5wkflhga49q7rf64h";
99
1010 src = fetchFromGitHub {
1111 owner = "ipfs";
@@ -21,5 +21,4 @@ buildGoModule rec {
2121 platforms = platforms.unix;
2222 maintainers = with maintainers; [ jglukasik ];
2323 };
24−}
25−
24+}
pkgs/applications/networking/ipfs-migrator/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "18pjxkxfbsbbj4hs4xyzfmmz991h31785ldx41dll6wa9zx4lsnm";
1212 };
1313
14− modSha256 = "1magqgbb6prnihr8lr6jc2fcgsbqqc9y317mkdnvq9qs6bj0a6qj";
14+ vendorSha256 = null;
1515
1616 subPackages = [ "." ];
1717
@@ -22,4 +22,4 @@ buildGoModule rec {
2222 platforms = platforms.unix;
2323 maintainers = with maintainers; [ elitak ];
2424 };
25−}
25+}
pkgs/applications/networking/ipfs/default.nix+14−13
@@ -1,29 +1,30 @@
1−{ stdenv, buildGoModule, fetchFromGitHub, nixosTests }:
1+{ stdenv, buildGoModule, fetchurl, nixosTests }:
22
33buildGoModule rec {
44 pname = "ipfs";
55 version = "0.5.1";
66 rev = "v${version}";
77
8− src = fetchFromGitHub {
9− owner = "ipfs";
10− repo = "go-ipfs";
11− inherit rev;
12− sha256 = "11l55hlbixv1i25d3n216pkrwgcgac99fa88lyy3dailvminqxw7";
8+ # go-ipfs makes changes to it's source tarball that don't match the git source.
9+ src = fetchurl {
10+ url = "https://github.com/ipfs/go-ipfs/releases/download/${rev}/go-ipfs-source.tar.gz";
11+ sha256 = "0lpilycjbc1g9adp4d5kryfprixj18hg3235fnivakmv7fy2akkm";
1312 };
1413
15− postPatch = ''
16− rm -rf test/dependencies
17− patchShebangs plugin/loader/preload.sh
14+ # tarball contains multiple files/directories
15+ postUnpack = ''
16+ mkdir ipfs-src
17+ mv * ipfs-src || true
18+ cd ipfs-src
1819 '';
1920
20− buildPhase = ''
21− make install
22− '';
21+ sourceRoot = ".";
22+
23+ subPackages = [ "cmd/ipfs" ];
2324
2425 passthru.tests.ipfs = nixosTests.ipfs;
2526
26− modSha256 = "13mpva3r6r2amw08g0bdggbxn933jjimngkvzgq1q5dksp4mivfk";
27+ vendorSha256 = null;
2728
2829 meta = with stdenv.lib; {
2930 description = "A global, versioned, peer-to-peer filesystem";
pkgs/applications/networking/mailreaders/aerc/default.nix+17−2
@@ -1,6 +1,7 @@
11{ stdenv, buildGoModule, fetchurl
22, go, ncurses, notmuch, scdoc
33, python3, perl, w3m, dante
4+, fetchFromGitHub
45}:
56
67let
@@ -14,7 +15,21 @@ in buildGoModule rec {
1415 sha256 = "1bx2fypw053v3bzalfgyi6a0s5fvv040z8jy4i63s7p53m8gmzs9";
1516 };
1617
17− modSha256 = "127xrah6xxrvc224g5dxn432sagrssx8v7phzapcsdajsnmagq6x";
18+ libvterm = fetchFromGitHub {
19+ owner = "ddevault";
20+ repo = "go-libvterm";
21+ rev = "b7d861da381071e5d3701e428528d1bfe276e78f";
22+ sha256 = "06vv4pgx0i6hjdjcar4ch18hp9g6q6687mbgkvs8ymmbacyhp7s6";
23+ };
24+
25+ vendorSha256 = "0rnyjjlsxsi0y23m6ckyd52562m33qr35fvdcdzy31mbfpi8kl2k";
26+
27+ overrideModAttrs = (_: {
28+ postBuild = ''
29+ cp -r --reflink=auto ${libvterm}/libvterm vendor/github.com/ddevault/go-libvterm
30+ cp -r --reflink=auto ${libvterm}/encoding vendor/github.com/ddevault/go-libvterm
31+ '';
32+ });
1833
1934 nativeBuildInputs = [
2035 scdoc
@@ -60,4 +75,4 @@ in buildGoModule rec {
6075 license = licenses.mit;
6176 platforms = platforms.unix;
6277 };
63−}
78+}
pkgs/applications/networking/mailreaders/hasmail/default.nix+2−2
@@ -19,7 +19,7 @@ buildGoModule rec {
1919 sha256 = "1p6kwa5xk1mb1fkkxz1b5rcyp5kb4zc8nfif1gk6fab6wbdj9ia1";
2020 };
2121
22− modSha256 = "0z3asz7v1izg81f9xifx9s2sp5hly173hajsn9idi3bkv0h78is2";
22+ vendorSha256 = "0sblgjmn3i3k31jfq5zy3bx7bv5z2cg6rjzr7aj87c57yhzzcmk7";
2323
2424 nativeBuildInputs = [
2525 pkgconfig
@@ -38,4 +38,4 @@ buildGoModule rec {
3838 maintainers = with maintainers; [ doronbehar ];
3939 platforms = platforms.all;
4040 };
41−}
41+}
pkgs/applications/networking/p2p/magnetico/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1622xcl5v67lrnkjwbg7g5b5ikrawx7p91jxbj3ixc1za2f3a3fn";
1212 };
1313
14− modSha256 = "193n323xaypm9xkpray68nqcgyf141x8qzpxzwjnrmsgfz8p6wgk";
14+ vendorSha256 = "0g4m0jnpy0q64xnflphyc0lmhni0q9448h7grbbr7f1s9lpqsjml";
1515
1616 nativeBuildInputs = [ go-bindata ];
1717 buildPhase = ''
@@ -30,4 +30,4 @@ buildGoModule rec {
3030 badPlatforms = platforms.darwin;
3131 maintainers = with maintainers; [ rnhmjoj ];
3232 };
33−}
33+}
pkgs/applications/networking/syncthing/default.nix+2−2
@@ -13,7 +13,7 @@ let
1313 sha256 = "0yy31rfvr9d6kidfvvy36ljxlc14x5ir3ln19zg4k02hdqn0xkpj";
1414 };
1515
16− modSha256 = "1vs7lxlqd7jr4r9xkk7w7k6gxzjmm7ic0a1scfpx8rcr5swa9cq1";
16+ vendorSha256 = "03df08nghcf6k3a7xxgw03cq2mvvkmrrzzai0w18mrga0aa700c9";
1717
1818 patches = [
1919 ./add-stcli-target.patch
@@ -103,4 +103,4 @@ in {
103103 --replace /usr/bin/strelaysrv $out/bin/strelaysrv
104104 '';
105105 };
106−}
106+}
pkgs/applications/networking/websocketd/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1qc4yi4kwy7bfi3fb17w58ff0i95yi6m4syldh8j79930syr5y8q";
1212 };
1313
14− modSha256 = "18hamj557ln8k3vmvcrpvnydjr1dy7zi9490iacwdldw5vp870xs";
14+ vendorSha256 = "05k31z4h3b327mh940zh52im4xfk7kf5phb8b7xp4l9bgckhz4lb";
1515
1616 meta = with lib; {
1717 description = "Turn any program that uses STDIN/STDOUT into a WebSocket server";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 maintainers = [ maintainers.bjornfor ];
2020 license = licenses.bsd2;
2121 };
22−}
22+}
pkgs/applications/version-management/git-and-tools/gh/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "08fy3677yq52x40rab49ijhw4r25ls2807dbv9wpna6w07n7r8v7";
1212 };
1313
14− modSha256 = "0v33x9bnwjfg4425vralnsb4i22c0g1rcmaga9911v0i7d51k0fn";
14+ vendorSha256 = "0s99bjmsafnzhl3s2lcybxgsw1s4i1h3vh6p40gz4vsfhndidqrq";
1515
1616 buildFlagsArray = [
1717 "-ldflags=-s -w -X github.com/cli/cli/command.Version=${version}"
@@ -33,4 +33,4 @@ buildGoModule rec {
3333 license = licenses.mit;
3434 maintainers = with maintainers; [ zowoq ];
3535 };
36−}
36+}
pkgs/applications/version-management/git-and-tools/ghq/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1i0q9lxdxbyj0l0510cbkwkbycawrx8cxlbdrhb2p2fnk0vqnyiv";
1212 };
1313
14− modSha256 = "0hlbhky3c6zva9khn73n6xgq57k5p8anskxy3g2m0wzhr72cyc41";
14+ vendorSha256 = "1r8lvy2xk0gvlwy6k86wh14ajb6hgs9f1fwfqk17ra1cb404l2lz";
1515
1616 buildFlagsArray = ''
1717 -ldflags=
@@ -29,4 +29,4 @@ buildGoModule rec {
2929 maintainers = with stdenv.lib.maintainers; [ sigma ];
3030 license = stdenv.lib.licenses.mit;
3131 };
32−}
32+}
pkgs/applications/version-management/git-and-tools/git-bug/default.nix+2−2
@@ -13,7 +13,7 @@ buildGoModule rec {
1313 sha256 = "01ab3mlwh5g1vr3x85fppflg18gb8ip9mjfsp2b5rfigd9lxyyns";
1414 };
1515
16− modSha256 = "05wxvzsbhvz15596019vs7h09kynfsfjx3i5xyrl5xjzdxbaqbrq";
16+ vendorSha256 = "0c8b47lj4wl3s21lm0vx4z7hznylm8c4fb8b8gxm278kn3zys607";
1717
1818 buildFlagsArray = ''
1919 -ldflags=
@@ -35,4 +35,4 @@ buildGoModule rec {
3535 platforms = platforms.all;
3636 maintainers = with maintainers; [ royneary ];
3737 };
38−}
38+}
pkgs/applications/version-management/git-and-tools/git-subtrac/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1nj950r38sxzrgw69m1xphm7a4km2g29iw2897gfx4wx57jl957k";
1212 };
1313
14− modSha256 = "147vzllp1gydk2156hif313vwykagrj35vaiqy1swqczxs7p9hhs";
14+ vendorSha256 = "1ccwbhzwys8sl3m2rs2lp70snzsi2a0ahnnq8kn15rrlvsv5qahf";
1515
1616 meta = with lib; {
1717 description = "Keep the content for your git submodules all in one place: the parent repo";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.asl20;
2020 maintainers = [ maintainers.marsam ];
2121 };
22−}
22+}
pkgs/applications/version-management/git-and-tools/lab/default.nix+2−2
@@ -13,7 +13,7 @@ buildGoModule rec {
1313
1414 subPackages = [ "." ];
1515
16− modSha256 = "03fqa7s6729g0a6ffiyc61dkldpi7vg8pvvpqak4c0mqi1dycivd";
16+ vendorSha256 = "1lrmafvv5zfn9kc0p8g5vdz351n1zbaqwhwk861fxys0rdpqskyc";
1717
1818 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
1919
@@ -31,4 +31,4 @@ buildGoModule rec {
3131 maintainers = with maintainers; [ marsam dtzWill ];
3232 platforms = platforms.all;
3333 };
34−}
34+}
pkgs/applications/version-management/git-and-tools/lefthook/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "14rcvbzzrx0m3xijl8qhw5l2h0q10hqzad2hqm3079g893f2qad0";
1212 };
1313
14− modSha256 = "0ih11gw2y9dhv3zw1fzjmdfjln5h6zg1bj7sl68cglf6743siqnq";
14+ vendorSha256 = "1pdrw4vwbj9cka2pjbjvxviigfvnrf8sgws27ixwwiblbkj4isc8";
1515
1616 meta = with stdenv.lib; {
1717 description = "Fast and powerful Git hooks manager for any type of projects";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.mit;
2020 maintainers = with maintainers; [ rencire ];
2121 };
22−}
22+}
pkgs/applications/version-management/sourcehut/builds.nix+2−2
@@ -11,7 +11,7 @@ let
1111 pname = "builds-sr-ht-worker";
1212 goPackagePath = "git.sr.ht/~sircmpwn/builds.sr.ht/worker";
1313
14− modSha256 = "10is7siscids9qz6jh9m1i17749dafqqkg4b3sslmxaxyn16yj97";
14+ vendorSha256 = "0prdlihcy5yz760llwyby747yy2981dn3gy401a48df7ndlfj6lp";
1515 };
1616in buildPythonPackage rec {
1717 inherit version;
@@ -57,4 +57,4 @@ in buildPythonPackage rec {
5757 license = licenses.agpl3;
5858 maintainers = with maintainers; [ eadwu ];
5959 };
60−}
60+}
pkgs/applications/version-management/sourcehut/git.nix+5−5
@@ -11,7 +11,7 @@ let
1111 pname = "gitsrht-shell";
1212 goPackagePath = "git.sr.ht/~sircmpwn/git.sr.ht/gitsrht-shell";
1313
14− modSha256 = "0lxxxzh39bviab71kfsqqr217338yxn5l2zkak55r6qqs6iz4ccv";
14+ vendorSha256 = "1zvbqn4r940mibn4h1cqz94gbr476scm281ps361n0rfqlimw8g5";
1515 };
1616
1717 buildDispatcher = src: buildGoModule {
@@ -19,7 +19,7 @@ let
1919 pname = "gitsrht-dispatcher";
2020 goPackagePath = "git.sr.ht/~sircmpwn/git.sr.ht/gitsrht-dispatch";
2121
22− modSha256 = "1lmgmlin460g09dph2hw6yz25d4agqwjhrjv0qqsis7df9qpf3i1";
22+ vendorSha256 = "1lzkf13m54pq0gnn3bcxc80nfg76hgck4l8q8jpaicrsiwgcyrd9";
2323 };
2424
2525 buildKeys = src: buildGoModule {
@@ -27,7 +27,7 @@ let
2727 pname = "gitsrht-keys";
2828 goPackagePath = "git.sr.ht/~sircmpwn/git.sr.ht/gitsrht-keys";
2929
30− modSha256 = "1pfcw9n63zhlxm9kd3bxa2zqmzd8mgl7yl2ck055j56v3k929w3f";
30+ vendorSha256 = "16j7kpar318s4766pln8xn6d51xqblwig5n1jywhj0sl80qjl5cv";
3131 };
3232
3333 buildUpdateHook = src: buildGoModule {
@@ -35,7 +35,7 @@ let
3535 pname = "gitsrht-update-hook";
3636 goPackagePath = "git.sr.ht/~sircmpwn/git.sr.ht/gitsrht-update-hook";
3737
38− modSha256 = "0p8qd6hpgmnlfqk5vw6l41dqs7qjhf6xijzj5iv6wv1cf362b4wp";
38+ vendorSha256 = "1rmv3p60g6w4h4v9wx99jkyx0q02snslyjrjy9n1flardjs01b63";
3939 };
4040in buildPythonPackage rec {
4141 inherit version;
@@ -79,4 +79,4 @@ in buildPythonPackage rec {
7979 license = licenses.agpl3;
8080 maintainers = with maintainers; [ eadwu ];
8181 };
82−}
82+}
pkgs/applications/virtualization/firectl/default.nix+4−2
@@ -4,6 +4,8 @@ buildGoModule rec {
44 pname = "firectl";
55 version = "0.1.0";
66
7+ patches = [ ./gomod.patch ];
8+
79 src = fetchFromGitHub {
810 owner = "firecracker-microvm";
911 repo = pname;
@@ -11,7 +13,7 @@ buildGoModule rec {
1113 sha256 = "1ni3yx4rjhrkqk2038c6hkb2jwsdj2llx233wd5wgpvb6c57652p";
1214 };
1315
14− modSha256 = "1nqjz1afklcxc3xcpmygjdh3lfxjk6zvmghr8z8fr3nw2wvw2ddr";
16+ vendorSha256 = "1xbpck1gvzl75xgrajf5yzl199l4f2f6j3mac5586i7b00b9jxqj";
1517
1618 meta = with stdenv.lib; {
1719 description = "A command-line tool to run Firecracker microVMs";
@@ -20,4 +22,4 @@ buildGoModule rec {
2022 platforms = platforms.linux;
2123 maintainers = with maintainers; [ xrelkd ];
2224 };
23−}
25+}
pkgs/applications/virtualization/firectl/gomod.patchnew file+15
@@ -0,0 +1,15 @@
1+diff --git a/go.mod b/go.mod
2+index 1044001..7bafeda 100644
3+--- a/go.mod
4++++ b/go.mod
5+@@ -1,7 +1,10 @@
6+ module github.com/firecracker-microvm/firectl
7+
8++go 1.14
9++
10+ require (
11+ github.com/firecracker-microvm/firecracker-go-sdk v0.15.1
12++ github.com/go-openapi/strfmt v0.17.1
13+ github.com/jessevdk/go-flags v1.4.0
14+ github.com/pkg/errors v0.8.0
15+ github.com/sirupsen/logrus v1.1.1
pkgs/applications/virtualization/gvisor/containerd-shim.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "077bhrmjrpcxv1z020yxhx2c4asn66j21gxlpa6hz0av3lfck9lm";
1212 };
1313
14− modSha256 = "1jdhgbrn59ahnabwnig99i21f6kimmqx9f3dg10ffwfs3dx0gzlg";
14+ vendorSha256 = "11jai5jl024k7wbhz4a3zzdbvl0si07jwgwmyr8bn4i0nqx8ig2k";
1515
1616 buildPhase = ''
1717 make
@@ -33,4 +33,4 @@ buildGoModule rec {
3333 maintainers = with maintainers; [ andrew-d ];
3434 platforms = [ "x86_64-linux" ];
3535 };
36−}
36+}
pkgs/development/compilers/go-jsonnet/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0l6cwky2xl7m8nnc9abp76bhkdcf2ldbbv3r8p30xv2yr5wd1j8i";
1212 };
1313
14− modSha256 = "1b6hz5a66hhlzpcv1badxr1b4nmk4lw0507d5jks7lqzvvwd0sxq";
14+ vendorSha256 = "1vdv0nq31mjprxzxf8x0diaigissy07vnm338h8jrk5i74x5by39";
1515
1616 subPackages = [ "cmd/jsonnet" ];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = licenses.asl20;
2222 maintainers = with maintainers; [ nshalman ];
2323 };
24−}
24+}
pkgs/development/compilers/tinygo/default.nix+16−2
@@ -1,6 +1,9 @@
11{ lib, buildGoModule, fetchFromGitHub, llvm, clang-unwrapped, lld, avrgcc
2−, avrdude, openocd, gcc-arm-embedded, makeWrapper }:
2+, avrdude, openocd, gcc-arm-embedded, makeWrapper, fetchurl }:
33
4+let main = ./main.go;
5+ gomod = ./go.mod;
6+in
47buildGoModule rec {
58 pname = "tinygo";
69 version = "0.13.0";
@@ -11,8 +14,19 @@ buildGoModule rec {
1114 rev = "v${version}";
1215 sha256 = "0x59j56y704m2hfkg78illgw9f6czrx265x887jfd989lnxphyqa";
1316 };
17+
18+ overrideModAttrs = (_: {
19+ patches = [];
20+ preBuild = ''
21+ rm -rf *
22+ cp ${main} main.go
23+ cp ${gomod} go.mod
24+ '';
25+ });
1426
15− modSha256 = "0y8n4mcr4jhas29ahvk8k4zbj1iz65fdpsgq61qa8kcsm8m5kqa6";
27+ preBuild = "cp ${gomod} go.mod";
28+
29+ vendorSha256 = "19194dlzpl6zzw2gqybma5pwip71rw8z937f104k6c158qzzgy62";
1630 enableParallelBuilding = true;
1731 subPackages = [ "." ];
1832 buildInputs = [ llvm clang-unwrapped makeWrapper ];
pkgs/development/compilers/tinygo/go.modnew file+13
@@ -0,0 +1,13 @@
1+module github.com/tinygo-org/tinygo
2+
3+go 1.14
4+
5+require (
6+ github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2
7+ github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf
8+ github.com/marcinbor85/gohex v0.0.0-20180128172054-7a43cd876e46
9+ go.bug.st/serial v1.0.0
10+ golang.org/x/tools v0.0.0-20200512001501-aaeff5de670a
11+ google.golang.org/appengine v1.4.0
12+ tinygo.org/x/go-llvm v0.0.0-20200401165421-8d120882fc7a
13+)
pkgs/development/compilers/tinygo/main.gonew file+18
@@ -0,0 +1,18 @@
1+package main
2+
3+import (
4+ "fmt"
5+
6+ _ "github.com/blakesmith/ar"
7+ _ "github.com/google/shlex"
8+ _ "github.com/marcinbor85/gohex"
9+ _ "go.bug.st/serial"
10+ _ "golang.org/x/tools/go/ast/astutil"
11+ _ "golang.org/x/tools/go/ssa"
12+ _ "google.golang.org/appengine"
13+ _ "tinygo.org/x/go-llvm"
14+)
15+
16+func main() {
17+ fmt.Println("vim-go")
18+}
pkgs/development/go-modules/generic/default.nix+39−20
@@ -13,12 +13,15 @@
1313# path to go.mod and go.sum directory
1414, modRoot ? "./"
1515
16−# modSha256 is the sha256 of the vendored dependencies
16+# vendorSha256 is the sha256 of the vendored dependencies
1717#
18−# CAUTION: if `null` is used as a value, the derivation won't be a
19−# fixed-output derivation but disable the build sandbox instead. Don't use
20−# this in nixpkgs as Hydra won't build those packages.
21−, modSha256
18+# if vendorSha256 is null, then we won't fetch any dependencies and
19+# rely on the vendor folder within the source.
20+, vendorSha256 ? null
21+# Whether to delete the vendor folder supplied with the source.
22+, deleteVendor ? false
23+
24+, modSha256 ? null
2225
2326# We want parallel builds by default
2427, enableParallelBuilding ? true
@@ -37,21 +40,26 @@
3740with builtins;
3841
3942let
40− args = removeAttrs args' [ "overrideModAttrs" "modSha256" "disabled" ];
43+ args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" "disabled" ];
4144
4245 removeReferences = [ ] ++ lib.optional (!allowGoReference) go;
4346
4447 removeExpr = refs: ''remove-references-to ${lib.concatMapStrings (ref: " -t ${ref}") refs}'';
4548
46− go-modules = go.stdenv.mkDerivation (let modArgs = {
49+ deleteFlag = if deleteVendor then "true" else "false";
50+
51+ go-modules = if vendorSha256 != null then go.stdenv.mkDerivation (let modArgs = {
52+
4753 name = "${name}-go-modules";
4854
49− nativeBuildInputs = [ go git cacert ];
55+ nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ go git cacert ];
5056
5157 inherit (args) src;
5258 inherit (go) GOOS GOARCH;
5359
5460 patches = args.patches or [];
61+ preBuild = args.preBuild or "";
62+ sourceRoot = args.sourceRoot or "";
5563
5664 GO111MODULE = "on";
5765
@@ -64,7 +72,6 @@ let
6472
6573 export GOCACHE=$TMPDIR/go-cache
6674 export GOPATH="$TMPDIR/go"
67− mkdir -p "''${GOPATH}/pkg/mod/cache/download"
6875 cd "${modRoot}"
6976 runHook postConfigure
7077 '';
@@ -72,7 +79,16 @@ let
7279 buildPhase = args.modBuildPhase or ''
7380 runHook preBuild
7481
75− go mod download
82+ if [ ${deleteFlag} == "true" ]; then
83+ rm -rf vendor
84+ fi
85+
86+ if [ -e vendor ]; then
87+ echo "vendor folder exists, please set 'vendorSha256=null;' or 'deleteVendor=true;' in your expression"
88+ exit 10
89+ fi
90+ go mod vendor
91+ mkdir -p vendor
7692
7793 runHook postBuild
7894 '';
@@ -81,23 +97,19 @@ let
8197 runHook preInstall
8298
8399 # remove cached lookup results and tiles
84− rm -rf "''${GOPATH}/pkg/mod/cache/download/sumdb"
85− cp -r "''${GOPATH}/pkg/mod/cache/download" $out
100+ cp -r --reflink=auto vendor $out
86101
87102 runHook postInstall
88103 '';
89104
90105 dontFixup = true;
91106 }; in modArgs // (
92− if modSha256 == null then
93− { __noChroot = true; }
94− else
95107 {
96108 outputHashMode = "recursive";
97109 outputHashAlgo = "sha256";
98− outputHash = modSha256;
110+ outputHash = vendorSha256;
99111 }
100− ) // overrideModAttrs modArgs);
112+ ) // overrideModAttrs modArgs) else "";
101113
102114 package = go.stdenv.mkDerivation (args // {
103115 nativeBuildInputs = [ removeReferencesTo go ] ++ nativeBuildInputs;
@@ -105,6 +117,7 @@ let
105117 inherit (go) GOOS GOARCH;
106118
107119 GO111MODULE = "on";
120+ GOFLAGS = "-mod=vendor";
108121
109122 configurePhase = args.configurePhase or ''
110123 runHook preConfigure
@@ -112,9 +125,12 @@ let
112125 export GOCACHE=$TMPDIR/go-cache
113126 export GOPATH="$TMPDIR/go"
114127 export GOSUMDB=off
115− export GOPROXY=file://${go-modules}
116−
128+ export GOPROXY=off
117129 cd "$modRoot"
130+ if [ -n "${go-modules}" ]; then
131+ rm -rf vendor
132+ ln -s ${go-modules} vendor
133+ fi
118134
119135 runHook postConfigure
120136 '';
@@ -212,7 +228,7 @@ let
212228
213229 disallowedReferences = lib.optional (!allowGoReference) go;
214230
215− passthru = passthru // { inherit go go-modules modSha256; };
231+ passthru = passthru // { inherit go go-modules vendorSha256 ; };
216232
217233 meta = {
218234 # Add default meta information
@@ -225,5 +241,8 @@ let
225241 });
226242in if disabled then
227243 throw "${package.name} not supported for go ${go.meta.branch}"
244+else if modSha256 != null then
245+ lib.warn "modSha256 is deprecated and will be removed in the next release (20.09), use vendorSha256 instead" (
246+ import ./old.nix { inherit go cacert git lib removeReferencesTo stdenv; } args')
228247else
229248 package
pkgs/development/go-modules/generic/old.nixnew file+229
@@ -0,0 +1,229 @@
1+{ go, cacert, git, lib, removeReferencesTo, stdenv }:
2+
3+{ name ? "${args'.pname}-${args'.version}"
4+, src
5+, buildInputs ? []
6+, nativeBuildInputs ? []
7+, passthru ? {}
8+, patches ? []
9+
10+# A function to override the go-modules derivation
11+, overrideModAttrs ? (_oldAttrs : {})
12+
13+# path to go.mod and go.sum directory
14+, modRoot ? "./"
15+
16+# modSha256 is the sha256 of the vendored dependencies
17+#
18+# CAUTION: if `null` is used as a value, the derivation won't be a
19+# fixed-output derivation but disable the build sandbox instead. Don't use
20+# this in nixpkgs as Hydra won't build those packages.
21+, modSha256
22+
23+# We want parallel builds by default
24+, enableParallelBuilding ? true
25+
26+# Disabled flag
27+, disabled ? false
28+
29+# Do not enable this without good reason
30+# IE: programs coupled with the compiler
31+, allowGoReference ? false
32+
33+, meta ? {}
34+
35+, ... }@args':
36+
37+with builtins;
38+
39+let
40+ args = removeAttrs args' [ "overrideModAttrs" "modSha256" "disabled" ];
41+
42+ removeReferences = [ ] ++ lib.optional (!allowGoReference) go;
43+
44+ removeExpr = refs: ''remove-references-to ${lib.concatMapStrings (ref: " -t ${ref}") refs}'';
45+
46+ go-modules = go.stdenv.mkDerivation (let modArgs = {
47+ name = "${name}-go-modules";
48+
49+ nativeBuildInputs = [ go git cacert ];
50+
51+ inherit (args) src;
52+ inherit (go) GOOS GOARCH;
53+
54+ patches = args.patches or [];
55+
56+ GO111MODULE = "on";
57+
58+ impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [
59+ "GIT_PROXY_COMMAND" "SOCKS_SERVER"
60+ ];
61+
62+ configurePhase = args.modConfigurePhase or ''
63+ runHook preConfigure
64+
65+ export GOCACHE=$TMPDIR/go-cache
66+ export GOPATH="$TMPDIR/go"
67+ mkdir -p "''${GOPATH}/pkg/mod/cache/download"
68+ cd "${modRoot}"
69+ runHook postConfigure
70+ '';
71+
72+ buildPhase = args.modBuildPhase or ''
73+ runHook preBuild
74+
75+ go mod download
76+
77+ runHook postBuild
78+ '';
79+
80+ installPhase = args.modInstallPhase or ''
81+ runHook preInstall
82+
83+ # remove cached lookup results and tiles
84+ rm -rf "''${GOPATH}/pkg/mod/cache/download/sumdb"
85+ cp -r "''${GOPATH}/pkg/mod/cache/download" $out
86+
87+ runHook postInstall
88+ '';
89+
90+ dontFixup = true;
91+ }; in modArgs // (
92+ if modSha256 == null then
93+ { __noChroot = true; }
94+ else
95+ {
96+ outputHashMode = "recursive";
97+ outputHashAlgo = "sha256";
98+ outputHash = modSha256;
99+ }
100+ ) // overrideModAttrs modArgs);
101+
102+ package = go.stdenv.mkDerivation (args // {
103+ nativeBuildInputs = [ removeReferencesTo go ] ++ nativeBuildInputs;
104+
105+ inherit (go) GOOS GOARCH;
106+
107+ GO111MODULE = "on";
108+
109+ configurePhase = args.configurePhase or ''
110+ runHook preConfigure
111+
112+ export GOCACHE=$TMPDIR/go-cache
113+ export GOPATH="$TMPDIR/go"
114+ export GOSUMDB=off
115+ export GOPROXY=file://${go-modules}
116+
117+ cd "$modRoot"
118+
119+ runHook postConfigure
120+ '';
121+
122+ buildPhase = args.buildPhase or ''
123+ runHook preBuild
124+
125+ buildGoDir() {
126+ local d; local cmd;
127+ cmd="$1"
128+ d="$2"
129+ . $TMPDIR/buildFlagsArray
130+ echo "$d" | grep -q "\(/_\|examples\|Godeps\|testdata\)" && return 0
131+ [ -n "$excludedPackages" ] && echo "$d" | grep -q "$excludedPackages" && return 0
132+ local OUT
133+ if ! OUT="$(go $cmd $buildFlags "''${buildFlagsArray[@]}" -v -p $NIX_BUILD_CORES $d 2>&1)"; then
134+ if ! echo "$OUT" | grep -qE '(no( buildable| non-test)?|build constraints exclude all) Go (source )?files'; then
135+ echo "$OUT" >&2
136+ return 1
137+ fi
138+ fi
139+ if [ -n "$OUT" ]; then
140+ echo "$OUT" >&2
141+ fi
142+ return 0
143+ }
144+
145+ getGoDirs() {
146+ local type;
147+ type="$1"
148+ if [ -n "$subPackages" ]; then
149+ echo "$subPackages" | sed "s,\(^\| \),\1./,g"
150+ else
151+ find . -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort --unique
152+ fi
153+ }
154+
155+ if (( "''${NIX_DEBUG:-0}" >= 1 )); then
156+ buildFlagsArray+=(-x)
157+ fi
158+
159+ if [ ''${#buildFlagsArray[@]} -ne 0 ]; then
160+ declare -p buildFlagsArray > $TMPDIR/buildFlagsArray
161+ else
162+ touch $TMPDIR/buildFlagsArray
163+ fi
164+ if [ -z "$enableParallelBuilding" ]; then
165+ export NIX_BUILD_CORES=1
166+ fi
167+ for pkg in $(getGoDirs ""); do
168+ echo "Building subPackage $pkg"
169+ buildGoDir install "$pkg"
170+ done
171+ '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
172+ # normalize cross-compiled builds w.r.t. native builds
173+ (
174+ dir=$GOPATH/bin/${go.GOOS}_${go.GOARCH}
175+ if [[ -n "$(shopt -s nullglob; echo $dir/*)" ]]; then
176+ mv $dir/* $dir/..
177+ fi
178+ if [[ -d $dir ]]; then
179+ rmdir $dir
180+ fi
181+ )
182+ '' + ''
183+ runHook postBuild
184+ '';
185+
186+ doCheck = args.doCheck or false;
187+ checkPhase = args.checkPhase or ''
188+ runHook preCheck
189+
190+ for pkg in $(getGoDirs test); do
191+ buildGoDir test "$pkg"
192+ done
193+
194+ runHook postCheck
195+ '';
196+
197+ installPhase = args.installPhase or ''
198+ runHook preInstall
199+
200+ mkdir -p $out
201+ dir="$GOPATH/bin"
202+ [ -e "$dir" ] && cp -r $dir $out
203+
204+ runHook postInstall
205+ '';
206+
207+ preFixup = (args.preFixup or "") + ''
208+ find $out/bin -type f -exec ${removeExpr removeReferences} '{}' + || true
209+ '';
210+
211+ strictDeps = true;
212+
213+ disallowedReferences = lib.optional (!allowGoReference) go;
214+
215+ passthru = passthru // { inherit go go-modules modSha256; };
216+
217+ meta = {
218+ # Add default meta information
219+ platforms = go.meta.platforms or lib.platforms.all;
220+ } // meta // {
221+ # add an extra maintainer to every package
222+ maintainers = (meta.maintainers or []) ++
223+ [ lib.maintainers.kalbasit ];
224+ };
225+ });
226+in if disabled then
227+ throw "${package.name} not supported for go ${go.meta.branch}"
228+else
229+ package
pkgs/development/interpreters/joker/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1pxj6flyhf522zjab1dfvxfajyx3v3rzs7l8ma7ma6b8zmwp2wdn";
1212 };
1313
14− modSha256 = "165mjfjk4x95ckw7wg96bg9pzb3297sggnip38nz2jxxbqr0ff8b";
14+ vendorSha256 = "1rn8ijq3v3fzlbyvm7g4i3qpwcl3vrl4rbcvlbzv05wxrgcw9iqb";
1515
1616 preBuild = ''
1717 go generate ./...
@@ -26,4 +26,4 @@ buildGoModule rec {
2626 platforms = platforms.all;
2727 maintainers = with maintainers; [ andrestylianos ];
2828 };
29−}
29+}
pkgs/development/libraries/packr/default.nix+3−3
@@ -18,7 +18,7 @@ let p2 = buildGoModule rec {
1818
1919 subPackages = [ "packr2" ];
2020
21− modSha256 = "1xxqyn78074jna0iri7sks6b2l4sdnn5sg57n09vrrf6kh39h2y9";
21+ vendorSha256 = "12yq121b0bn8z12091fyqhhz421kgx4z1nskrkvbxlhyc47bwyrp";
2222
2323 meta = with stdenv.lib; {
2424 description = "The simple and easy way to embed static files into Go binaries";
@@ -40,7 +40,7 @@ p1 = buildGoModule rec {
4040
4141 subPackages = [ "packr" ];
4242
43− modSha256 = "045qfdi82yhpghjd0cimxhas4nkj7g30n9qyvkrl9ck01sahx76f";
43+ vendorSha256 = "0m3yj8ww4a16j56p8d8w0sdnyx0g2bkd8zg0l4d8vb72mvg5asga";
4444
4545 meta = with lib; {
4646 description = "The simple and easy way to embed static files into Go binaries";
@@ -53,4 +53,4 @@ in
5353symlinkJoin{
5454 name = "packr";
5555 paths = [p1 p2];
56−}
56+}
pkgs/development/libraries/protolock/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0qg26vcqdhgy91p6wiv16dq73ay0fymran3d8ylca9264zwi2vxw";
1212 };
1313
14− modSha256 = "1q755ipqsfpr41s5fxzmx50lwcdqc5a7akwx6mzn789w2z07x8lg";
14+ vendorSha256 = "0ap1iwcapvvvmwgdc4zbsp8mglrhbswkdgm4dw8baw8qk0nlci6y";
1515
1616 postInstall = ''
1717 rm $out/bin/plugin*
@@ -23,4 +23,4 @@ buildGoModule rec {
2323 license = licenses.bsd3;
2424 maintainers = with maintainers; [ groodt ];
2525 };
26−}
26+}
pkgs/development/tools/analysis/tflint/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0mdxs019vzpfxaqkw4nb79p3rydril0ihbn55n4yyh0fznv6zzxi";
1212 };
1313
14− modSha256 = "0ksblhra7ln4ryggr2x8fzl8a7ljz5zdjgdxz82c75wd7wdbw8f5";
14+ vendorSha256 = "0kjz9v7r7g4cg11w77ijfmvwnbbkrvrfwwsfsmyxrlhznmb3v0wi";
1515
1616 subPackages = [ "." ];
1717
@@ -22,4 +22,4 @@ buildGoModule rec {
2222 license = licenses.mpl20;
2323 maintainers = [ maintainers.marsam ];
2424 };
25−}
25+}
pkgs/development/tools/azcopy/default.nix+2−2
@@ -13,7 +13,7 @@ buildGoModule rec {
1313
1414 subPackages = [ "." ];
1515
16− modSha256 = "02c668bp1pfrd994lhg6z3hm1qg3530nk9aw1cahiwj549vxxfhm";
16+ vendorSha256 = "1276k2hpyr7bqp6hdi576xcdcd2c8vz100jpls663z7vb2rbpvxf";
1717
1818 postInstall = ''
1919 ln -rs "$out/bin/azure-storage-azcopy" "$out/bin/azcopy"
@@ -24,4 +24,4 @@ buildGoModule rec {
2424 license = licenses.mit;
2525 description = "The new Azure Storage data transfer utility - AzCopy v10";
2626 };
27−}
27+}
pkgs/development/tools/bazel-gazelle/default.nix+2−2
@@ -14,7 +14,7 @@ buildGoModule rec {
1414 sha256 = "1rw9zq8rmc0zr91kk70xl67dl6jx4dswwisv3bd1f16yncqgv2a1";
1515 };
1616
17− modSha256 = "0bfhy0ig8apxb5qzxjdj6q7jr2i6rdq0ffby0pha8viadah8v2rm";
17+ vendorSha256 = null;
1818
1919 subPackages = [ "cmd/gazelle" ];
2020
@@ -28,4 +28,4 @@ buildGoModule rec {
2828 license = licenses.asl20;
2929 maintainers = with maintainers; [ kalbasit ];
3030 };
31−}
31+}
pkgs/development/tools/bazelisk/default.nix+4−2
@@ -4,6 +4,8 @@ buildGoModule rec {
44 pname = "bazelisk";
55 version = "1.4.0";
66
7+ patches = [ ./gomod.patch ];
8+
79 src = fetchFromGitHub {
810 owner = "bazelbuild";
911 repo = pname;
@@ -11,7 +13,7 @@ buildGoModule rec {
1113 sha256 = "14zp0bi0p1rfbx1pxi5y28ndxwbqbvfx0pvy3jh1mnx5qsii1gcq";
1214 };
1315
14− modSha256 = "1w8k659ifapcxbbim0nf7wd7w10bhlagc33q08izh84gcgsh0yyz";
16+ vendorSha256 = "10156k90ky3znb9rxhy7zasskxmlcs5cn9f3xk25ana1c66vxszr";
1517
1618 buildFlagsArray = [ "-ldflags=-s -w -X main.BazeliskVersion=${version}" ];
1719
@@ -24,4 +26,4 @@ buildGoModule rec {
2426 license = licenses.asl20;
2527 maintainers = with maintainers; [ elasticdog ];
2628 };
27−}
29+}
pkgs/development/tools/bazelisk/gomod.patchnew file+12
@@ -0,0 +1,12 @@
1+diff --git a/go.mod b/go.mod
2+index 8eef134..54382cb 100644
3+--- a/go.mod
4++++ b/go.mod
5+@@ -3,6 +3,7 @@ module github.com/bazelbuild/bazelisk
6+ go 1.14
7+
8+ require (
9++ github.com/bazelbuild/rules_go v0.22.4
10+ github.com/hashicorp/go-version v1.2.0
11+ github.com/mitchellh/go-homedir v1.1.0
12+ )
pkgs/development/tools/build-managers/mage/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0lazf4r5ps1s04pvz608qaxbrbc6dv0j99n39iv42zwxxh0mbd0p";
1212 };
1313
14− modSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5";
14+ vendorSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5";
1515
1616 buildFlagsArray = [
1717 "-ldflags="
@@ -27,4 +27,4 @@ buildGoModule rec {
2727 maintainers = with maintainers; [ swdunlop ];
2828 platforms = platforms.all;
2929 };
30−}
30+}
pkgs/development/tools/conftest/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "15xzldcmnpfg1hd5zr5i7x2zjrgkwnp4nylxbn9kfic2dpjp1a38";
1212 };
1313
14− modSha256 = "0nwmxmh1pmism5r9zzghfrzizr1fbyc8d4jljrbzjjq1l449r2ja";
14+ vendorSha256 = "1kay7b5rxypj4i0d2iwdlb1mj0qq3zvlrjp34zzv5kywz5gy4144";
1515
1616 buildFlagsArray = ''
1717 -ldflags=
@@ -25,4 +25,4 @@ buildGoModule rec {
2525 maintainers = with maintainers; [ yurrriq ];
2626 platforms = platforms.all;
2727 };
28−}
28+}
pkgs/development/tools/continuous-integration/drone-cli/default.nix+2−2
@@ -7,7 +7,7 @@ in buildGoModule rec {
77 revision = "v${version}";
88 goPackagePath = "github.com/drone/drone-cli";
99
10− modSha256 = "0g0vq4vm2hy00r2gjsrhg57xv9sldlqix3wzimiqdli085bcz46b";
10+ vendorSha256 = "1zzx5yy0pp0c8pias4sfxfvdzhhrff9f8j51qf6dkif99xwdq3hb";
1111
1212 preBuild = ''
1313 buildFlagsArray+=("-ldflags" "-X main.version=${version}")
@@ -25,4 +25,4 @@ in buildGoModule rec {
2525 license = licenses.asl20;
2626 description = "Command line client for the Drone continuous integration server.";
2727 };
28−}
28+}
pkgs/development/tools/continuous-integration/drone/default.nix+2−2
@@ -5,7 +5,7 @@ buildGoModule rec {
55 version = "1.6.5";
66 goPackagePath = "github.com/drone/drone";
77
8− modSha256 = "1fyb9218s52w8c6c3v6rgivbyzy5hz4q4z8r75ng2yrmjmmiv2gr";
8+ vendorSha256 = "1dvf8vz3jr9smki3jql0kvd8z8rwdq93y7blbr2yjjfsdvx6lxl1";
99
1010 src = fetchFromGitHub {
1111 owner = "drone";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.asl20;
2020 description = "Continuous Integration platform built on container technology";
2121 };
22−}
22+}
pkgs/development/tools/continuous-integration/fly/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0chavwymyh5kv4fkvdjvf3p5jjx4yn9aavq66333xnsl5pn7q9dq";
1212 };
1313
14− modSha256 = "1wiyfii4rmj3rp8ls0ill0sjpnpjz7l3q5fzrscm8ap1qn90gvzg";
14+ vendorSha256 = "127mc1wzqhn0l4ni6qxcx06qfdb1cgahzypjrs4vgr6i4sipjxck";
1515
1616 subPackages = [ "fly" ];
1717
@@ -34,4 +34,4 @@ buildGoModule rec {
3434 license = licenses.asl20;
3535 maintainers = with maintainers; [ ivanbrennan ];
3636 };
37−}
37+}
pkgs/development/tools/cue/default.nix+2−2
@@ -10,7 +10,7 @@ buildGoModule rec {
1010 sha256 = "1qbnm3qb8jz9bljw2gb5bb9g41s5lbq4xvcaj3zgi4fc3708hlji";
1111 };
1212
13− modSha256 = "0n9idgishlp4gaq12kngi42rq9rnkas7g6cj7jpkk8p30c74ki6z";
13+ vendorSha256 = "12w2rxp0s3i1ck0qvp2dkg9kk6pyymycdfnfxggcyg4fjshh8afg";
1414
1515 subPackages = [ "cmd/cue" ];
1616
@@ -24,4 +24,4 @@ buildGoModule rec {
2424 maintainers = with stdenv.lib.maintainers; [ solson ];
2525 license = stdenv.lib.licenses.asl20;
2626 };
27−}
27+}
pkgs/development/tools/database/dbmate/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "16grd03r41n0vj5fs7j6jk395zs2q0i878p9nh1ycicy64nzmxky";
1212 };
1313
14− modSha256 = "1ky6cxpmw93nrk26vyrxz8kqa7247axzaxilm6ciypxf30ad0vdq";
14+ vendorSha256 = "1915h1hi2y2sx5jvx84c1j281zaz100gbhyalvg5jqjr1van5s4d";
1515
1616 meta = with stdenv.lib; {
1717 description = "Database migration tool";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 maintainers = [ maintainers.manveru ];
2121 platforms = platforms.unix;
2222 };
23−}
23+}
pkgs/development/tools/dive/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1v69xbkjmyzm5g4wi9amjk65fs4qgxkqc0dvq55vqjigzrranp22";
1212 };
1313
14− modSha256 = "1y8mqxlzbizra2m9aayp6w07s39gddvm5igdaw9kwxwjwvd1dbfc";
14+ vendorSha256 = "0219q9zjc0i6fbdngqh0wjpmq8wj5bjiz5dls0c1aam0lh4vwkhc";
1515
1616 nativeBuildInputs = [ pkg-config ];
1717
@@ -25,4 +25,4 @@ buildGoModule rec {
2525 license = licenses.mit;
2626 maintainers = with maintainers; [ marsam spacekookie ];
2727 };
28−}
28+}
pkgs/development/tools/go-protobuf/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1k1wb4zr0qbwgpvz9q5ws9zhlal8hq7dmq62pwxxriksayl6hzym";
1212 };
1313
14− modSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5";
14+ vendorSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5";
1515
1616 meta = with stdenv.lib; {
1717 homepage = "https://github.com/golang/protobuf";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 license = licenses.bsd3;
2121 platforms = platforms.unix;
2222 };
23−}
23+}
pkgs/development/tools/go-tools/default.nix+2−2
@@ -16,7 +16,7 @@ buildGoModule rec {
1616 sha256 = "0pvi1mzhy6zgx4zfgdypbl4zhvgg11hl5qv7blf2qs0a96j2djhf";
1717 };
1818
19− modSha256 = "03560xjr2531xj87paskfx2zs364fz6y4kpsid8x08s1syq9nq7p";
19+ vendorSha256 = "0nbbngsphklzhcmqafrw1im2l1vnfcma9sb4vskdpdrsadv5ss5r";
2020
2121 meta = with lib; {
2222 description = "A collection of tools and libraries for working with Go code, including linters and static analysis";
@@ -24,4 +24,4 @@ buildGoModule rec {
2424 license = licenses.mit;
2525 maintainers = with maintainers; [ rvolosatovs kalbasit ];
2626 };
27−}
27+}
pkgs/development/tools/godef/default.nix+2−2
@@ -8,7 +8,7 @@ buildGoModule rec {
88 goPackagePath = "github.com/rogpeppe/godef";
99 subPackages = [ "." ];
1010
11− modSha256 = "06mi8f2qs54gk2anxqcf70h96s63a99xhnlm294djyv37wy1yffi";
11+ vendorSha256 = null;
1212
1313 src = fetchFromGitHub {
1414 inherit rev;
@@ -23,4 +23,4 @@ buildGoModule rec {
2323 maintainers = with stdenv.lib.maintainers; [ vdemeester rvolosatovs ];
2424 license = stdenv.lib.licenses.bsd3;
2525 };
26−}
26+}
pkgs/development/tools/gofumpt/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1cw9mmavxz8gxzzwsllvf5lwb2wwi19jbc7hcwxsi4ywp7a84gh0";
1212 };
1313
14− modSha256 = "1ladpxhr90awnms2qmlm2lz91wyh92fl3rqbfr54qngrkpkpbhr2";
14+ vendorSha256 = "14a3p163xy861xb6x160wy15hzjc75n36jdyzaxl877i17shba8z";
1515
1616 meta = with lib; {
1717 description = "A stricter gofmt";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.bsd3;
2020 maintainers = with maintainers; [ rvolosatovs ];
2121 };
22−}
22+}
pkgs/development/tools/gogetdoc/default.nix+2−2
@@ -8,7 +8,7 @@ buildGoModule rec {
88 version = "2019-02-28";
99 rev = "b37376c5da6aeb900611837098f40f81972e63e4";
1010
11− modSha256 = "0j6a2b8hx54cnjz1ya65v9czg9ygqj6zwg52ffpz7cqkx0pgl9q4";
11+ vendorSha256 = null;
1212
1313 goPackagePath = "github.com/zmb3/gogetdoc";
1414 excludedPackages = "\\(testdata\\)";
@@ -30,4 +30,4 @@ buildGoModule rec {
3030 maintainers = with maintainers; [ kalbasit ];
3131 platforms = platforms.linux ++ platforms.darwin;
3232 };
33−}
33+}
pkgs/development/tools/golangci-lint/default.nix+1−1
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1capiw8af4wmx3wpfslb30xivfyh72x5kj12f8p5pwhl6id31931";
1212 };
1313
14− modSha256 = "0adsy71hl6256v40b5gb00kmqswbgfb1576m6lwak1fcfi07hf6b";
14+ vendorSha256 = "16wr8ixicbvdpg5mg6q07sa1b03ydpwdbvbjl3r9qihdqkhhzlr1";
1515 subPackages = [ "cmd/golangci-lint" ];
1616
1717 meta = with lib; {
pkgs/development/tools/gomodifytags/default.nix+2−2
@@ -4,7 +4,7 @@ buildGoModule rec {
44 pname = "gomodifytags";
55 version = "1.4.0";
66
7− modSha256 = "0nkdk2zgnwsg9lv20vqk2lshk4g9fqwqxd5bpr78nlahb9xk486s";
7+ vendorSha256 = null;
88
99 goPackagePath = "github.com/fatih/gomodifytags";
1010
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 maintainers = with stdenv.lib.maintainers; [ vdemeester ];
2222 license = stdenv.lib.licenses.bsd3;
2323 };
24−}
24+}
pkgs/development/tools/gopkgs/default.nix+2−2
@@ -15,7 +15,7 @@ buildGoModule rec {
1515 sha256 = "1jak1bg6k5iasscw68ra875k59k3iqhka2ykabsd427k1j3mypln";
1616 };
1717
18− modSha256 = "0v9lg5kq3776b2s4kgyi19jy8shjqrr0f5ljrchsj1k7867sxiw7";
18+ vendorSha256 = "1pwsc488ldw039by8nqpni801zry7dnf0rx4hhd73xpv2w7s8n2r";
1919
2020 meta = {
2121 description = "Tool to get list available Go packages.";
@@ -23,4 +23,4 @@ buildGoModule rec {
2323 maintainers = with stdenv.lib.maintainers; [ vdemeester ];
2424 license = stdenv.lib.licenses.mit;
2525 };
26−}
26+}
pkgs/development/tools/gopls/default.nix+2−2
@@ -12,7 +12,7 @@ buildGoModule rec {
1212 };
1313
1414 modRoot = "gopls";
15− modSha256 = "1p0g28i707xyxz1g6hb56qlc4km9ik7vjky0v80hw7n73vzs5mr9";
15+ vendorSha256 = "1zj0zpyl9wq23vks426vqg5xjwjcaj1079rkc67489h0p7y0aqv5";
1616
1717 meta = with stdenv.lib; {
1818 description = "Official language server for the Go language";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 license = licenses.bsd3;
2121 maintainers = with maintainers; [ mic92 ];
2222 };
23−}
23+}
pkgs/development/tools/gotestsum/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0zifha3mj7386q2accrdmd8qniingadxz1v8vg4mciwi723msr44";
1212 };
1313
14− modSha256 = "10zkk4zqla5yqs5sq2qc7x1vhadfyd1l7s29xyjmg4grs8iimk2j";
14+ vendorSha256 = "0d45i8wm35m2cdbk48razkdr49a3hfwnp84inlz7hj054cq6vimi";
1515
1616 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
1717
@@ -22,4 +22,4 @@ buildGoModule rec {
2222 license = licenses.asl20;
2323 maintainers = with maintainers; [ endocrimes ];
2424 };
25−}
25+}
pkgs/development/tools/gotools/default.nix+2−2
@@ -21,7 +21,7 @@ buildGoModule rec {
2121 rm -rf gopls
2222 '';
2323
24− modSha256 = "1pijbkp7a9n2naicg21ydii6xc0g4jm5bw42lljwaks7211ag8k9";
24+ vendorSha256 = "0pplmqxrnc8qnr5708igx4dm7rb0hicvhg6lh5hj8zkx38nb19s0";
2525
2626 postConfigure = ''
2727 # Make the builtin tools available here
@@ -47,4 +47,4 @@ buildGoModule rec {
4747 # Do not copy this without a good reason for enabling
4848 # In this case tools is heavily coupled with go itself and embeds paths.
4949 allowGoReference = true;
50−}
50+}
pkgs/development/tools/hcloud/default.nix+2−2
@@ -13,7 +13,7 @@ buildGoModule rec {
1313 sha256 = "0cxh92df8gdl4bmr22pdvdxdkdjyfy0jv48y0k6awy1xz61r94ap";
1414 };
1515
16− modSha256 = "1sdp62q4rnx7dp4i0dhnc8kzi8h6zzjdy7ym0mk9r7xkxxx0s3ds";
16+ vendorSha256 = "1iiqmdnjnrsqgjisb5j5casa2hmqmafn79157skl5zxawndvc2rj";
1717
1818 buildFlagsArray = [ "-ldflags=" "-w -X github.com/hetznercloud/cli/cli.Version=${version}" ];
1919
@@ -37,4 +37,4 @@ buildGoModule rec {
3737 platforms = stdenv.lib.platforms.all;
3838 maintainers = [ stdenv.lib.maintainers.zauberpony ];
3939 };
40−}
40+}
pkgs/development/tools/kcli/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0whijr2r2j5bvfy8jgmpxsa0zvwk5kfjlpnkw4za5k35q7bjffls";
1212 };
1313
14− modSha256 = "1wcqh3306q9wxb6pnl8cpk73vmy36bjv2gil03j7j4pajs1f2lwn";
14+ vendorSha256 = "0whqrms5mc7v14p2h1jfvkawm30xaylivijlsghrsaq468qcgg15";
1515
1616 subPackages = [ "." ];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = licenses.mit;
2222 maintainers = with maintainers; [ cswank ];
2323 };
24−}
24+}
pkgs/development/tools/kind/default.nix+1−1
@@ -13,7 +13,7 @@ buildGoModule rec {
1313 sha256 = "0r301nqvycik8fwlghq0cymmq4rm7xp8haj39i2nynxyw8zk6zym";
1414 };
1515
16− modSha256 = "1vfdyd4yj79f2n0w98k9h4sklxwg49ajlp1blvpslbzmpfkmcjsz";
16+ vendorSha256 = "1qvbm8v8yah6r6cw1cvdw79yiwxb2amzdkkzvzbwigy0j4bvn9mi";
1717 goPackagePath = "sigs.k8s.io/kind";
1818 subPackages = [ "." ];
1919
pkgs/development/tools/kubeprompt/default.nix+2−2
@@ -19,7 +19,7 @@ buildGoModule rec {
1919 '';
2020
2121 goPackagePath = "github.com/jlesquembre/kubeprompt";
22− modSha256 = "0rbpdk2dixywn3wcdgz48f3xw3b7fk8xh7mrlx27wz7fq5wj9v8f";
22+ vendorSha256 = "089lfkvyf00f05kkmr935jbrddf2c0v7m2356whqnz7ad6a2whsi";
2323
2424 meta = with stdenv.lib; {
2525 description = "Kubernetes prompt";
@@ -28,4 +28,4 @@ buildGoModule rec {
2828 maintainers = with maintainers; [ jlesquembre ];
2929 platforms = platforms.all;
3030 };
31−}
31+}
pkgs/development/tools/kustomize/default.nix+2−2
@@ -23,7 +23,7 @@ buildGoModule rec {
2323 # avoid finding test and development commands
2424 sourceRoot = "source/kustomize";
2525
26− modSha256 = "1bas6al14ck0d2ccb4235426a5hldqsm0nf8vi76chz4nahzb71g";
26+ vendorSha256 = "06mf5zvxn10g5rqjpqv3afvhj9xmijbj8ag8pqcg1996s4rp4p7a";
2727
2828 meta = with lib; {
2929 description = "Customization of kubernetes YAML configurations";
@@ -36,4 +36,4 @@ buildGoModule rec {
3636 license = licenses.asl20;
3737 maintainers = with maintainers; [ carlosdagos vdemeester periklis zaninime ];
3838 };
39−}
39+}
pkgs/development/tools/misc/act/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "14ird8z8f467spa0kdzjf6lq7pipq7rwxrdk6ppv7y1fxw96qm9x";
1212 };
1313
14− modSha256 = "09q8dh4g4k0y7mrhwyi9py7zdiipmq91j3f32cn635v2xw6zyg2k";
14+ vendorSha256 = "0ns20vvrj0j921wsx227dxbpga6kll7pxglfqhl53xckrh85yyd8";
1515
1616 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = licenses.mit;
2222 maintainers = with maintainers; [ filalex77 ];
2323 };
24−}
24+}
pkgs/development/tools/misc/circleci-cli/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0md6y2rnzhkpxc2pm3c46jrhwicrswy9qlr6a4mmvpjq1imj1hjq";
1212 };
1313
14− modSha256 = "169d0mm52l6w6jln5ak6zkh97q65m9jpg3bm8qll6sfrmrnfncfi";
14+ vendorSha256 = "0y35ps2pw9z7gi4z50byd1py87bf2jdvj7l7w2gxpppmhi83myc9";
1515
1616 buildFlagsArray = [ "-ldflags=-s -w -X github.com/CircleCI-Public/circleci-cli/version.Version=${version}" ];
1717
@@ -34,4 +34,4 @@ buildGoModule rec {
3434 license = licenses.mit;
3535 homepage = "https://circleci.com/";
3636 };
37−}
37+}
pkgs/development/tools/misc/editorconfig-checker/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1gn7q6wg7byhr1l5ly60rbb700xrww9slbq7gbxbw5c1fl0pp3yk";
1212 };
1313
14− modSha256 = "1iiv12ginb3ky739z7v8wf4z5lv24gmghbybs3lzay0kqn449n4x";
14+ vendorSha256 = "1w5hsdmi95v7qj3fc4jkjapw8cnh41f09wbbzcfmfmvygrii7z16";
1515
1616 meta = with lib; {
1717 description = "A tool to verify that your files are in harmony with your .editorconfig";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.mit;
2020 maintainers = with maintainers; [ uri-canva ];
2121 };
22−}
22+}
pkgs/development/tools/misc/go-license-detector/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0ln1z3y9q5igf9djkxw05ql2hb1ijcvvz0mrbwz11cdv9xrsa4z4";
1212 };
1313
14− modSha256 = "163f1kiy7kqrnaazb8ydaaiz57lv30jyjkvv6i7pczvcg9yfhmdb";
14+ vendorSha256 = "0gan5l7vsq0hixxcymhhs8p07v92w60r0lhgvrr9a99nic12vmia";
1515
1616 meta = with lib; {
1717 description = "Reliable project licenses detector";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.asl20;
2020 maintainers = with maintainers; [ dtzWill ];
2121 };
22−}
22+}
pkgs/development/tools/misc/mkcert/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0w1ji96hbd3anzsz82xjcafsqhgyz7c7n41rsq60yrllwbj5946f";
1212 };
1313
14− modSha256 = "13a3snhcqq3a9lfy9zfr2rx10mf2ymvhmds1bg8n4m7lbwnzm4fg";
14+ vendorSha256 = "0b8ggdpbyxx5n2myhchhlwmm5nndwpykp1ylnzdyw12mdskfvn9h";
1515
1616 goPackagePath = "github.com/FiloSottile/mkcert";
1717 buildFlagsArray = ''
@@ -25,4 +25,4 @@ buildGoModule rec {
2525 license = licenses.bsd3;
2626 maintainers = [ maintainers.marsam ];
2727 };
28−}
28+}
pkgs/development/tools/misc/reviewdog/default.nix+1−1
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1ag55n3gfwcp6v8v3hha8bdqxw9r4bmz97p00vyqla9gjzn5ka9w";
1212 };
1313
14− modSha256 = "0x9bcszk9hd7vwg9lnlg4vqv4r9vx8x91j3ghijbr1jmqxhgjb9a";
14+ vendorSha256 = "0lann22hjdcrwyab76hinvbbmg3rf7y3knrxlfg0164gl3y5xb5g";
1515
1616 subPackages = [ "cmd/reviewdog" ];
1717
pkgs/development/tools/misc/terracognita/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0ib0p361sxh2qzxccg32pcml4by4mk45abhljwmljwybs34wh5rh";
1212 };
1313
14− modSha256 = "1cbhm3jwv0z9fh1q8mva56nbsp9rfyjcs03yxrc8ffkvif0gapps";
14+ vendorSha256 = "0q772i49nyxzs51jrh45n14ljh7qj5wygkn2x32pxi6ykw6la4x8";
1515
1616 subPackages = [ "." ];
1717
@@ -23,4 +23,4 @@ buildGoModule rec {
2323 license = licenses.mit;
2424 maintainers = [ maintainers.marsam ];
2525 };
26−}
26+}
pkgs/development/tools/mod/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1n0pipbq4fjban8hsxhyl5w8xrl4ai1pvgd02i1j1awmm2l3ykzl";
1212 };
1313
14− modSha256 = "1nl7d00prw1663xrl1nvj1xbs7wzkbqn75i92al821pz12dybdif";
14+ vendorSha256 = "032s62rjjq7bqiz5fg17yfkq4j4dsbl6vhvs1wf2sg8jvbqmvdwn";
1515
1616 subPackages = [ "cmd/mod" ];
1717
@@ -26,4 +26,4 @@ buildGoModule rec {
2626 maintainers = with maintainers; [ kalbasit ];
2727 platforms = platforms.linux ++ platforms.darwin;
2828 };
29−}
29+}
pkgs/development/tools/packet-cli/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "17f3ax7pjm5k93cxj7fd8hwr4id1lbzz9pkl2xflpxydi89bwdfz";
1212 };
1313
14− modSha256 = "1hyv1vxk1rsr3jq3b08q0487sqf3y0km3mlwvqivib1y6hrknnnr";
14+ vendorSha256 = "10praxaiscxq4v3zknrabldxl7rpklkr5wdlwa5lxsx0if8mrvp7";
1515
1616 meta = with stdenv.lib; {
1717 description = "Official Packet CLI";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 maintainers = with maintainers; [ filalex77 ];
2121 platforms = platforms.all;
2222 };
23−}
23+}
pkgs/development/tools/pet/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1na3az7vicjq1rxd3ybid47yrblsdazgli0dchkbwh8zchwhqj33";
1212 };
1313
14− modSha256 = "06ham8lsx5c1vk5jkwp1aa9g4q4g7sfq7gxz2gkffa98x2vlawyf";
14+ vendorSha256 = "0pnd89iqdj3f719xf4iy5r04n51d0rrrf0qb2zjirpw7vh7g82i9";
1515
1616 subPackages = [ "." ];
1717
@@ -22,4 +22,4 @@ buildGoModule rec {
2222 maintainers = with maintainers; [ kalbasit ];
2323 platforms = platforms.linux ++ platforms.darwin;
2424 };
25−}
25+}
pkgs/development/tools/proto-contrib/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0ksxic7cypv9gg8q5lkl5bla1n9i65z7b03cx9lwq6252glmf2jk";
1212 };
1313
14− modSha256 = "19cqz13jd95d5vibd10420gg69ldgf6afc51mkglhafgmmif56b0";
14+ vendorSha256 = "1ivvq5ch9grdrwqq29flv9821kyb16k0cj6wgj5v0dyn63w420aw";
1515
1616 meta = with lib; {
1717 description = "Contributed tools and other packages on top of the Go proto package";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 maintainers = with maintainers; [ kalbasit ];
2121 platforms = platforms.linux ++ platforms.darwin;
2222 };
23−}
23+}
pkgs/development/tools/protoc-gen-doc/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule {
1111 sha256 = "004axh2gqc4f115mdxxg59d19hph3rr0bq9d08n3nyl315f590kj";
1212 };
1313
14− modSha256 = "1952ycdkgl00q2s3qmhislhhim15nn6nmlkwbfdvrsfzznqj47rd";
14+ vendorSha256 = "17qdpsff8jk7ks5v6ix1rb966x3yvq03vk5bs2zbnxfdra7bv3n6";
1515
1616 meta = with lib; {
1717 description = "Documentation generator plugin for Google Protocol Buffers";
@@ -27,4 +27,4 @@ buildGoModule {
2727 license = licenses.mit;
2828 maintainers = with maintainers; [ kalbasit ];
2929 };
30−}
30+}
pkgs/development/tools/prototool/default.nix+2−2
@@ -13,7 +13,7 @@ buildGoModule rec {
1313
1414 nativeBuildInputs = [ makeWrapper ];
1515
16− modSha256 = "1gc8kc9mbi3mlh48zx4lcgpsrf8z879f1qj9wfyr66s7wd1ljazg";
16+ vendorSha256 = "19wza3vkkda44cng8m6f9y7qpzrgk2adyjmcafk17v4773rxlncf";
1717
1818 postInstall = ''
1919 wrapProgram "$out/bin/prototool" \
@@ -30,4 +30,4 @@ buildGoModule rec {
3030 license = licenses.mit;
3131 platforms = platforms.unix;
3232 };
33−}
33+}
pkgs/development/tools/reftools/default.nix+2−2
@@ -8,7 +8,7 @@ buildGoModule rec {
88 version = "2019-12-21";
99 rev = "65925cf013156409e591f7a1be4df96f640d02f4";
1010
11− modSha256 = "1sihahgkcj018ixbnz58npfh4drhqip2xmc9p7lq3an8japb9nyx";
11+ vendorSha256 = null;
1212
1313 goPackagePath = "github.com/davidrjenni/reftools";
1414 excludedPackages = "\\(cmd/fillswitch/test-fixtures\\)";
@@ -28,4 +28,4 @@ buildGoModule rec {
2828 maintainers = with maintainers; [ kalbasit ];
2929 platforms = platforms.linux ++ platforms.darwin;
3030 };
31−}
31+}
pkgs/development/tools/renderizer/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1bip12pcn8bqgph7vd7bzzadwbyqh80fx7gqciv9fchycwsj04rf";
1212 };
1313
14− modSha256 = "0ss5l2n1sl1i2hvxsdzy6p61mnnxmm6h256jvv0p0ajynx8g538q";
14+ vendorSha256 = "13z357ww4j5bmmy8ag6d6gd5b2dib8kby73q8317pqnqzaxrrbcj";
1515
1616 meta = with stdenv.lib; {
1717 description = "CLI to render Go template text files";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.gpl3;
2020 maintainers = with maintainers; [ yurrriq ];
2121 };
22−}
22+}
pkgs/development/tools/richgo/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "07ipa54c4mzm6yizgvkm6x5yim1xgv3f0xdxg35qziacdfcwd6m4";
1212 };
1313
14− modSha256 = "12wbjfqy6qnapm3f2pz1ci1gvc0y8kzr8c99kihyh1jv9r3zy1wz";
14+ vendorSha256 = "1nvk3akjwfcbvif1w4cglsqplcajlwq3mnvk9b75nmn9qaqfbfjf";
1515
1616 subPackages = [ "." ];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = licenses.mit;
2222 maintainers = with maintainers; [ rvolosatovs ];
2323 };
24−}
24+}
pkgs/development/tools/run/default.nix+2−2
@@ -10,7 +10,7 @@ buildGoModule rec {
1010 sha256 = "0q9f8lzrzybdablqph5wihqhfbfzb3bbnnxvhy7g5ccg1kzy7mgp";
1111 };
1212
13− modSha256 = "0s2lw9q5jskj41jqr8bv5w45pkrp2s0yfd2hgjgsd0q4ifm07k7s";
13+ vendorSha256 = "1g5rmiiwqpm8gky9yr5f2a7zsjjmm9i12r7yxj9cz7y3rmw9sw8c";
1414
1515 meta = with stdenv.lib; {
1616 description = "Easily manage and invoke small scripts and wrappers";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 maintainers = with maintainers; [ rawkode filalex77 ];
2020 platforms = platforms.unix;
2121 };
22−}
22+}
pkgs/development/tools/yq-go/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1jll5nmskvs61031h3sizhv3scv8znrr9apyc4qlxcp4jiv7xpmp";
1212 };
1313
14− modSha256 = "1m7sha6kwis1a00il1iigb9lxxh5m2myj9ps20s816m0b9bhd43v";
14+ vendorSha256 = "0rlvbyhl53x1bhwr7f7zs4swa580saak19z3d3g58srq3jyw6zlc";
1515
1616 meta = with lib; {
1717 description = "Portable command-line YAML processor";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = [ licenses.mit ];
2020 maintainers = [ maintainers.lewo ];
2121 };
22−}
22+}
pkgs/development/web/flyctl/default.nix+2−3
@@ -20,7 +20,7 @@ buildGoModule rec {
2020 rm $out/bin/helpgen
2121 '';
2222
23− modSha256 = "0d0hfmdk81apha3r7zspam8wqadpy6qmqkgbq0sbiwrji4155hrh";
23+ vendorSha256 = "10wcyxzkwvbhf86dq1rh852zgdg28draay0515zp459z34vv4zna";
2424
2525 meta = with lib; {
2626 description = "Command line tools for fly.io services";
@@ -28,5 +28,4 @@ buildGoModule rec {
2828 license = licenses.asl20;
2929 maintainers = with maintainers; [ aaronjanse ];
3030 };
31−}
32−
31+}
pkgs/development/web/minify/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "12jns7m9liyjg9wy8ynvji2d2g4k2z1ymp6k3610mivmvg159sy4";
1212 };
1313
14− modSha256 = "09jk3mxf7n9wf1cgyiw9mhsr55fb12k399dmzhnib3vhd9xav15i";
14+ vendorSha256 = "120d3nzk8cr5496cxp5p6ydlzw9mmpg7dllqhv1kpgwlbxmd8vr3";
1515
1616 buildFlagsArray = [ "-ldflags=-s -w -X main.Version=${version}" ];
1717
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 license = licenses.mit;
2121 homepage = "https://go.tacodewolff.nl/minify";
2222 };
23−}
23+}
pkgs/os-specific/darwin/smimesign/default.nix+1−1
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0higcg2rdz02c0n50vigg7w7bxc7wlmg1x2ygrbh3iwms5lc74vi";
1212 };
1313
14− modSha256 = "1k3gnjzblfk14y19zhlvwysx045nbw0xr5nngh7zj1wcqxhhm206";
14+ vendorSha256 = "00000000000000000hlvwysx045nbw0xr5nngh7zj1wcqxhhm206";
1515
1616 buildFlagsArray = "-ldflags=-X main.versionString=${version}";
1717
pkgs/os-specific/linux/fscrypt/default.nix+2−2
@@ -19,7 +19,7 @@ buildGoModule rec {
1919 --replace "/usr/local" "$out"
2020 '';
2121
22− modSha256 = "110b647q6ljsg5gwlciqv4cddxmk332nahcrpidrpsiqs2yjv1md";
22+ vendorSha256 = "0yak221mlyfacvlsaq9g3xiyk94n94vqgkbaji8d21pi8hhr38m6";
2323
2424 nativeBuildInputs = [ gnum4 ];
2525 buildInputs = [ pam ];
@@ -50,4 +50,4 @@ buildGoModule rec {
5050 platforms = platforms.linux;
5151 maintainers = with maintainers; [ primeos ];
5252 };
53−}
53+}
pkgs/servers/blockbook/default.nix+15−1
@@ -24,7 +24,7 @@ buildGoModule rec {
2424 sha256 = "01nb4if2dix2h95xvqvafil325jjw2a4v1izb9mad0cjqcf8rk6n";
2525 };
2626
27− modSha256 = "1zp06mpkxaxykw8pr679fg9dd7039qj13j5lknxp7hr8dga0jvpy";
27+ vendorSha256 = "1qjlvhizl8cy06cgf4phia70bgbm4lj57z5z2gyr8aglx98bnpdn";
2828
2929 buildInputs = [ bzip2 zlib snappy zeromq lz4 ];
3030
@@ -37,6 +37,20 @@ buildGoModule rec {
3737 -X github.com/trezor/blockbook/common.buildDate=unknown
3838 '';
3939
40+ goethereum = fetchFromGitHub {
41+ owner = "ethereum";
42+ repo = "go-ethereum";
43+ rev = "v1.8.20";
44+ sha256 = "0m2q1nz6f39pyr2rk6vflkwi4ykganzwr7wndpwr9rliw0x8jgi0";
45+ };
46+
47+ overrideModAttrs = (_: {
48+ postBuild = ''
49+ rm -r vendor/github.com/ethereum/go-ethereum
50+ cp -r --reflink=auto ${goethereum} vendor/github.com/ethereum/go-ethereum
51+ '';
52+ });
53+
4054 preBuild = lib.optionalString stdenv.isDarwin ''
4155 ulimit -n 8192
4256 '' + ''
pkgs/servers/caddy/default.nix+2−2
@@ -14,7 +14,7 @@ buildGoModule rec {
1414 rev = "v${version}";
1515 sha256 = "0jrhwmr6gggppskg5h450wybzkv17iq69dgw36hd1dp56q002i7g";
1616 };
17− modSha256 = "1gc0xvsihr4zp7hkrdfrplvzkaphz1y4q53rgwn2jhd8s98l57an";
17+ vendorSha256 = "09vnci9pp8zp7bvn8zj68wslz2nc54nhcd0ll31sqfjbp00215mj";
1818
1919 preBuild = ''
2020 cat << EOF > caddy/main.go
@@ -33,4 +33,4 @@ buildGoModule rec {
3333 license = licenses.asl20;
3434 maintainers = with maintainers; [ rushmorem fpletz zimbatm filalex77 ];
3535 };
36−}
36+}
pkgs/servers/caddy/v2.nix+1−2
@@ -12,8 +12,7 @@ buildGoModule rec {
1212 rev = "v${version}";
1313 sha256 = "1c1frfx0qkprhf4var70cncvrw8s9gjag2hygndbd9055hb52bvv";
1414 };
15−
16− modSha256 = "19sxyvfq1bpg85w8cd1yk2s6rd8759cf2zqs5b6wyny4cak2bl83";
15+ vendorSha256 = "004hpjxpp18f71vy5v5ky0g07a8d5xh5qwl5b4bbx34hpf8yxs81";
1716
1817 meta = with stdenv.lib; {
1918 homepage = "https://caddyserver.com";
pkgs/servers/consul/default.nix+2−1
@@ -26,7 +26,8 @@ buildGoModule rec {
2626 # has a split module structure in one repo
2727 subPackages = ["." "connect/certgen"];
2828
29− modSha256 = "01vyamfy9lcljzy99jmr48x0ypb12wab66n9kmj71mrvl50v8rzr";
29+ vendorSha256 = "1lcpldkssbq6qkkq22bvx9jb5klcxr8422mpx47wz39pry8vy9b6";
30+ deleteVendor = true;
3031
3132 preBuild = ''
3233 buildFlagsArray+=("-ldflags"
pkgs/servers/dns/coredns/default.nix+2−2
@@ -13,7 +13,7 @@ buildGoModule rec {
1313 sha256 = "18c02ss0sxxg8lkhdmyaac2x5alfxsizf6jqhck8bqkf6hiyv5hc";
1414 };
1515
16− modSha256 = "07mlprwa37s6qpg5wvpljbvkiqcvrcljr27qsdwz49wldhdp6im6";
16+ vendorSha256 = "0ykhqsz4a7bkkxcg7w23jl3qs36law1f8l1b5r3i26qlamibqxl7";
1717
1818 meta = with stdenv.lib; {
1919 homepage = "https://coredns.io";
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = licenses.asl20;
2222 maintainers = with maintainers; [ rushmorem rtreffer deltaevo ];
2323 };
24−}
24+}
pkgs/servers/documize-community/default.nix+10−5
@@ -4,6 +4,8 @@ buildGoModule rec {
44 pname = "documize-community";
55 version = "3.7.0";
66
7+ patches = [ ./vendor.patch ];
8+
79 src = fetchFromGitHub {
810 owner = "documize";
911 repo = "community";
@@ -11,18 +13,21 @@ buildGoModule rec {
1113 sha256 = "1pcldf9lqvpb2h2a3kr3mahj2v1jasjwrszj6czjmkyml7x2sz7c";
1214 };
1315
14− modSha256 = "1z0v7n8klaxcqv7mvzf3jzgrp78zb4yiibx899ppk6i5qnj4xiv0";
16+ vendorSha256 = null;
1517
1618 nativeBuildInputs = [ go-bindata go-bindata-assetfs ];
1719
18− subPackages = [ "edition/community.go" ];
20+ # This is really weird, but they've managed to screw up
21+ # their folder structure enough, you can only build by
22+ # literally cding into this folder.
23+ preBuild = "cd edition";
24+
25+ subPackages = [ "." ];
1926
2027 passthru.tests = { inherit (nixosTests) documize; };
2128
2229 postInstall = ''
23− # `buildGoModule` calls `go install` (without `go build` first), so
24− # `-o bin/documize` doesn't work.
25− mv $out/bin/community $out/bin/documize
30+ mv $out/bin/edition $out/bin/documize
2631 '';
2732
2833 meta = with lib; {
pkgs/servers/documize-community/vendor.patchnew file+2392
@@ -0,0 +1,2392 @@
1+diff --git a/vendor/github.com/microcosm-cc/bluemonday/.coveralls.yml b/vendor/github.com/microcosm-cc/bluemonday/.coveralls.yml
2+new file mode 100644
3+index 00000000..e0c87602
4+--- /dev/null
5++++ b/vendor/github.com/microcosm-cc/bluemonday/.coveralls.yml
6+@@ -0,0 +1 @@
7++repo_token: x2wlA1x0X8CK45ybWpZRCVRB4g7vtkhaw
8+diff --git a/vendor/github.com/microcosm-cc/bluemonday/.travis.yml b/vendor/github.com/microcosm-cc/bluemonday/.travis.yml
9+new file mode 100644
10+index 00000000..4f666461
11+--- /dev/null
12++++ b/vendor/github.com/microcosm-cc/bluemonday/.travis.yml
13+@@ -0,0 +1,22 @@
14++language: go
15++go:
16++ - 1.1.x
17++ - 1.2.x
18++ - 1.3.x
19++ - 1.4.x
20++ - 1.5.x
21++ - 1.6.x
22++ - 1.7.x
23++ - 1.8.x
24++ - 1.9.x
25++ - 1.10.x
26++ - 1.11.x
27++ - tip
28++matrix:
29++ allow_failures:
30++ - go: tip
31++ fast_finish: true
32++install:
33++ - go get .
34++script:
35++ - go test -v ./...
36+diff --git a/vendor/github.com/microcosm-cc/bluemonday/CONTRIBUTING.md b/vendor/github.com/microcosm-cc/bluemonday/CONTRIBUTING.md
37+new file mode 100644
38+index 00000000..d2b12302
39+--- /dev/null
40++++ b/vendor/github.com/microcosm-cc/bluemonday/CONTRIBUTING.md
41+@@ -0,0 +1,51 @@
42++# Contributing to bluemonday
43++
44++Third-party patches are essential for keeping bluemonday secure and offering the features developers want. However there are a few guidelines that we need contributors to follow so that we can maintain the quality of work that developers who use bluemonday expect.
45++
46++## Getting Started
47++
48++* Make sure you have a [Github account](https://github.com/signup/free)
49++
50++## Guidelines
51++
52++1. Do not vendor dependencies. As a security package, were we to vendor dependencies the projects that then vendor bluemonday may not receive the latest security updates to the dependencies. By not vendoring dependencies the project that implements bluemonday will vendor the latest version of any dependent packages. Vendoring is a project problem, not a package problem. bluemonday will be tested against the latest version of dependencies periodically and during any PR/merge.
53++
54++## Submitting an Issue
55++
56++* Submit a ticket for your issue, assuming one does not already exist
57++* Clearly describe the issue including the steps to reproduce (with sample input and output) if it is a bug
58++
59++If you are reporting a security flaw, you may expect that we will provide the code to fix it for you. Otherwise you may want to submit a pull request to ensure the resolution is applied sooner rather than later:
60++
61++* Fork the repository on Github
62++* Issue a pull request containing code to resolve the issue
63++
64++## Submitting a Pull Request
65++
66++* Submit a ticket for your issue, assuming one does not already exist
67++* Describe the reason for the pull request and if applicable show some example inputs and outputs to demonstrate what the patch does
68++* Fork the repository on Github
69++* Before submitting the pull request you should
70++ 1. Include tests for your patch, 1 test should encapsulate the entire patch and should refer to the Github issue
71++ 1. If you have added new exposed/public functionality, you should ensure it is documented appropriately
72++ 1. If you have added new exposed/public functionality, you should consider demonstrating how to use it within one of the helpers or shipped policies if appropriate or within a test if modifying a helper or policy is not appropriate
73++ 1. Run all of the tests `go test -v ./...` or `make test` and ensure all tests pass
74++ 1. Run gofmt `gofmt -w ./$*` or `make fmt`
75++ 1. Run vet `go tool vet *.go` or `make vet` and resolve any issues
76++ 1. Install golint using `go get -u github.com/golang/lint/golint` and run vet `golint *.go` or `make lint` and resolve every warning
77++* When submitting the pull request you should
78++ 1. Note the issue(s) it resolves, i.e. `Closes #6` in the pull request comment to close issue #6 when the pull request is accepted
79++
80++Once you have submitted a pull request, we *may* merge it without changes. If we have any comments or feedback, or need you to make changes to your pull request we will update the Github pull request or the associated issue. We expect responses from you within two weeks, and we may close the pull request is there is no activity.
81++
82++### Contributor Licence Agreement
83++
84++We haven't gone for the formal "Sign a Contributor Licence Agreement" thing that projects like [puppet](https://cla.puppetlabs.com/), [Mojito](https://developer.yahoo.com/cocktails/mojito/cla/) and companies like [Google](http://code.google.com/legal/individual-cla-v1.0.html) are using.
85++
86++But we do need to know that we can accept and merge your contributions, so for now the act of contributing a pull request should be considered equivalent to agreeing to a contributor licence agreement, specifically:
87++
88++You accept that the act of submitting code to the bluemonday project is to grant a copyright licence to the project that is perpetual, worldwide, non-exclusive, no-charge, royalty free and irrevocable.
89++
90++You accept that all who comply with the licence of the project (BSD 3-clause) are permitted to use your contributions to the project.
91++
92++You accept, and by submitting code do declare, that you have the legal right to grant such a licence to the project and that each of the contributions is your own original creation.
93+diff --git a/vendor/github.com/microcosm-cc/bluemonday/CREDITS.md b/vendor/github.com/microcosm-cc/bluemonday/CREDITS.md
94+new file mode 100644
95+index 00000000..b98873f3
96+--- /dev/null
97++++ b/vendor/github.com/microcosm-cc/bluemonday/CREDITS.md
98+@@ -0,0 +1,6 @@
99++1. Andrew Krasichkov @buglloc https://github.com/buglloc
100++1. John Graham-Cumming http://jgc.org/
101++1. Mike Samuel mikesamuel@gmail.com
102++1. Dmitri Shuralyov shurcooL@gmail.com
103++1. https://github.com/opennota
104++1. https://github.com/Gufran
105+\ No newline at end of file
106+diff --git a/vendor/github.com/microcosm-cc/bluemonday/LICENSE.md b/vendor/github.com/microcosm-cc/bluemonday/LICENSE.md
107+new file mode 100644
108+index 00000000..f822458e
109+--- /dev/null
110++++ b/vendor/github.com/microcosm-cc/bluemonday/LICENSE.md
111+@@ -0,0 +1,28 @@
112++Copyright (c) 2014, David Kitchen <david@buro9.com>
113++
114++All rights reserved.
115++
116++Redistribution and use in source and binary forms, with or without
117++modification, are permitted provided that the following conditions are met:
118++
119++* Redistributions of source code must retain the above copyright notice, this
120++ list of conditions and the following disclaimer.
121++
122++* Redistributions in binary form must reproduce the above copyright notice,
123++ this list of conditions and the following disclaimer in the documentation
124++ and/or other materials provided with the distribution.
125++
126++* Neither the name of the organisation (Microcosm) nor the names of its
127++ contributors may be used to endorse or promote products derived from
128++ this software without specific prior written permission.
129++
130++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
131++AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
132++IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
133++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
134++FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
135++DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
136++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
137++CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
138++OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
139++OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
140+diff --git a/vendor/github.com/microcosm-cc/bluemonday/Makefile b/vendor/github.com/microcosm-cc/bluemonday/Makefile
141+new file mode 100644
142+index 00000000..b15dc74f
143+--- /dev/null
144++++ b/vendor/github.com/microcosm-cc/bluemonday/Makefile
145+@@ -0,0 +1,42 @@
146++# Targets:
147++#
148++# all: Builds the code locally after testing
149++#
150++# fmt: Formats the source files
151++# build: Builds the code locally
152++# vet: Vets the code
153++# lint: Runs lint over the code (you do not need to fix everything)
154++# test: Runs the tests
155++# cover: Gives you the URL to a nice test coverage report
156++#
157++# install: Builds, tests and installs the code locally
158++
159++.PHONY: all fmt build vet lint test cover install
160++
161++# The first target is always the default action if `make` is called without
162++# args we build and install into $GOPATH so that it can just be run
163++
164++all: fmt vet test install
165++
166++fmt:
167++ @gofmt -s -w ./$*
168++
169++build:
170++ @go build
171++
172++vet:
173++ @go vet *.go
174++
175++lint:
176++ @golint *.go
177++
178++test:
179++ @go test -v ./...
180++
181++cover: COVERAGE_FILE := coverage.out
182++cover:
183++ @go test -coverprofile=$(COVERAGE_FILE) && \
184++ cover -html=$(COVERAGE_FILE) && rm $(COVERAGE_FILE)
185++
186++install:
187++ @go install ./...
188+diff --git a/vendor/github.com/microcosm-cc/bluemonday/README.md b/vendor/github.com/microcosm-cc/bluemonday/README.md
189+new file mode 100644
190+index 00000000..ce679c10
191+--- /dev/null
192++++ b/vendor/github.com/microcosm-cc/bluemonday/README.md
193+@@ -0,0 +1,350 @@
194++# bluemonday [![Build Status](https://travis-ci.org/microcosm-cc/bluemonday.svg?branch=master)](https://travis-ci.org/microcosm-cc/bluemonday) [![GoDoc](https://godoc.org/github.com/microcosm-cc/bluemonday?status.png)](https://godoc.org/github.com/microcosm-cc/bluemonday) [![Sourcegraph](https://sourcegraph.com/github.com/microcosm-cc/bluemonday/-/badge.svg)](https://sourcegraph.com/github.com/microcosm-cc/bluemonday?badge)
195++
196++bluemonday is a HTML sanitizer implemented in Go. It is fast and highly configurable.
197++
198++bluemonday takes untrusted user generated content as an input, and will return HTML that has been sanitised against a whitelist of approved HTML elements and attributes so that you can safely include the content in your web page.
199++
200++If you accept user generated content, and your server uses Go, you **need** bluemonday.
201++
202++The default policy for user generated content (`bluemonday.UGCPolicy().Sanitize()`) turns this:
203++```html
204++Hello <STYLE>.XSS{background-image:url("javascript:alert('XSS')");}</STYLE><A CLASS=XSS></A>World
205++```
206++
207++Into a harmless:
208++```html
209++Hello World
210++```
211++
212++And it turns this:
213++```html
214++<a href="javascript:alert('XSS1')" onmouseover="alert('XSS2')">XSS<a>
215++```
216++
217++Into this:
218++```html
219++XSS
220++```
221++
222++Whilst still allowing this:
223++```html
224++<a href="http://www.google.com/">
225++ <img src="https://ssl.gstatic.com/accounts/ui/logo_2x.png"/>
226++</a>
227++```
228++
229++To pass through mostly unaltered (it gained a rel="nofollow" which is a good thing for user generated content):
230++```html
231++<a href="http://www.google.com/" rel="nofollow">
232++ <img src="https://ssl.gstatic.com/accounts/ui/logo_2x.png"/>
233++</a>
234++```
235++
236++It protects sites from [XSS](http://en.wikipedia.org/wiki/Cross-site_scripting) attacks. There are many [vectors for an XSS attack](https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet) and the best way to mitigate the risk is to sanitize user input against a known safe list of HTML elements and attributes.
237++
238++You should **always** run bluemonday **after** any other processing.
239++
240++If you use [blackfriday](https://github.com/russross/blackfriday) or [Pandoc](http://johnmacfarlane.net/pandoc/) then bluemonday should be run after these steps. This ensures that no insecure HTML is introduced later in your process.
241++
242++bluemonday is heavily inspired by both the [OWASP Java HTML Sanitizer](https://code.google.com/p/owasp-java-html-sanitizer/) and the [HTML Purifier](http://htmlpurifier.org/).
243++
244++## Technical Summary
245++
246++Whitelist based, you need to either build a policy describing the HTML elements and attributes to permit (and the `regexp` patterns of attributes), or use one of the supplied policies representing good defaults.
247++
248++The policy containing the whitelist is applied using a fast non-validating, forward only, token-based parser implemented in the [Go net/html library](https://godoc.org/golang.org/x/net/html) by the core Go team.
249++
250++We expect to be supplied with well-formatted HTML (closing elements for every applicable open element, nested correctly) and so we do not focus on repairing badly nested or incomplete HTML. We focus on simply ensuring that whatever elements do exist are described in the policy whitelist and that attributes and links are safe for use on your web page. [GIGO](http://en.wikipedia.org/wiki/Garbage_in,_garbage_out) does apply and if you feed it bad HTML bluemonday is not tasked with figuring out how to make it good again.
251++
252++### Supported Go Versions
253++
254++bluemonday is tested against Go 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, and tip.
255++
256++We do not support Go 1.0 as we depend on `golang.org/x/net/html` which includes a reference to `io.ErrNoProgress` which did not exist in Go 1.0.
257++
258++## Is it production ready?
259++
260++*Yes*
261++
262++We are using bluemonday in production having migrated from the widely used and heavily field tested OWASP Java HTML Sanitizer.
263++
264++We are passing our extensive test suite (including AntiSamy tests as well as tests for any issues raised). Check for any [unresolved issues](https://github.com/microcosm-cc/bluemonday/issues?page=1&state=open) to see whether anything may be a blocker for you.
265++
266++We invite pull requests and issues to help us ensure we are offering comprehensive protection against various attacks via user generated content.
267++
268++## Usage
269++
270++Install in your `${GOPATH}` using `go get -u github.com/microcosm-cc/bluemonday`
271++
272++Then call it:
273++```go
274++package main
275++
276++import (
277++ "fmt"
278++
279++ "github.com/microcosm-cc/bluemonday"
280++)
281++
282++func main() {
283++ // Do this once for each unique policy, and use the policy for the life of the program
284++ // Policy creation/editing is not safe to use in multiple goroutines
285++ p := bluemonday.UGCPolicy()
286++
287++ // The policy can then be used to sanitize lots of input and it is safe to use the policy in multiple goroutines
288++ html := p.Sanitize(
289++ `<a onblur="alert(secret)" href="http://www.google.com">Google</a>`,
290++ )
291++
292++ // Output:
293++ // <a href="http://www.google.com" rel="nofollow">Google</a>
294++ fmt.Println(html)
295++}
296++```
297++
298++We offer three ways to call Sanitize:
299++```go
300++p.Sanitize(string) string
301++p.SanitizeBytes([]byte) []byte
302++p.SanitizeReader(io.Reader) bytes.Buffer
303++```
304++
305++If you are obsessed about performance, `p.SanitizeReader(r).Bytes()` will return a `[]byte` without performing any unnecessary casting of the inputs or outputs. Though the difference is so negligible you should never need to care.
306++
307++You can build your own policies:
308++```go
309++package main
310++
311++import (
312++ "fmt"
313++
314++ "github.com/microcosm-cc/bluemonday"
315++)
316++
317++func main() {
318++ p := bluemonday.NewPolicy()
319++
320++ // Require URLs to be parseable by net/url.Parse and either:
321++ // mailto: http:// or https://
322++ p.AllowStandardURLs()
323++
324++ // We only allow <p> and <a href="">
325++ p.AllowAttrs("href").OnElements("a")
326++ p.AllowElements("p")
327++
328++ html := p.Sanitize(
329++ `<a onblur="alert(secret)" href="http://www.google.com">Google</a>`,
330++ )
331++
332++ // Output:
333++ // <a href="http://www.google.com">Google</a>
334++ fmt.Println(html)
335++}
336++```
337++
338++We ship two default policies:
339++
340++1. `bluemonday.StrictPolicy()` which can be thought of as equivalent to stripping all HTML elements and their attributes as it has nothing on its whitelist. An example usage scenario would be blog post titles where HTML tags are not expected at all and if they are then the elements *and* the content of the elements should be stripped. This is a *very* strict policy.
341++2. `bluemonday.UGCPolicy()` which allows a broad selection of HTML elements and attributes that are safe for user generated content. Note that this policy does *not* whitelist iframes, object, embed, styles, script, etc. An example usage scenario would be blog post bodies where a variety of formatting is expected along with the potential for TABLEs and IMGs.
342++
343++## Policy Building
344++
345++The essence of building a policy is to determine which HTML elements and attributes are considered safe for your scenario. OWASP provide an [XSS prevention cheat sheet](https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet) to help explain the risks, but essentially:
346++
347++1. Avoid anything other than the standard HTML elements
348++1. Avoid `script`, `style`, `iframe`, `object`, `embed`, `base` elements that allow code to be executed by the client or third party content to be included that can execute code
349++1. Avoid anything other than plain HTML attributes with values matched to a regexp
350++
351++Basically, you should be able to describe what HTML is fine for your scenario. If you do not have confidence that you can describe your policy please consider using one of the shipped policies such as `bluemonday.UGCPolicy()`.
352++
353++To create a new policy:
354++```go
355++p := bluemonday.NewPolicy()
356++```
357++
358++To add elements to a policy either add just the elements:
359++```go
360++p.AllowElements("b", "strong")
361++```
362++
363++Or add elements as a virtue of adding an attribute:
364++```go
365++// Not the recommended pattern, see the recommendation on using .Matching() below
366++p.AllowAttrs("nowrap").OnElements("td", "th")
367++```
368++
369++Attributes can either be added to all elements:
370++```go
371++p.AllowAttrs("dir").Matching(regexp.MustCompile("(?i)rtl|ltr")).Globally()
372++```
373++
374++Or attributes can be added to specific elements:
375++```go
376++// Not the recommended pattern, see the recommendation on using .Matching() below
377++p.AllowAttrs("value").OnElements("li")
378++```
379++
380++It is **always** recommended that an attribute be made to match a pattern. XSS in HTML attributes is very easy otherwise:
381++```go
382++// \p{L} matches unicode letters, \p{N} matches unicode numbers
383++p.AllowAttrs("title").Matching(regexp.MustCompile(`[\p{L}\p{N}\s\-_',:\[\]!\./\\\(\)&]*`)).Globally()
384++```
385++
386++You can stop at any time and call .Sanitize():
387++```go
388++// string htmlIn passed in from a HTTP POST
389++htmlOut := p.Sanitize(htmlIn)
390++```
391++
392++And you can take any existing policy and extend it:
393++```go
394++p := bluemonday.UGCPolicy()
395++p.AllowElements("fieldset", "select", "option")
396++```
397++
398++### Links
399++
400++Links are difficult beasts to sanitise safely and also one of the biggest attack vectors for malicious content.
401++
402++It is possible to do this:
403++```go
404++p.AllowAttrs("href").Matching(regexp.MustCompile(`(?i)mailto|https?`)).OnElements("a")
405++```
406++
407++But that will not protect you as the regular expression is insufficient in this case to have prevented a malformed value doing something unexpected.
408++
409++We provide some additional global options for safely working with links.
410++
411++`RequireParseableURLs` will ensure that URLs are parseable by Go's `net/url` package:
412++```go
413++p.RequireParseableURLs(true)
414++```
415++
416++If you have enabled parseable URLs then the following option will `AllowRelativeURLs`. By default this is disabled (bluemonday is a whitelist tool... you need to explicitly tell us to permit things) and when disabled it will prevent all local and scheme relative URLs (i.e. `href="localpage.html"`, `href="../home.html"` and even `href="//www.google.com"` are relative):
417++```go
418++p.AllowRelativeURLs(true)
419++```
420++
421++If you have enabled parseable URLs then you can whitelist the schemes (commonly called protocol when thinking of `http` and `https`) that are permitted. Bear in mind that allowing relative URLs in the above option will allow for a blank scheme:
422++```go
423++p.AllowURLSchemes("mailto", "http", "https")
424++```
425++
426++Regardless of whether you have enabled parseable URLs, you can force all URLs to have a rel="nofollow" attribute. This will be added if it does not exist, but only when the `href` is valid:
427++```go
428++// This applies to "a" "area" "link" elements that have a "href" attribute
429++p.RequireNoFollowOnLinks(true)
430++```
431++
432++We provide a convenience method that applies all of the above, but you will still need to whitelist the linkable elements for the URL rules to be applied to:
433++```go
434++p.AllowStandardURLs()
435++p.AllowAttrs("cite").OnElements("blockquote", "q")
436++p.AllowAttrs("href").OnElements("a", "area")
437++p.AllowAttrs("src").OnElements("img")
438++```
439++
440++An additional complexity regarding links is the data URI as defined in [RFC2397](http://tools.ietf.org/html/rfc2397). The data URI allows for images to be served inline using this format:
441++
442++```html
443++<img src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=">
444++```
445++
446++We have provided a helper to verify the mimetype followed by base64 content of data URIs links:
447++
448++```go
449++p.AllowDataURIImages()
450++```
451++
452++That helper will enable GIF, JPEG, PNG and WEBP images.
453++
454++It should be noted that there is a potential [security](http://palizine.plynt.com/issues/2010Oct/bypass-xss-filters/) [risk](https://capec.mitre.org/data/definitions/244.html) with the use of data URI links. You should only enable data URI links if you already trust the content.
455++
456++We also have some features to help deal with user generated content:
457++```go
458++p.AddTargetBlankToFullyQualifiedLinks(true)
459++```
460++
461++This will ensure that anchor `<a href="" />` links that are fully qualified (the href destination includes a host name) will get `target="_blank"` added to them.
462++
463++Additionally any link that has `target="_blank"` after the policy has been applied will also have the `rel` attribute adjusted to add `noopener`. This means a link may start like `<a href="//host/path"/>` and will end up as `<a href="//host/path" rel="noopener" target="_blank">`. It is important to note that the addition of `noopener` is a security feature and not an issue. There is an unfortunate feature to browsers that a browser window opened as a result of `target="_blank"` can still control the opener (your web page) and this protects against that. The background to this can be found here: [https://dev.to/ben/the-targetblank-vulnerability-by-example](https://dev.to/ben/the-targetblank-vulnerability-by-example)
464++
465++### Policy Building Helpers
466++
467++We also bundle some helpers to simplify policy building:
468++```go
469++
470++// Permits the "dir", "id", "lang", "title" attributes globally
471++p.AllowStandardAttributes()
472++
473++// Permits the "img" element and its standard attributes
474++p.AllowImages()
475++
476++// Permits ordered and unordered lists, and also definition lists
477++p.AllowLists()
478++
479++// Permits HTML tables and all applicable elements and non-styling attributes
480++p.AllowTables()
481++```
482++
483++### Invalid Instructions
484++
485++The following are invalid:
486++```go
487++// This does not say where the attributes are allowed, you need to add
488++// .Globally() or .OnElements(...)
489++// This will be ignored without error.
490++p.AllowAttrs("value")
491++
492++// This does not say where the attributes are allowed, you need to add
493++// .Globally() or .OnElements(...)
494++// This will be ignored without error.
495++p.AllowAttrs(
496++ "type",
497++).Matching(
498++ regexp.MustCompile("(?i)^(circle|disc|square|a|A|i|I|1)$"),
499++)
500++```
501++
502++Both examples exhibit the same issue, they declare attributes but do not then specify whether they are whitelisted globally or only on specific elements (and which elements). Attributes belong to one or more elements, and the policy needs to declare this.
503++
504++## Limitations
505++
506++We are not yet including any tools to help whitelist and sanitize CSS. Which means that unless you wish to do the heavy lifting in a single regular expression (inadvisable), **you should not allow the "style" attribute anywhere**.
507++
508++It is not the job of bluemonday to fix your bad HTML, it is merely the job of bluemonday to prevent malicious HTML getting through. If you have mismatched HTML elements, or non-conforming nesting of elements, those will remain. But if you have well-structured HTML bluemonday will not break it.
509++
510++## TODO
511++
512++* Add support for CSS sanitisation to allow some CSS properties based on a whitelist, possibly using the [Gorilla CSS3 scanner](http://www.gorillatoolkit.org/pkg/css/scanner) - PRs welcome so long as testing covers XSS and demonstrates safety first
513++* Investigate whether devs want to blacklist elements and attributes. This would allow devs to take an existing policy (such as the `bluemonday.UGCPolicy()` ) that encapsulates 90% of what they're looking for but does more than they need, and to remove the extra things they do not want to make it 100% what they want
514++* Investigate whether devs want a validating HTML mode, in which the HTML elements are not just transformed into a balanced tree (every start tag has a closing tag at the correct depth) but also that elements and character data appear only in their allowed context (i.e. that a `table` element isn't a descendent of a `caption`, that `colgroup`, `thead`, `tbody`, `tfoot` and `tr` are permitted, and that character data is not permitted)
515++
516++## Development
517++
518++If you have cloned this repo you will probably need the dependency:
519++
520++`go get golang.org/x/net/html`
521++
522++Gophers can use their familiar tools:
523++
524++`go build`
525++
526++`go test`
527++
528++I personally use a Makefile as it spares typing the same args over and over whilst providing consistency for those of us who jump from language to language and enjoy just typing `make` in a project directory and watch magic happen.
529++
530++`make` will build, vet, test and install the library.
531++
532++`make clean` will remove the library from a *single* `${GOPATH}/pkg` directory tree
533++
534++`make test` will run the tests
535++
536++`make cover` will run the tests and *open a browser window* with the coverage report
537++
538++`make lint` will run golint (install via `go get github.com/golang/lint/golint`)
539++
540++## Long term goals
541++
542++1. Open the code to adversarial peer review similar to the [Attack Review Ground Rules](https://code.google.com/p/owasp-java-html-sanitizer/wiki/AttackReviewGroundRules)
543++1. Raise funds and pay for an external security review
544+diff --git a/vendor/github.com/microcosm-cc/bluemonday/doc.go b/vendor/github.com/microcosm-cc/bluemonday/doc.go
545+new file mode 100644
546+index 00000000..71dab608
547+--- /dev/null
548++++ b/vendor/github.com/microcosm-cc/bluemonday/doc.go
549+@@ -0,0 +1,104 @@
550++// Copyright (c) 2014, David Kitchen <david@buro9.com>
551++//
552++// All rights reserved.
553++//
554++// Redistribution and use in source and binary forms, with or without
555++// modification, are permitted provided that the following conditions are met:
556++//
557++// * Redistributions of source code must retain the above copyright notice, this
558++// list of conditions and the following disclaimer.
559++//
560++// * Redistributions in binary form must reproduce the above copyright notice,
561++// this list of conditions and the following disclaimer in the documentation
562++// and/or other materials provided with the distribution.
563++//
564++// * Neither the name of the organisation (Microcosm) nor the names of its
565++// contributors may be used to endorse or promote products derived from
566++// this software without specific prior written permission.
567++//
568++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
569++// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
570++// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
571++// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
572++// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
573++// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
574++// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
575++// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
576++// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
577++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
578++
579++/*
580++Package bluemonday provides a way of describing a whitelist of HTML elements
581++and attributes as a policy, and for that policy to be applied to untrusted
582++strings from users that may contain markup. All elements and attributes not on
583++the whitelist will be stripped.
584++
585++The default bluemonday.UGCPolicy().Sanitize() turns this:
586++
587++ Hello <STYLE>.XSS{background-image:url("javascript:alert('XSS')");}</STYLE><A CLASS=XSS></A>World
588++
589++Into the more harmless:
590++
591++ Hello World
592++
593++And it turns this:
594++
595++ <a href="javascript:alert('XSS1')" onmouseover="alert('XSS2')">XSS<a>
596++
597++Into this:
598++
599++ XSS
600++
601++Whilst still allowing this:
602++
603++ <a href="http://www.google.com/">
604++ <img src="https://ssl.gstatic.com/accounts/ui/logo_2x.png"/>
605++ </a>
606++
607++To pass through mostly unaltered (it gained a rel="nofollow"):
608++
609++ <a href="http://www.google.com/" rel="nofollow">
610++ <img src="https://ssl.gstatic.com/accounts/ui/logo_2x.png"/>
611++ </a>
612++
613++The primary purpose of bluemonday is to take potentially unsafe user generated
614++content (from things like Markdown, HTML WYSIWYG tools, etc) and make it safe
615++for you to put on your website.
616++
617++It protects sites against XSS (http://en.wikipedia.org/wiki/Cross-site_scripting)
618++and other malicious content that a user interface may deliver. There are many
619++vectors for an XSS attack (https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet)
620++and the safest thing to do is to sanitize user input against a known safe list
621++of HTML elements and attributes.
622++
623++Note: You should always run bluemonday after any other processing.
624++
625++If you use blackfriday (https://github.com/russross/blackfriday) or
626++Pandoc (http://johnmacfarlane.net/pandoc/) then bluemonday should be run after
627++these steps. This ensures that no insecure HTML is introduced later in your
628++process.
629++
630++bluemonday is heavily inspired by both the OWASP Java HTML Sanitizer
631++(https://code.google.com/p/owasp-java-html-sanitizer/) and the HTML Purifier
632++(http://htmlpurifier.org/).
633++
634++We ship two default policies, one is bluemonday.StrictPolicy() and can be
635++thought of as equivalent to stripping all HTML elements and their attributes as
636++it has nothing on its whitelist.
637++
638++The other is bluemonday.UGCPolicy() and allows a broad selection of HTML
639++elements and attributes that are safe for user generated content. Note that
640++this policy does not whitelist iframes, object, embed, styles, script, etc.
641++
642++The essence of building a policy is to determine which HTML elements and
643++attributes are considered safe for your scenario. OWASP provide an XSS
644++prevention cheat sheet ( https://www.google.com/search?q=xss+prevention+cheat+sheet )
645++to help explain the risks, but essentially:
646++
647++ 1. Avoid whitelisting anything other than plain HTML elements
648++ 2. Avoid whitelisting `script`, `style`, `iframe`, `object`, `embed`, `base`
649++ elements
650++ 3. Avoid whitelisting anything other than plain HTML elements with simple
651++ values that you can match to a regexp
652++*/
653++package bluemonday
654+diff --git a/vendor/github.com/microcosm-cc/bluemonday/go.mod b/vendor/github.com/microcosm-cc/bluemonday/go.mod
655+new file mode 100644
656+index 00000000..fa8453c5
657+--- /dev/null
658++++ b/vendor/github.com/microcosm-cc/bluemonday/go.mod
659+@@ -0,0 +1,5 @@
660++module github.com/microcosm-cc/bluemonday
661++
662++go 1.9
663++
664++require golang.org/x/net v0.0.0-20181220203305-927f97764cc3
665+diff --git a/vendor/github.com/microcosm-cc/bluemonday/go.sum b/vendor/github.com/microcosm-cc/bluemonday/go.sum
666+new file mode 100644
667+index 00000000..bee241d1
668+--- /dev/null
669++++ b/vendor/github.com/microcosm-cc/bluemonday/go.sum
670+@@ -0,0 +1,2 @@
671++golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis=
672++golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
673+diff --git a/vendor/github.com/microcosm-cc/bluemonday/helpers.go b/vendor/github.com/microcosm-cc/bluemonday/helpers.go
674+new file mode 100644
675+index 00000000..dfa5868d
676+--- /dev/null
677++++ b/vendor/github.com/microcosm-cc/bluemonday/helpers.go
678+@@ -0,0 +1,297 @@
679++// Copyright (c) 2014, David Kitchen <david@buro9.com>
680++//
681++// All rights reserved.
682++//
683++// Redistribution and use in source and binary forms, with or without
684++// modification, are permitted provided that the following conditions are met:
685++//
686++// * Redistributions of source code must retain the above copyright notice, this
687++// list of conditions and the following disclaimer.
688++//
689++// * Redistributions in binary form must reproduce the above copyright notice,
690++// this list of conditions and the following disclaimer in the documentation
691++// and/or other materials provided with the distribution.
692++//
693++// * Neither the name of the organisation (Microcosm) nor the names of its
694++// contributors may be used to endorse or promote products derived from
695++// this software without specific prior written permission.
696++//
697++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
698++// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
699++// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
700++// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
701++// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
702++// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
703++// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
704++// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
705++// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
706++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
707++
708++package bluemonday
709++
710++import (
711++ "encoding/base64"
712++ "net/url"
713++ "regexp"
714++)
715++
716++// A selection of regular expressions that can be used as .Matching() rules on
717++// HTML attributes.
718++var (
719++ // CellAlign handles the `align` attribute
720++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-align
721++ CellAlign = regexp.MustCompile(`(?i)^(center|justify|left|right|char)$`)
722++
723++ // CellVerticalAlign handles the `valign` attribute
724++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-valign
725++ CellVerticalAlign = regexp.MustCompile(`(?i)^(baseline|bottom|middle|top)$`)
726++
727++ // Direction handles the `dir` attribute
728++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo#attr-dir
729++ Direction = regexp.MustCompile(`(?i)^(rtl|ltr)$`)
730++
731++ // ImageAlign handles the `align` attribute on the `image` tag
732++ // http://www.w3.org/MarkUp/Test/Img/imgtest.html
733++ ImageAlign = regexp.MustCompile(
734++ `(?i)^(left|right|top|texttop|middle|absmiddle|baseline|bottom|absbottom)$`,
735++ )
736++
737++ // Integer describes whole positive integers (including 0) used in places
738++ // like td.colspan
739++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan
740++ Integer = regexp.MustCompile(`^[0-9]+$`)
741++
742++ // ISO8601 according to the W3 group is only a subset of the ISO8601
743++ // standard: http://www.w3.org/TR/NOTE-datetime
744++ //
745++ // Used in places like time.datetime
746++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time#attr-datetime
747++ //
748++ // Matches patterns:
749++ // Year:
750++ // YYYY (eg 1997)
751++ // Year and month:
752++ // YYYY-MM (eg 1997-07)
753++ // Complete date:
754++ // YYYY-MM-DD (eg 1997-07-16)
755++ // Complete date plus hours and minutes:
756++ // YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
757++ // Complete date plus hours, minutes and seconds:
758++ // YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
759++ // Complete date plus hours, minutes, seconds and a decimal fraction of a
760++ // second
761++ // YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)
762++ ISO8601 = regexp.MustCompile(
763++ `^[0-9]{4}(-[0-9]{2}(-[0-9]{2}([ T][0-9]{2}(:[0-9]{2}){1,2}(.[0-9]{1,6})` +
764++ `?Z?([\+-][0-9]{2}:[0-9]{2})?)?)?)?$`,
765++ )
766++
767++ // ListType encapsulates the common value as well as the latest spec
768++ // values for lists
769++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol#attr-type
770++ ListType = regexp.MustCompile(`(?i)^(circle|disc|square|a|A|i|I|1)$`)
771++
772++ // SpaceSeparatedTokens is used in places like `a.rel` and the common attribute
773++ // `class` which both contain space delimited lists of data tokens
774++ // http://www.w3.org/TR/html-markup/datatypes.html#common.data.tokens-def
775++ // Regexp: \p{L} matches unicode letters, \p{N} matches unicode numbers
776++ SpaceSeparatedTokens = regexp.MustCompile(`^([\s\p{L}\p{N}_-]+)$`)
777++
778++ // Number is a double value used on HTML5 meter and progress elements
779++ // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-meter-element
780++ Number = regexp.MustCompile(`^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$`)
781++
782++ // NumberOrPercent is used predominantly as units of measurement in width
783++ // and height attributes
784++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-height
785++ NumberOrPercent = regexp.MustCompile(`^[0-9]+[%]?$`)
786++
787++ // Paragraph of text in an attribute such as *.'title', img.alt, etc
788++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-title
789++ // Note that we are not allowing chars that could close tags like '>'
790++ Paragraph = regexp.MustCompile(`^[\p{L}\p{N}\s\-_',\[\]!\./\\\(\)]*$`)
791++
792++ // dataURIImagePrefix is used by AllowDataURIImages to define the acceptable
793++ // prefix of data URIs that contain common web image formats.
794++ //
795++ // This is not exported as it's not useful by itself, and only has value
796++ // within the AllowDataURIImages func
797++ dataURIImagePrefix = regexp.MustCompile(
798++ `^image/(gif|jpeg|png|webp);base64,`,
799++ )
800++)
801++
802++// AllowStandardURLs is a convenience function that will enable rel="nofollow"
803++// on "a", "area" and "link" (if you have allowed those elements) and will
804++// ensure that the URL values are parseable and either relative or belong to the
805++// "mailto", "http", or "https" schemes
806++func (p *Policy) AllowStandardURLs() {
807++ // URLs must be parseable by net/url.Parse()
808++ p.RequireParseableURLs(true)
809++
810++ // !url.IsAbs() is permitted
811++ p.AllowRelativeURLs(true)
812++
813++ // Most common URL schemes only
814++ p.AllowURLSchemes("mailto", "http", "https")
815++
816++ // For all anchors we will add rel="nofollow" if it does not already exist
817++ // This applies to "a" "area" "link"
818++ p.RequireNoFollowOnLinks(true)
819++}
820++
821++// AllowStandardAttributes will enable "id", "title" and the language specific
822++// attributes "dir" and "lang" on all elements that are whitelisted
823++func (p *Policy) AllowStandardAttributes() {
824++ // "dir" "lang" are permitted as both language attributes affect charsets
825++ // and direction of text.
826++ p.AllowAttrs("dir").Matching(Direction).Globally()
827++ p.AllowAttrs(
828++ "lang",
829++ ).Matching(regexp.MustCompile(`[a-zA-Z]{2,20}`)).Globally()
830++
831++ // "id" is permitted. This is pretty much as some HTML elements require this
832++ // to work well ("dfn" is an example of a "id" being value)
833++ // This does create a risk that JavaScript and CSS within your web page
834++ // might identify the wrong elements. Ensure that you select things
835++ // accurately
836++ p.AllowAttrs("id").Matching(
837++ regexp.MustCompile(`[a-zA-Z0-9\:\-_\.]+`),
838++ ).Globally()
839++
840++ // "title" is permitted as it improves accessibility.
841++ p.AllowAttrs("title").Matching(Paragraph).Globally()
842++}
843++
844++// AllowStyling presently enables the class attribute globally.
845++//
846++// Note: When bluemonday ships a CSS parser and we can safely sanitise that,
847++// this will also allow sanitized styling of elements via the style attribute.
848++func (p *Policy) AllowStyling() {
849++
850++ // "class" is permitted globally
851++ p.AllowAttrs("class").Matching(SpaceSeparatedTokens).Globally()
852++}
853++
854++// AllowImages enables the img element and some popular attributes. It will also
855++// ensure that URL values are parseable. This helper does not enable data URI
856++// images, for that you should also use the AllowDataURIImages() helper.
857++func (p *Policy) AllowImages() {
858++
859++ // "img" is permitted
860++ p.AllowAttrs("align").Matching(ImageAlign).OnElements("img")
861++ p.AllowAttrs("alt").Matching(Paragraph).OnElements("img")
862++ p.AllowAttrs("height", "width").Matching(NumberOrPercent).OnElements("img")
863++
864++ // Standard URLs enabled
865++ p.AllowStandardURLs()
866++ p.AllowAttrs("src").OnElements("img")
867++}
868++
869++// AllowDataURIImages permits the use of inline images defined in RFC2397
870++// http://tools.ietf.org/html/rfc2397
871++// http://en.wikipedia.org/wiki/Data_URI_scheme
872++//
873++// Images must have a mimetype matching:
874++// image/gif
875++// image/jpeg
876++// image/png
877++// image/webp
878++//
879++// NOTE: There is a potential security risk to allowing data URIs and you should
880++// only permit them on content you already trust.
881++// http://palizine.plynt.com/issues/2010Oct/bypass-xss-filters/
882++// https://capec.mitre.org/data/definitions/244.html
883++func (p *Policy) AllowDataURIImages() {
884++
885++ // URLs must be parseable by net/url.Parse()
886++ p.RequireParseableURLs(true)
887++
888++ // Supply a function to validate images contained within data URI
889++ p.AllowURLSchemeWithCustomPolicy(
890++ "data",
891++ func(url *url.URL) (allowUrl bool) {
892++ if url.RawQuery != "" || url.Fragment != "" {
893++ return false
894++ }
895++
896++ matched := dataURIImagePrefix.FindString(url.Opaque)
897++ if matched == "" {
898++ return false
899++ }
900++
901++ _, err := base64.StdEncoding.DecodeString(url.Opaque[len(matched):])
902++ if err != nil {
903++ return false
904++ }
905++
906++ return true
907++ },
908++ )
909++}
910++
911++// AllowLists will enabled ordered and unordered lists, as well as definition
912++// lists
913++func (p *Policy) AllowLists() {
914++ // "ol" "ul" are permitted
915++ p.AllowAttrs("type").Matching(ListType).OnElements("ol", "ul")
916++
917++ // "li" is permitted
918++ p.AllowAttrs("type").Matching(ListType).OnElements("li")
919++ p.AllowAttrs("value").Matching(Integer).OnElements("li")
920++
921++ // "dl" "dt" "dd" are permitted
922++ p.AllowElements("dl", "dt", "dd")
923++}
924++
925++// AllowTables will enable a rich set of elements and attributes to describe
926++// HTML tables
927++func (p *Policy) AllowTables() {
928++
929++ // "table" is permitted
930++ p.AllowAttrs("height", "width").Matching(NumberOrPercent).OnElements("table")
931++ p.AllowAttrs("summary").Matching(Paragraph).OnElements("table")
932++
933++ // "caption" is permitted
934++ p.AllowElements("caption")
935++
936++ // "col" "colgroup" are permitted
937++ p.AllowAttrs("align").Matching(CellAlign).OnElements("col", "colgroup")
938++ p.AllowAttrs("height", "width").Matching(
939++ NumberOrPercent,
940++ ).OnElements("col", "colgroup")
941++ p.AllowAttrs("span").Matching(Integer).OnElements("colgroup", "col")
942++ p.AllowAttrs("valign").Matching(
943++ CellVerticalAlign,
944++ ).OnElements("col", "colgroup")
945++
946++ // "thead" "tr" are permitted
947++ p.AllowAttrs("align").Matching(CellAlign).OnElements("thead", "tr")
948++ p.AllowAttrs("valign").Matching(CellVerticalAlign).OnElements("thead", "tr")
949++
950++ // "td" "th" are permitted
951++ p.AllowAttrs("abbr").Matching(Paragraph).OnElements("td", "th")
952++ p.AllowAttrs("align").Matching(CellAlign).OnElements("td", "th")
953++ p.AllowAttrs("colspan", "rowspan").Matching(Integer).OnElements("td", "th")
954++ p.AllowAttrs("headers").Matching(
955++ SpaceSeparatedTokens,
956++ ).OnElements("td", "th")
957++ p.AllowAttrs("height", "width").Matching(
958++ NumberOrPercent,
959++ ).OnElements("td", "th")
960++ p.AllowAttrs(
961++ "scope",
962++ ).Matching(
963++ regexp.MustCompile(`(?i)(?:row|col)(?:group)?`),
964++ ).OnElements("td", "th")
965++ p.AllowAttrs("valign").Matching(CellVerticalAlign).OnElements("td", "th")
966++ p.AllowAttrs("nowrap").Matching(
967++ regexp.MustCompile(`(?i)|nowrap`),
968++ ).OnElements("td", "th")
969++
970++ // "tbody" "tfoot"
971++ p.AllowAttrs("align").Matching(CellAlign).OnElements("tbody", "tfoot")
972++ p.AllowAttrs("valign").Matching(
973++ CellVerticalAlign,
974++ ).OnElements("tbody", "tfoot")
975++}
976+diff --git a/vendor/github.com/microcosm-cc/bluemonday/policies.go b/vendor/github.com/microcosm-cc/bluemonday/policies.go
977+new file mode 100644
978+index 00000000..570bba88
979+--- /dev/null
980++++ b/vendor/github.com/microcosm-cc/bluemonday/policies.go
981+@@ -0,0 +1,253 @@
982++// Copyright (c) 2014, David Kitchen <david@buro9.com>
983++//
984++// All rights reserved.
985++//
986++// Redistribution and use in source and binary forms, with or without
987++// modification, are permitted provided that the following conditions are met:
988++//
989++// * Redistributions of source code must retain the above copyright notice, this
990++// list of conditions and the following disclaimer.
991++//
992++// * Redistributions in binary form must reproduce the above copyright notice,
993++// this list of conditions and the following disclaimer in the documentation
994++// and/or other materials provided with the distribution.
995++//
996++// * Neither the name of the organisation (Microcosm) nor the names of its
997++// contributors may be used to endorse or promote products derived from
998++// this software without specific prior written permission.
999++//
1000++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1001++// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1002++// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1003++// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1004++// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1005++// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1006++// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1007++// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1008++// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1009++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1010++
1011++package bluemonday
1012++
1013++import (
1014++ "regexp"
1015++)
1016++
1017++// StrictPolicy returns an empty policy, which will effectively strip all HTML
1018++// elements and their attributes from a document.
1019++func StrictPolicy() *Policy {
1020++ return NewPolicy()
1021++}
1022++
1023++// StripTagsPolicy is DEPRECATED. Use StrictPolicy instead.
1024++func StripTagsPolicy() *Policy {
1025++ return StrictPolicy()
1026++}
1027++
1028++// UGCPolicy returns a policy aimed at user generated content that is a result
1029++// of HTML WYSIWYG tools and Markdown conversions.
1030++//
1031++// This is expected to be a fairly rich document where as much markup as
1032++// possible should be retained. Markdown permits raw HTML so we are basically
1033++// providing a policy to sanitise HTML5 documents safely but with the
1034++// least intrusion on the formatting expectations of the user.
1035++func UGCPolicy() *Policy {
1036++
1037++ p := NewPolicy()
1038++
1039++ ///////////////////////
1040++ // Global attributes //
1041++ ///////////////////////
1042++
1043++ // "class" is not permitted as we are not allowing users to style their own
1044++ // content
1045++
1046++ p.AllowStandardAttributes()
1047++
1048++ //////////////////////////////
1049++ // Global URL format policy //
1050++ //////////////////////////////
1051++
1052++ p.AllowStandardURLs()
1053++
1054++ ////////////////////////////////
1055++ // Declarations and structure //
1056++ ////////////////////////////////
1057++
1058++ // "xml" "xslt" "DOCTYPE" "html" "head" are not permitted as we are
1059++ // expecting user generated content to be a fragment of HTML and not a full
1060++ // document.
1061++
1062++ //////////////////////////
1063++ // Sectioning root tags //
1064++ //////////////////////////
1065++
1066++ // "article" and "aside" are permitted and takes no attributes
1067++ p.AllowElements("article", "aside")
1068++
1069++ // "body" is not permitted as we are expecting user generated content to be a fragment
1070++ // of HTML and not a full document.
1071++
1072++ // "details" is permitted, including the "open" attribute which can either
1073++ // be blank or the value "open".
1074++ p.AllowAttrs(
1075++ "open",
1076++ ).Matching(regexp.MustCompile(`(?i)^(|open)$`)).OnElements("details")
1077++
1078++ // "fieldset" is not permitted as we are not allowing forms to be created.
1079++
1080++ // "figure" is permitted and takes no attributes
1081++ p.AllowElements("figure")
1082++
1083++ // "nav" is not permitted as it is assumed that the site (and not the user)
1084++ // has defined navigation elements
1085++
1086++ // "section" is permitted and takes no attributes
1087++ p.AllowElements("section")
1088++
1089++ // "summary" is permitted and takes no attributes
1090++ p.AllowElements("summary")
1091++
1092++ //////////////////////////
1093++ // Headings and footers //
1094++ //////////////////////////
1095++
1096++ // "footer" is not permitted as we expect user content to be a fragment and
1097++ // not structural to this extent
1098++
1099++ // "h1" through "h6" are permitted and take no attributes
1100++ p.AllowElements("h1", "h2", "h3", "h4", "h5", "h6")
1101++
1102++ // "header" is not permitted as we expect user content to be a fragment and
1103++ // not structural to this extent
1104++
1105++ // "hgroup" is permitted and takes no attributes
1106++ p.AllowElements("hgroup")
1107++
1108++ /////////////////////////////////////
1109++ // Content grouping and separating //
1110++ /////////////////////////////////////
1111++
1112++ // "blockquote" is permitted, including the "cite" attribute which must be
1113++ // a standard URL.
1114++ p.AllowAttrs("cite").OnElements("blockquote")
1115++
1116++ // "br" "div" "hr" "p" "span" "wbr" are permitted and take no attributes
1117++ p.AllowElements("br", "div", "hr", "p", "span", "wbr")
1118++
1119++ ///////////
1120++ // Links //
1121++ ///////////
1122++
1123++ // "a" is permitted
1124++ p.AllowAttrs("href").OnElements("a")
1125++
1126++ // "area" is permitted along with the attributes that map image maps work
1127++ p.AllowAttrs("name").Matching(
1128++ regexp.MustCompile(`^([\p{L}\p{N}_-]+)$`),
1129++ ).OnElements("map")
1130++ p.AllowAttrs("alt").Matching(Paragraph).OnElements("area")
1131++ p.AllowAttrs("coords").Matching(
1132++ regexp.MustCompile(`^([0-9]+,)+[0-9]+$`),
1133++ ).OnElements("area")
1134++ p.AllowAttrs("href").OnElements("area")
1135++ p.AllowAttrs("rel").Matching(SpaceSeparatedTokens).OnElements("area")
1136++ p.AllowAttrs("shape").Matching(
1137++ regexp.MustCompile(`(?i)^(default|circle|rect|poly)$`),
1138++ ).OnElements("area")
1139++ p.AllowAttrs("usemap").Matching(
1140++ regexp.MustCompile(`(?i)^#[\p{L}\p{N}_-]+$`),
1141++ ).OnElements("img")
1142++
1143++ // "link" is not permitted
1144++
1145++ /////////////////////
1146++ // Phrase elements //
1147++ /////////////////////
1148++
1149++ // The following are all inline phrasing elements
1150++ p.AllowElements("abbr", "acronym", "cite", "code", "dfn", "em",
1151++ "figcaption", "mark", "s", "samp", "strong", "sub", "sup", "var")
1152++
1153++ // "q" is permitted and "cite" is a URL and handled by URL policies
1154++ p.AllowAttrs("cite").OnElements("q")
1155++
1156++ // "time" is permitted
1157++ p.AllowAttrs("datetime").Matching(ISO8601).OnElements("time")
1158++
1159++ ////////////////////
1160++ // Style elements //
1161++ ////////////////////
1162++
1163++ // block and inline elements that impart no semantic meaning but style the
1164++ // document
1165++ p.AllowElements("b", "i", "pre", "small", "strike", "tt", "u")
1166++
1167++ // "style" is not permitted as we are not yet sanitising CSS and it is an
1168++ // XSS attack vector
1169++
1170++ //////////////////////
1171++ // HTML5 Formatting //
1172++ //////////////////////
1173++
1174++ // "bdi" "bdo" are permitted
1175++ p.AllowAttrs("dir").Matching(Direction).OnElements("bdi", "bdo")
1176++
1177++ // "rp" "rt" "ruby" are permitted
1178++ p.AllowElements("rp", "rt", "ruby")
1179++
1180++ ///////////////////////////
1181++ // HTML5 Change tracking //
1182++ ///////////////////////////
1183++
1184++ // "del" "ins" are permitted
1185++ p.AllowAttrs("cite").Matching(Paragraph).OnElements("del", "ins")
1186++ p.AllowAttrs("datetime").Matching(ISO8601).OnElements("del", "ins")
1187++
1188++ ///////////
1189++ // Lists //
1190++ ///////////
1191++
1192++ p.AllowLists()
1193++
1194++ ////////////
1195++ // Tables //
1196++ ////////////
1197++
1198++ p.AllowTables()
1199++
1200++ ///////////
1201++ // Forms //
1202++ ///////////
1203++
1204++ // By and large, forms are not permitted. However there are some form
1205++ // elements that can be used to present data, and we do permit those
1206++ //
1207++ // "button" "fieldset" "input" "keygen" "label" "output" "select" "datalist"
1208++ // "textarea" "optgroup" "option" are all not permitted
1209++
1210++ // "meter" is permitted
1211++ p.AllowAttrs(
1212++ "value",
1213++ "min",
1214++ "max",
1215++ "low",
1216++ "high",
1217++ "optimum",
1218++ ).Matching(Number).OnElements("meter")
1219++
1220++ // "progress" is permitted
1221++ p.AllowAttrs("value", "max").Matching(Number).OnElements("progress")
1222++
1223++ //////////////////////
1224++ // Embedded content //
1225++ //////////////////////
1226++
1227++ // Vast majority not permitted
1228++ // "audio" "canvas" "embed" "iframe" "object" "param" "source" "svg" "track"
1229++ // "video" are all not permitted
1230++
1231++ p.AllowImages()
1232++
1233++ return p
1234++}
1235+diff --git a/vendor/github.com/microcosm-cc/bluemonday/policy.go b/vendor/github.com/microcosm-cc/bluemonday/policy.go
1236+new file mode 100644
1237+index 00000000..f61d98f5
1238+--- /dev/null
1239++++ b/vendor/github.com/microcosm-cc/bluemonday/policy.go
1240+@@ -0,0 +1,552 @@
1241++// Copyright (c) 2014, David Kitchen <david@buro9.com>
1242++//
1243++// All rights reserved.
1244++//
1245++// Redistribution and use in source and binary forms, with or without
1246++// modification, are permitted provided that the following conditions are met:
1247++//
1248++// * Redistributions of source code must retain the above copyright notice, this
1249++// list of conditions and the following disclaimer.
1250++//
1251++// * Redistributions in binary form must reproduce the above copyright notice,
1252++// this list of conditions and the following disclaimer in the documentation
1253++// and/or other materials provided with the distribution.
1254++//
1255++// * Neither the name of the organisation (Microcosm) nor the names of its
1256++// contributors may be used to endorse or promote products derived from
1257++// this software without specific prior written permission.
1258++//
1259++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1260++// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1261++// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1262++// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1263++// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1264++// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1265++// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1266++// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1267++// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1268++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1269++
1270++package bluemonday
1271++
1272++import (
1273++ "net/url"
1274++ "regexp"
1275++ "strings"
1276++)
1277++
1278++// Policy encapsulates the whitelist of HTML elements and attributes that will
1279++// be applied to the sanitised HTML.
1280++//
1281++// You should use bluemonday.NewPolicy() to create a blank policy as the
1282++// unexported fields contain maps that need to be initialized.
1283++type Policy struct {
1284++
1285++ // Declares whether the maps have been initialized, used as a cheap check to
1286++ // ensure that those using Policy{} directly won't cause nil pointer
1287++ // exceptions
1288++ initialized bool
1289++
1290++ // If true then we add spaces when stripping tags, specifically the closing
1291++ // tag is replaced by a space character.
1292++ addSpaces bool
1293++
1294++ // When true, add rel="nofollow" to HTML anchors
1295++ requireNoFollow bool
1296++
1297++ // When true, add rel="nofollow" to HTML anchors
1298++ // Will add for href="http://foo"
1299++ // Will skip for href="/foo" or href="foo"
1300++ requireNoFollowFullyQualifiedLinks bool
1301++
1302++ // When true add target="_blank" to fully qualified links
1303++ // Will add for href="http://foo"
1304++ // Will skip for href="/foo" or href="foo"
1305++ addTargetBlankToFullyQualifiedLinks bool
1306++
1307++ // When true, URLs must be parseable by "net/url" url.Parse()
1308++ requireParseableURLs bool
1309++
1310++ // When true, u, _ := url.Parse("url"); !u.IsAbs() is permitted
1311++ allowRelativeURLs bool
1312++
1313++ // When true, allow data attributes.
1314++ allowDataAttributes bool
1315++
1316++ // map[htmlElementName]map[htmlAttributeName]attrPolicy
1317++ elsAndAttrs map[string]map[string]attrPolicy
1318++
1319++ // map[htmlAttributeName]attrPolicy
1320++ globalAttrs map[string]attrPolicy
1321++
1322++ // If urlPolicy is nil, all URLs with matching schema are allowed.
1323++ // Otherwise, only the URLs with matching schema and urlPolicy(url)
1324++ // returning true are allowed.
1325++ allowURLSchemes map[string]urlPolicy
1326++
1327++ // If an element has had all attributes removed as a result of a policy
1328++ // being applied, then the element would be removed from the output.
1329++ //
1330++ // However some elements are valid and have strong layout meaning without
1331++ // any attributes, i.e. <table>. To prevent those being removed we maintain
1332++ // a list of elements that are allowed to have no attributes and that will
1333++ // be maintained in the output HTML.
1334++ setOfElementsAllowedWithoutAttrs map[string]struct{}
1335++
1336++ setOfElementsToSkipContent map[string]struct{}
1337++}
1338++
1339++type attrPolicy struct {
1340++
1341++ // optional pattern to match, when not nil the regexp needs to match
1342++ // otherwise the attribute is removed
1343++ regexp *regexp.Regexp
1344++}
1345++
1346++type attrPolicyBuilder struct {
1347++ p *Policy
1348++
1349++ attrNames []string
1350++ regexp *regexp.Regexp
1351++ allowEmpty bool
1352++}
1353++
1354++type urlPolicy func(url *url.URL) (allowUrl bool)
1355++
1356++// init initializes the maps if this has not been done already
1357++func (p *Policy) init() {
1358++ if !p.initialized {
1359++ p.elsAndAttrs = make(map[string]map[string]attrPolicy)
1360++ p.globalAttrs = make(map[string]attrPolicy)
1361++ p.allowURLSchemes = make(map[string]urlPolicy)
1362++ p.setOfElementsAllowedWithoutAttrs = make(map[string]struct{})
1363++ p.setOfElementsToSkipContent = make(map[string]struct{})
1364++ p.initialized = true
1365++ }
1366++}
1367++
1368++// NewPolicy returns a blank policy with nothing whitelisted or permitted. This
1369++// is the recommended way to start building a policy and you should now use
1370++// AllowAttrs() and/or AllowElements() to construct the whitelist of HTML
1371++// elements and attributes.
1372++func NewPolicy() *Policy {
1373++
1374++ p := Policy{}
1375++
1376++ p.addDefaultElementsWithoutAttrs()
1377++ p.addDefaultSkipElementContent()
1378++
1379++ return &p
1380++}
1381++
1382++// AllowAttrs takes a range of HTML attribute names and returns an
1383++// attribute policy builder that allows you to specify the pattern and scope of
1384++// the whitelisted attribute.
1385++//
1386++// The attribute policy is only added to the core policy when either Globally()
1387++// or OnElements(...) are called.
1388++func (p *Policy) AllowAttrs(attrNames ...string) *attrPolicyBuilder {
1389++
1390++ p.init()
1391++
1392++ abp := attrPolicyBuilder{
1393++ p: p,
1394++ allowEmpty: false,
1395++ }
1396++
1397++ for _, attrName := range attrNames {
1398++ abp.attrNames = append(abp.attrNames, strings.ToLower(attrName))
1399++ }
1400++
1401++ return &abp
1402++}
1403++
1404++// AllowDataAttributes whitelists all data attributes. We can't specify the name
1405++// of each attribute exactly as they are customized.
1406++//
1407++// NOTE: These values are not sanitized and applications that evaluate or process
1408++// them without checking and verification of the input may be at risk if this option
1409++// is enabled. This is a 'caveat emptor' option and the person enabling this option
1410++// needs to fully understand the potential impact with regards to whatever application
1411++// will be consuming the sanitized HTML afterwards, i.e. if you know you put a link in a
1412++// data attribute and use that to automatically load some new window then you're giving
1413++// the author of a HTML fragment the means to open a malicious destination automatically.
1414++// Use with care!
1415++func (p *Policy) AllowDataAttributes() {
1416++ p.allowDataAttributes = true
1417++}
1418++
1419++// AllowNoAttrs says that attributes on element are optional.
1420++//
1421++// The attribute policy is only added to the core policy when OnElements(...)
1422++// are called.
1423++func (p *Policy) AllowNoAttrs() *attrPolicyBuilder {
1424++
1425++ p.init()
1426++
1427++ abp := attrPolicyBuilder{
1428++ p: p,
1429++ allowEmpty: true,
1430++ }
1431++ return &abp
1432++}
1433++
1434++// AllowNoAttrs says that attributes on element are optional.
1435++//
1436++// The attribute policy is only added to the core policy when OnElements(...)
1437++// are called.
1438++func (abp *attrPolicyBuilder) AllowNoAttrs() *attrPolicyBuilder {
1439++
1440++ abp.allowEmpty = true
1441++
1442++ return abp
1443++}
1444++
1445++// Matching allows a regular expression to be applied to a nascent attribute
1446++// policy, and returns the attribute policy. Calling this more than once will
1447++// replace the existing regexp.
1448++func (abp *attrPolicyBuilder) Matching(regex *regexp.Regexp) *attrPolicyBuilder {
1449++
1450++ abp.regexp = regex
1451++
1452++ return abp
1453++}
1454++
1455++// OnElements will bind an attribute policy to a given range of HTML elements
1456++// and return the updated policy
1457++func (abp *attrPolicyBuilder) OnElements(elements ...string) *Policy {
1458++
1459++ for _, element := range elements {
1460++ element = strings.ToLower(element)
1461++
1462++ for _, attr := range abp.attrNames {
1463++
1464++ if _, ok := abp.p.elsAndAttrs[element]; !ok {
1465++ abp.p.elsAndAttrs[element] = make(map[string]attrPolicy)
1466++ }
1467++
1468++ ap := attrPolicy{}
1469++ if abp.regexp != nil {
1470++ ap.regexp = abp.regexp
1471++ }
1472++
1473++ abp.p.elsAndAttrs[element][attr] = ap
1474++ }
1475++
1476++ if abp.allowEmpty {
1477++ abp.p.setOfElementsAllowedWithoutAttrs[element] = struct{}{}
1478++
1479++ if _, ok := abp.p.elsAndAttrs[element]; !ok {
1480++ abp.p.elsAndAttrs[element] = make(map[string]attrPolicy)
1481++ }
1482++ }
1483++ }
1484++
1485++ return abp.p
1486++}
1487++
1488++// Globally will bind an attribute policy to all HTML elements and return the
1489++// updated policy
1490++func (abp *attrPolicyBuilder) Globally() *Policy {
1491++
1492++ for _, attr := range abp.attrNames {
1493++ if _, ok := abp.p.globalAttrs[attr]; !ok {
1494++ abp.p.globalAttrs[attr] = attrPolicy{}
1495++ }
1496++
1497++ ap := attrPolicy{}
1498++ if abp.regexp != nil {
1499++ ap.regexp = abp.regexp
1500++ }
1501++
1502++ abp.p.globalAttrs[attr] = ap
1503++ }
1504++
1505++ return abp.p
1506++}
1507++
1508++// AllowElements will append HTML elements to the whitelist without applying an
1509++// attribute policy to those elements (the elements are permitted
1510++// sans-attributes)
1511++func (p *Policy) AllowElements(names ...string) *Policy {
1512++ p.init()
1513++
1514++ for _, element := range names {
1515++ element = strings.ToLower(element)
1516++
1517++ if _, ok := p.elsAndAttrs[element]; !ok {
1518++ p.elsAndAttrs[element] = make(map[string]attrPolicy)
1519++ }
1520++ }
1521++
1522++ return p
1523++}
1524++
1525++// RequireNoFollowOnLinks will result in all <a> tags having a rel="nofollow"
1526++// added to them if one does not already exist
1527++//
1528++// Note: This requires p.RequireParseableURLs(true) and will enable it.
1529++func (p *Policy) RequireNoFollowOnLinks(require bool) *Policy {
1530++
1531++ p.requireNoFollow = require
1532++ p.requireParseableURLs = true
1533++
1534++ return p
1535++}
1536++
1537++// RequireNoFollowOnFullyQualifiedLinks will result in all <a> tags that point
1538++// to a non-local destination (i.e. starts with a protocol and has a host)
1539++// having a rel="nofollow" added to them if one does not already exist
1540++//
1541++// Note: This requires p.RequireParseableURLs(true) and will enable it.
1542++func (p *Policy) RequireNoFollowOnFullyQualifiedLinks(require bool) *Policy {
1543++
1544++ p.requireNoFollowFullyQualifiedLinks = require
1545++ p.requireParseableURLs = true
1546++
1547++ return p
1548++}
1549++
1550++// AddTargetBlankToFullyQualifiedLinks will result in all <a> tags that point
1551++// to a non-local destination (i.e. starts with a protocol and has a host)
1552++// having a target="_blank" added to them if one does not already exist
1553++//
1554++// Note: This requires p.RequireParseableURLs(true) and will enable it.
1555++func (p *Policy) AddTargetBlankToFullyQualifiedLinks(require bool) *Policy {
1556++
1557++ p.addTargetBlankToFullyQualifiedLinks = require
1558++ p.requireParseableURLs = true
1559++
1560++ return p
1561++}
1562++
1563++// RequireParseableURLs will result in all URLs requiring that they be parseable
1564++// by "net/url" url.Parse()
1565++// This applies to:
1566++// - a.href
1567++// - area.href
1568++// - blockquote.cite
1569++// - img.src
1570++// - link.href
1571++// - script.src
1572++func (p *Policy) RequireParseableURLs(require bool) *Policy {
1573++
1574++ p.requireParseableURLs = require
1575++
1576++ return p
1577++}
1578++
1579++// AllowRelativeURLs enables RequireParseableURLs and then permits URLs that
1580++// are parseable, have no schema information and url.IsAbs() returns false
1581++// This permits local URLs
1582++func (p *Policy) AllowRelativeURLs(require bool) *Policy {
1583++
1584++ p.RequireParseableURLs(true)
1585++ p.allowRelativeURLs = require
1586++
1587++ return p
1588++}
1589++
1590++// AllowURLSchemes will append URL schemes to the whitelist
1591++// Example: p.AllowURLSchemes("mailto", "http", "https")
1592++func (p *Policy) AllowURLSchemes(schemes ...string) *Policy {
1593++ p.init()
1594++
1595++ p.RequireParseableURLs(true)
1596++
1597++ for _, scheme := range schemes {
1598++ scheme = strings.ToLower(scheme)
1599++
1600++ // Allow all URLs with matching scheme.
1601++ p.allowURLSchemes[scheme] = nil
1602++ }
1603++
1604++ return p
1605++}
1606++
1607++// AllowURLSchemeWithCustomPolicy will append URL schemes with
1608++// a custom URL policy to the whitelist.
1609++// Only the URLs with matching schema and urlPolicy(url)
1610++// returning true will be allowed.
1611++func (p *Policy) AllowURLSchemeWithCustomPolicy(
1612++ scheme string,
1613++ urlPolicy func(url *url.URL) (allowUrl bool),
1614++) *Policy {
1615++
1616++ p.init()
1617++
1618++ p.RequireParseableURLs(true)
1619++
1620++ scheme = strings.ToLower(scheme)
1621++
1622++ p.allowURLSchemes[scheme] = urlPolicy
1623++
1624++ return p
1625++}
1626++
1627++// AddSpaceWhenStrippingTag states whether to add a single space " " when
1628++// removing tags that are not whitelisted by the policy.
1629++//
1630++// This is useful if you expect to strip tags in dense markup and may lose the
1631++// value of whitespace.
1632++//
1633++// For example: "<p>Hello</p><p>World</p>"" would be sanitized to "HelloWorld"
1634++// with the default value of false, but you may wish to sanitize this to
1635++// " Hello World " by setting AddSpaceWhenStrippingTag to true as this would
1636++// retain the intent of the text.
1637++func (p *Policy) AddSpaceWhenStrippingTag(allow bool) *Policy {
1638++
1639++ p.addSpaces = allow
1640++
1641++ return p
1642++}
1643++
1644++// SkipElementsContent adds the HTML elements whose tags is needed to be removed
1645++// with its content.
1646++func (p *Policy) SkipElementsContent(names ...string) *Policy {
1647++
1648++ p.init()
1649++
1650++ for _, element := range names {
1651++ element = strings.ToLower(element)
1652++
1653++ if _, ok := p.setOfElementsToSkipContent[element]; !ok {
1654++ p.setOfElementsToSkipContent[element] = struct{}{}
1655++ }
1656++ }
1657++
1658++ return p
1659++}
1660++
1661++// AllowElementsContent marks the HTML elements whose content should be
1662++// retained after removing the tag.
1663++func (p *Policy) AllowElementsContent(names ...string) *Policy {
1664++
1665++ p.init()
1666++
1667++ for _, element := range names {
1668++ delete(p.setOfElementsToSkipContent, strings.ToLower(element))
1669++ }
1670++
1671++ return p
1672++}
1673++
1674++// addDefaultElementsWithoutAttrs adds the HTML elements that we know are valid
1675++// without any attributes to an internal map.
1676++// i.e. we know that <table> is valid, but <bdo> isn't valid as the "dir" attr
1677++// is mandatory
1678++func (p *Policy) addDefaultElementsWithoutAttrs() {
1679++ p.init()
1680++
1681++ p.setOfElementsAllowedWithoutAttrs["abbr"] = struct{}{}
1682++ p.setOfElementsAllowedWithoutAttrs["acronym"] = struct{}{}
1683++ p.setOfElementsAllowedWithoutAttrs["address"] = struct{}{}
1684++ p.setOfElementsAllowedWithoutAttrs["article"] = struct{}{}
1685++ p.setOfElementsAllowedWithoutAttrs["aside"] = struct{}{}
1686++ p.setOfElementsAllowedWithoutAttrs["audio"] = struct{}{}
1687++ p.setOfElementsAllowedWithoutAttrs["b"] = struct{}{}
1688++ p.setOfElementsAllowedWithoutAttrs["bdi"] = struct{}{}
1689++ p.setOfElementsAllowedWithoutAttrs["blockquote"] = struct{}{}
1690++ p.setOfElementsAllowedWithoutAttrs["body"] = struct{}{}
1691++ p.setOfElementsAllowedWithoutAttrs["br"] = struct{}{}
1692++ p.setOfElementsAllowedWithoutAttrs["button"] = struct{}{}
1693++ p.setOfElementsAllowedWithoutAttrs["canvas"] = struct{}{}
1694++ p.setOfElementsAllowedWithoutAttrs["caption"] = struct{}{}
1695++ p.setOfElementsAllowedWithoutAttrs["center"] = struct{}{}
1696++ p.setOfElementsAllowedWithoutAttrs["cite"] = struct{}{}
1697++ p.setOfElementsAllowedWithoutAttrs["code"] = struct{}{}
1698++ p.setOfElementsAllowedWithoutAttrs["col"] = struct{}{}
1699++ p.setOfElementsAllowedWithoutAttrs["colgroup"] = struct{}{}
1700++ p.setOfElementsAllowedWithoutAttrs["datalist"] = struct{}{}
1701++ p.setOfElementsAllowedWithoutAttrs["dd"] = struct{}{}
1702++ p.setOfElementsAllowedWithoutAttrs["del"] = struct{}{}
1703++ p.setOfElementsAllowedWithoutAttrs["details"] = struct{}{}
1704++ p.setOfElementsAllowedWithoutAttrs["dfn"] = struct{}{}
1705++ p.setOfElementsAllowedWithoutAttrs["div"] = struct{}{}
1706++ p.setOfElementsAllowedWithoutAttrs["dl"] = struct{}{}
1707++ p.setOfElementsAllowedWithoutAttrs["dt"] = struct{}{}
1708++ p.setOfElementsAllowedWithoutAttrs["em"] = struct{}{}
1709++ p.setOfElementsAllowedWithoutAttrs["fieldset"] = struct{}{}
1710++ p.setOfElementsAllowedWithoutAttrs["figcaption"] = struct{}{}
1711++ p.setOfElementsAllowedWithoutAttrs["figure"] = struct{}{}
1712++ p.setOfElementsAllowedWithoutAttrs["footer"] = struct{}{}
1713++ p.setOfElementsAllowedWithoutAttrs["h1"] = struct{}{}
1714++ p.setOfElementsAllowedWithoutAttrs["h2"] = struct{}{}
1715++ p.setOfElementsAllowedWithoutAttrs["h3"] = struct{}{}
1716++ p.setOfElementsAllowedWithoutAttrs["h4"] = struct{}{}
1717++ p.setOfElementsAllowedWithoutAttrs["h5"] = struct{}{}
1718++ p.setOfElementsAllowedWithoutAttrs["h6"] = struct{}{}
1719++ p.setOfElementsAllowedWithoutAttrs["head"] = struct{}{}
1720++ p.setOfElementsAllowedWithoutAttrs["header"] = struct{}{}
1721++ p.setOfElementsAllowedWithoutAttrs["hgroup"] = struct{}{}
1722++ p.setOfElementsAllowedWithoutAttrs["hr"] = struct{}{}
1723++ p.setOfElementsAllowedWithoutAttrs["html"] = struct{}{}
1724++ p.setOfElementsAllowedWithoutAttrs["i"] = struct{}{}
1725++ p.setOfElementsAllowedWithoutAttrs["ins"] = struct{}{}
1726++ p.setOfElementsAllowedWithoutAttrs["kbd"] = struct{}{}
1727++ p.setOfElementsAllowedWithoutAttrs["li"] = struct{}{}
1728++ p.setOfElementsAllowedWithoutAttrs["mark"] = struct{}{}
1729++ p.setOfElementsAllowedWithoutAttrs["marquee"] = struct{}{}
1730++ p.setOfElementsAllowedWithoutAttrs["nav"] = struct{}{}
1731++ p.setOfElementsAllowedWithoutAttrs["ol"] = struct{}{}
1732++ p.setOfElementsAllowedWithoutAttrs["optgroup"] = struct{}{}
1733++ p.setOfElementsAllowedWithoutAttrs["option"] = struct{}{}
1734++ p.setOfElementsAllowedWithoutAttrs["p"] = struct{}{}
1735++ p.setOfElementsAllowedWithoutAttrs["pre"] = struct{}{}
1736++ p.setOfElementsAllowedWithoutAttrs["q"] = struct{}{}
1737++ p.setOfElementsAllowedWithoutAttrs["rp"] = struct{}{}
1738++ p.setOfElementsAllowedWithoutAttrs["rt"] = struct{}{}
1739++ p.setOfElementsAllowedWithoutAttrs["ruby"] = struct{}{}
1740++ p.setOfElementsAllowedWithoutAttrs["s"] = struct{}{}
1741++ p.setOfElementsAllowedWithoutAttrs["samp"] = struct{}{}
1742++ p.setOfElementsAllowedWithoutAttrs["script"] = struct{}{}
1743++ p.setOfElementsAllowedWithoutAttrs["section"] = struct{}{}
1744++ p.setOfElementsAllowedWithoutAttrs["select"] = struct{}{}
1745++ p.setOfElementsAllowedWithoutAttrs["small"] = struct{}{}
1746++ p.setOfElementsAllowedWithoutAttrs["span"] = struct{}{}
1747++ p.setOfElementsAllowedWithoutAttrs["strike"] = struct{}{}
1748++ p.setOfElementsAllowedWithoutAttrs["strong"] = struct{}{}
1749++ p.setOfElementsAllowedWithoutAttrs["style"] = struct{}{}
1750++ p.setOfElementsAllowedWithoutAttrs["sub"] = struct{}{}
1751++ p.setOfElementsAllowedWithoutAttrs["summary"] = struct{}{}
1752++ p.setOfElementsAllowedWithoutAttrs["sup"] = struct{}{}
1753++ p.setOfElementsAllowedWithoutAttrs["svg"] = struct{}{}
1754++ p.setOfElementsAllowedWithoutAttrs["table"] = struct{}{}
1755++ p.setOfElementsAllowedWithoutAttrs["tbody"] = struct{}{}
1756++ p.setOfElementsAllowedWithoutAttrs["td"] = struct{}{}
1757++ p.setOfElementsAllowedWithoutAttrs["textarea"] = struct{}{}
1758++ p.setOfElementsAllowedWithoutAttrs["tfoot"] = struct{}{}
1759++ p.setOfElementsAllowedWithoutAttrs["th"] = struct{}{}
1760++ p.setOfElementsAllowedWithoutAttrs["thead"] = struct{}{}
1761++ p.setOfElementsAllowedWithoutAttrs["title"] = struct{}{}
1762++ p.setOfElementsAllowedWithoutAttrs["time"] = struct{}{}
1763++ p.setOfElementsAllowedWithoutAttrs["tr"] = struct{}{}
1764++ p.setOfElementsAllowedWithoutAttrs["tt"] = struct{}{}
1765++ p.setOfElementsAllowedWithoutAttrs["u"] = struct{}{}
1766++ p.setOfElementsAllowedWithoutAttrs["ul"] = struct{}{}
1767++ p.setOfElementsAllowedWithoutAttrs["var"] = struct{}{}
1768++ p.setOfElementsAllowedWithoutAttrs["video"] = struct{}{}
1769++ p.setOfElementsAllowedWithoutAttrs["wbr"] = struct{}{}
1770++
1771++}
1772++
1773++// addDefaultSkipElementContent adds the HTML elements that we should skip
1774++// rendering the character content of, if the element itself is not allowed.
1775++// This is all character data that the end user would not normally see.
1776++// i.e. if we exclude a <script> tag then we shouldn't render the JavaScript or
1777++// anything else until we encounter the closing </script> tag.
1778++func (p *Policy) addDefaultSkipElementContent() {
1779++ p.init()
1780++
1781++ p.setOfElementsToSkipContent["frame"] = struct{}{}
1782++ p.setOfElementsToSkipContent["frameset"] = struct{}{}
1783++ p.setOfElementsToSkipContent["iframe"] = struct{}{}
1784++ p.setOfElementsToSkipContent["noembed"] = struct{}{}
1785++ p.setOfElementsToSkipContent["noframes"] = struct{}{}
1786++ p.setOfElementsToSkipContent["noscript"] = struct{}{}
1787++ p.setOfElementsToSkipContent["nostyle"] = struct{}{}
1788++ p.setOfElementsToSkipContent["object"] = struct{}{}
1789++ p.setOfElementsToSkipContent["script"] = struct{}{}
1790++ p.setOfElementsToSkipContent["style"] = struct{}{}
1791++ p.setOfElementsToSkipContent["title"] = struct{}{}
1792++}
1793+diff --git a/vendor/github.com/microcosm-cc/bluemonday/sanitize.go b/vendor/github.com/microcosm-cc/bluemonday/sanitize.go
1794+new file mode 100644
1795+index 00000000..65ed89b7
1796+--- /dev/null
1797++++ b/vendor/github.com/microcosm-cc/bluemonday/sanitize.go
1798+@@ -0,0 +1,581 @@
1799++// Copyright (c) 2014, David Kitchen <david@buro9.com>
1800++//
1801++// All rights reserved.
1802++//
1803++// Redistribution and use in source and binary forms, with or without
1804++// modification, are permitted provided that the following conditions are met:
1805++//
1806++// * Redistributions of source code must retain the above copyright notice, this
1807++// list of conditions and the following disclaimer.
1808++//
1809++// * Redistributions in binary form must reproduce the above copyright notice,
1810++// this list of conditions and the following disclaimer in the documentation
1811++// and/or other materials provided with the distribution.
1812++//
1813++// * Neither the name of the organisation (Microcosm) nor the names of its
1814++// contributors may be used to endorse or promote products derived from
1815++// this software without specific prior written permission.
1816++//
1817++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1818++// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1819++// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1820++// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1821++// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1822++// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1823++// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1824++// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1825++// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1826++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1827++
1828++package bluemonday
1829++
1830++import (
1831++ "bytes"
1832++ "io"
1833++ "net/url"
1834++ "regexp"
1835++ "strings"
1836++
1837++ "golang.org/x/net/html"
1838++)
1839++
1840++var (
1841++ dataAttribute = regexp.MustCompile("^data-.+")
1842++ dataAttributeXMLPrefix = regexp.MustCompile("^xml.+")
1843++ dataAttributeInvalidChars = regexp.MustCompile("[A-Z;]+")
1844++)
1845++
1846++// Sanitize takes a string that contains a HTML fragment or document and applies
1847++// the given policy whitelist.
1848++//
1849++// It returns a HTML string that has been sanitized by the policy or an empty
1850++// string if an error has occurred (most likely as a consequence of extremely
1851++// malformed input)
1852++func (p *Policy) Sanitize(s string) string {
1853++ if strings.TrimSpace(s) == "" {
1854++ return s
1855++ }
1856++
1857++ return p.sanitize(strings.NewReader(s)).String()
1858++}
1859++
1860++// SanitizeBytes takes a []byte that contains a HTML fragment or document and applies
1861++// the given policy whitelist.
1862++//
1863++// It returns a []byte containing the HTML that has been sanitized by the policy
1864++// or an empty []byte if an error has occurred (most likely as a consequence of
1865++// extremely malformed input)
1866++func (p *Policy) SanitizeBytes(b []byte) []byte {
1867++ if len(bytes.TrimSpace(b)) == 0 {
1868++ return b
1869++ }
1870++
1871++ return p.sanitize(bytes.NewReader(b)).Bytes()
1872++}
1873++
1874++// SanitizeReader takes an io.Reader that contains a HTML fragment or document
1875++// and applies the given policy whitelist.
1876++//
1877++// It returns a bytes.Buffer containing the HTML that has been sanitized by the
1878++// policy. Errors during sanitization will merely return an empty result.
1879++func (p *Policy) SanitizeReader(r io.Reader) *bytes.Buffer {
1880++ return p.sanitize(r)
1881++}
1882++
1883++// Performs the actual sanitization process.
1884++func (p *Policy) sanitize(r io.Reader) *bytes.Buffer {
1885++
1886++ // It is possible that the developer has created the policy via:
1887++ // p := bluemonday.Policy{}
1888++ // rather than:
1889++ // p := bluemonday.NewPolicy()
1890++ // If this is the case, and if they haven't yet triggered an action that
1891++ // would initiliaze the maps, then we need to do that.
1892++ p.init()
1893++
1894++ var (
1895++ buff bytes.Buffer
1896++ skipElementContent bool
1897++ skippingElementsCount int64
1898++ skipClosingTag bool
1899++ closingTagToSkipStack []string
1900++ mostRecentlyStartedToken string
1901++ )
1902++
1903++ tokenizer := html.NewTokenizer(r)
1904++ for {
1905++ if tokenizer.Next() == html.ErrorToken {
1906++ err := tokenizer.Err()
1907++ if err == io.EOF {
1908++ // End of input means end of processing
1909++ return &buff
1910++ }
1911++
1912++ // Raw tokenizer error
1913++ return &bytes.Buffer{}
1914++ }
1915++
1916++ token := tokenizer.Token()
1917++ switch token.Type {
1918++ case html.DoctypeToken:
1919++
1920++ // DocType is not handled as there is no safe parsing mechanism
1921++ // provided by golang.org/x/net/html for the content, and this can
1922++ // be misused to insert HTML tags that are not then sanitized
1923++ //
1924++ // One might wish to recursively sanitize here using the same policy
1925++ // but I will need to do some further testing before considering
1926++ // this.
1927++
1928++ case html.CommentToken:
1929++
1930++ // Comments are ignored by default
1931++
1932++ case html.StartTagToken:
1933++
1934++ mostRecentlyStartedToken = token.Data
1935++
1936++ aps, ok := p.elsAndAttrs[token.Data]
1937++ if !ok {
1938++ if _, ok := p.setOfElementsToSkipContent[token.Data]; ok {
1939++ skipElementContent = true
1940++ skippingElementsCount++
1941++ }
1942++ if p.addSpaces {
1943++ buff.WriteString(" ")
1944++ }
1945++ break
1946++ }
1947++
1948++ if len(token.Attr) != 0 {
1949++ token.Attr = p.sanitizeAttrs(token.Data, token.Attr, aps)
1950++ }
1951++
1952++ if len(token.Attr) == 0 {
1953++ if !p.allowNoAttrs(token.Data) {
1954++ skipClosingTag = true
1955++ closingTagToSkipStack = append(closingTagToSkipStack, token.Data)
1956++ if p.addSpaces {
1957++ buff.WriteString(" ")
1958++ }
1959++ break
1960++ }
1961++ }
1962++
1963++ if !skipElementContent {
1964++ buff.WriteString(token.String())
1965++ }
1966++
1967++ case html.EndTagToken:
1968++
1969++ if mostRecentlyStartedToken == token.Data {
1970++ mostRecentlyStartedToken = ""
1971++ }
1972++
1973++ if skipClosingTag && closingTagToSkipStack[len(closingTagToSkipStack)-1] == token.Data {
1974++ closingTagToSkipStack = closingTagToSkipStack[:len(closingTagToSkipStack)-1]
1975++ if len(closingTagToSkipStack) == 0 {
1976++ skipClosingTag = false
1977++ }
1978++ if p.addSpaces {
1979++ buff.WriteString(" ")
1980++ }
1981++ break
1982++ }
1983++
1984++ if _, ok := p.elsAndAttrs[token.Data]; !ok {
1985++ if _, ok := p.setOfElementsToSkipContent[token.Data]; ok {
1986++ skippingElementsCount--
1987++ if skippingElementsCount == 0 {
1988++ skipElementContent = false
1989++ }
1990++ }
1991++ if p.addSpaces {
1992++ buff.WriteString(" ")
1993++ }
1994++ break
1995++ }
1996++
1997++ if !skipElementContent {
1998++ buff.WriteString(token.String())
1999++ }
2000++
2001++ case html.SelfClosingTagToken:
2002++
2003++ aps, ok := p.elsAndAttrs[token.Data]
2004++ if !ok {
2005++ if p.addSpaces {
2006++ buff.WriteString(" ")
2007++ }
2008++ break
2009++ }
2010++
2011++ if len(token.Attr) != 0 {
2012++ token.Attr = p.sanitizeAttrs(token.Data, token.Attr, aps)
2013++ }
2014++
2015++ if len(token.Attr) == 0 && !p.allowNoAttrs(token.Data) {
2016++ if p.addSpaces {
2017++ buff.WriteString(" ")
2018++ }
2019++ break
2020++ }
2021++
2022++ if !skipElementContent {
2023++ buff.WriteString(token.String())
2024++ }
2025++
2026++ case html.TextToken:
2027++
2028++ if !skipElementContent {
2029++ switch mostRecentlyStartedToken {
2030++ case "script":
2031++ // not encouraged, but if a policy allows JavaScript we
2032++ // should not HTML escape it as that would break the output
2033++ buff.WriteString(token.Data)
2034++ case "style":
2035++ // not encouraged, but if a policy allows CSS styles we
2036++ // should not HTML escape it as that would break the output
2037++ buff.WriteString(token.Data)
2038++ default:
2039++ // HTML escape the text
2040++ buff.WriteString(token.String())
2041++ }
2042++ }
2043++ default:
2044++ // A token that didn't exist in the html package when we wrote this
2045++ return &bytes.Buffer{}
2046++ }
2047++ }
2048++}
2049++
2050++// sanitizeAttrs takes a set of element attribute policies and the global
2051++// attribute policies and applies them to the []html.Attribute returning a set
2052++// of html.Attributes that match the policies
2053++func (p *Policy) sanitizeAttrs(
2054++ elementName string,
2055++ attrs []html.Attribute,
2056++ aps map[string]attrPolicy,
2057++) []html.Attribute {
2058++
2059++ if len(attrs) == 0 {
2060++ return attrs
2061++ }
2062++
2063++ // Builds a new attribute slice based on the whether the attribute has been
2064++ // whitelisted explicitly or globally.
2065++ cleanAttrs := []html.Attribute{}
2066++ for _, htmlAttr := range attrs {
2067++ if p.allowDataAttributes {
2068++ // If we see a data attribute, let it through.
2069++ if isDataAttribute(htmlAttr.Key) {
2070++ cleanAttrs = append(cleanAttrs, htmlAttr)
2071++ continue
2072++ }
2073++ }
2074++ // Is there an element specific attribute policy that applies?
2075++ if ap, ok := aps[htmlAttr.Key]; ok {
2076++ if ap.regexp != nil {
2077++ if ap.regexp.MatchString(htmlAttr.Val) {
2078++ cleanAttrs = append(cleanAttrs, htmlAttr)
2079++ continue
2080++ }
2081++ } else {
2082++ cleanAttrs = append(cleanAttrs, htmlAttr)
2083++ continue
2084++ }
2085++ }
2086++
2087++ // Is there a global attribute policy that applies?
2088++ if ap, ok := p.globalAttrs[htmlAttr.Key]; ok {
2089++
2090++ if ap.regexp != nil {
2091++ if ap.regexp.MatchString(htmlAttr.Val) {
2092++ cleanAttrs = append(cleanAttrs, htmlAttr)
2093++ }
2094++ } else {
2095++ cleanAttrs = append(cleanAttrs, htmlAttr)
2096++ }
2097++ }
2098++ }
2099++
2100++ if len(cleanAttrs) == 0 {
2101++ // If nothing was allowed, let's get out of here
2102++ return cleanAttrs
2103++ }
2104++ // cleanAttrs now contains the attributes that are permitted
2105++
2106++ if linkable(elementName) {
2107++ if p.requireParseableURLs {
2108++ // Ensure URLs are parseable:
2109++ // - a.href
2110++ // - area.href
2111++ // - link.href
2112++ // - blockquote.cite
2113++ // - q.cite
2114++ // - img.src
2115++ // - script.src
2116++ tmpAttrs := []html.Attribute{}
2117++ for _, htmlAttr := range cleanAttrs {
2118++ switch elementName {
2119++ case "a", "area", "link":
2120++ if htmlAttr.Key == "href" {
2121++ if u, ok := p.validURL(htmlAttr.Val); ok {
2122++ htmlAttr.Val = u
2123++ tmpAttrs = append(tmpAttrs, htmlAttr)
2124++ }
2125++ break
2126++ }
2127++ tmpAttrs = append(tmpAttrs, htmlAttr)
2128++ case "blockquote", "q":
2129++ if htmlAttr.Key == "cite" {
2130++ if u, ok := p.validURL(htmlAttr.Val); ok {
2131++ htmlAttr.Val = u
2132++ tmpAttrs = append(tmpAttrs, htmlAttr)
2133++ }
2134++ break
2135++ }
2136++ tmpAttrs = append(tmpAttrs, htmlAttr)
2137++ case "img", "script":
2138++ if htmlAttr.Key == "src" {
2139++ if u, ok := p.validURL(htmlAttr.Val); ok {
2140++ htmlAttr.Val = u
2141++ tmpAttrs = append(tmpAttrs, htmlAttr)
2142++ }
2143++ break
2144++ }
2145++ tmpAttrs = append(tmpAttrs, htmlAttr)
2146++ default:
2147++ tmpAttrs = append(tmpAttrs, htmlAttr)
2148++ }
2149++ }
2150++ cleanAttrs = tmpAttrs
2151++ }
2152++
2153++ if (p.requireNoFollow ||
2154++ p.requireNoFollowFullyQualifiedLinks ||
2155++ p.addTargetBlankToFullyQualifiedLinks) &&
2156++ len(cleanAttrs) > 0 {
2157++
2158++ // Add rel="nofollow" if a "href" exists
2159++ switch elementName {
2160++ case "a", "area", "link":
2161++ var hrefFound bool
2162++ var externalLink bool
2163++ for _, htmlAttr := range cleanAttrs {
2164++ if htmlAttr.Key == "href" {
2165++ hrefFound = true
2166++
2167++ u, err := url.Parse(htmlAttr.Val)
2168++ if err != nil {
2169++ continue
2170++ }
2171++ if u.Host != "" {
2172++ externalLink = true
2173++ }
2174++
2175++ continue
2176++ }
2177++ }
2178++
2179++ if hrefFound {
2180++ var (
2181++ noFollowFound bool
2182++ targetBlankFound bool
2183++ )
2184++
2185++ addNoFollow := (p.requireNoFollow ||
2186++ externalLink && p.requireNoFollowFullyQualifiedLinks)
2187++
2188++ addTargetBlank := (externalLink &&
2189++ p.addTargetBlankToFullyQualifiedLinks)
2190++
2191++ tmpAttrs := []html.Attribute{}
2192++ for _, htmlAttr := range cleanAttrs {
2193++
2194++ var appended bool
2195++ if htmlAttr.Key == "rel" && addNoFollow {
2196++
2197++ if strings.Contains(htmlAttr.Val, "nofollow") {
2198++ noFollowFound = true
2199++ tmpAttrs = append(tmpAttrs, htmlAttr)
2200++ appended = true
2201++ } else {
2202++ htmlAttr.Val += " nofollow"
2203++ noFollowFound = true
2204++ tmpAttrs = append(tmpAttrs, htmlAttr)
2205++ appended = true
2206++ }
2207++ }
2208++
2209++ if elementName == "a" && htmlAttr.Key == "target" {
2210++ if htmlAttr.Val == "_blank" {
2211++ targetBlankFound = true
2212++ }
2213++ if addTargetBlank && !targetBlankFound {
2214++ htmlAttr.Val = "_blank"
2215++ targetBlankFound = true
2216++ tmpAttrs = append(tmpAttrs, htmlAttr)
2217++ appended = true
2218++ }
2219++ }
2220++
2221++ if !appended {
2222++ tmpAttrs = append(tmpAttrs, htmlAttr)
2223++ }
2224++ }
2225++ if noFollowFound || targetBlankFound {
2226++ cleanAttrs = tmpAttrs
2227++ }
2228++
2229++ if addNoFollow && !noFollowFound {
2230++ rel := html.Attribute{}
2231++ rel.Key = "rel"
2232++ rel.Val = "nofollow"
2233++ cleanAttrs = append(cleanAttrs, rel)
2234++ }
2235++
2236++ if elementName == "a" && addTargetBlank && !targetBlankFound {
2237++ rel := html.Attribute{}
2238++ rel.Key = "target"
2239++ rel.Val = "_blank"
2240++ targetBlankFound = true
2241++ cleanAttrs = append(cleanAttrs, rel)
2242++ }
2243++
2244++ if targetBlankFound {
2245++ // target="_blank" has a security risk that allows the
2246++ // opened window/tab to issue JavaScript calls against
2247++ // window.opener, which in effect allow the destination
2248++ // of the link to control the source:
2249++ // https://dev.to/ben/the-targetblank-vulnerability-by-example
2250++ //
2251++ // To mitigate this risk, we need to add a specific rel
2252++ // attribute if it is not already present.
2253++ // rel="noopener"
2254++ //
2255++ // Unfortunately this is processing the rel twice (we
2256++ // already looked at it earlier ^^) as we cannot be sure
2257++ // of the ordering of the href and rel, and whether we
2258++ // have fully satisfied that we need to do this. This
2259++ // double processing only happens *if* target="_blank"
2260++ // is true.
2261++ var noOpenerAdded bool
2262++ tmpAttrs := []html.Attribute{}
2263++ for _, htmlAttr := range cleanAttrs {
2264++ var appended bool
2265++ if htmlAttr.Key == "rel" {
2266++ if strings.Contains(htmlAttr.Val, "noopener") {
2267++ noOpenerAdded = true
2268++ tmpAttrs = append(tmpAttrs, htmlAttr)
2269++ } else {
2270++ htmlAttr.Val += " noopener"
2271++ noOpenerAdded = true
2272++ tmpAttrs = append(tmpAttrs, htmlAttr)
2273++ }
2274++
2275++ appended = true
2276++ }
2277++ if !appended {
2278++ tmpAttrs = append(tmpAttrs, htmlAttr)
2279++ }
2280++ }
2281++ if noOpenerAdded {
2282++ cleanAttrs = tmpAttrs
2283++ } else {
2284++ // rel attr was not found, or else noopener would
2285++ // have been added already
2286++ rel := html.Attribute{}
2287++ rel.Key = "rel"
2288++ rel.Val = "noopener"
2289++ cleanAttrs = append(cleanAttrs, rel)
2290++ }
2291++
2292++ }
2293++ }
2294++ default:
2295++ }
2296++ }
2297++ }
2298++
2299++ return cleanAttrs
2300++}
2301++
2302++func (p *Policy) allowNoAttrs(elementName string) bool {
2303++ _, ok := p.setOfElementsAllowedWithoutAttrs[elementName]
2304++ return ok
2305++}
2306++
2307++func (p *Policy) validURL(rawurl string) (string, bool) {
2308++ if p.requireParseableURLs {
2309++ // URLs are valid if when space is trimmed the URL is valid
2310++ rawurl = strings.TrimSpace(rawurl)
2311++
2312++ // URLs cannot contain whitespace, unless it is a data-uri
2313++ if (strings.Contains(rawurl, " ") ||
2314++ strings.Contains(rawurl, "\t") ||
2315++ strings.Contains(rawurl, "\n")) &&
2316++ !strings.HasPrefix(rawurl, `data:`) {
2317++ return "", false
2318++ }
2319++
2320++ // URLs are valid if they parse
2321++ u, err := url.Parse(rawurl)
2322++ if err != nil {
2323++ return "", false
2324++ }
2325++
2326++ if u.Scheme != "" {
2327++
2328++ urlPolicy, ok := p.allowURLSchemes[u.Scheme]
2329++ if !ok {
2330++ return "", false
2331++
2332++ }
2333++
2334++ if urlPolicy == nil || urlPolicy(u) == true {
2335++ return u.String(), true
2336++ }
2337++
2338++ return "", false
2339++ }
2340++
2341++ if p.allowRelativeURLs {
2342++ if u.String() != "" {
2343++ return u.String(), true
2344++ }
2345++ }
2346++
2347++ return "", false
2348++ }
2349++
2350++ return rawurl, true
2351++}
2352++
2353++func linkable(elementName string) bool {
2354++ switch elementName {
2355++ case "a", "area", "blockquote", "img", "link", "script":
2356++ return true
2357++ default:
2358++ return false
2359++ }
2360++}
2361++
2362++func isDataAttribute(val string) bool {
2363++ if !dataAttribute.MatchString(val) {
2364++ return false
2365++ }
2366++ rest := strings.Split(val, "data-")
2367++ if len(rest) == 1 {
2368++ return false
2369++ }
2370++ // data-xml* is invalid.
2371++ if dataAttributeXMLPrefix.MatchString(rest[1]) {
2372++ return false
2373++ }
2374++ // no uppercase or semi-colons allowed.
2375++ if dataAttributeInvalidChars.MatchString(rest[1]) {
2376++ return false
2377++ }
2378++ return true
2379++}
2380+diff --git a/vendor/modules.txt b/vendor/modules.txt
2381+index 0bae0d5d..ff6a5d78 100644
2382+--- a/vendor/modules.txt
2383++++ b/vendor/modules.txt
2384+@@ -49,6 +49,8 @@ github.com/lib/pq/oid
2385+ github.com/lib/pq/scram
2386+ # github.com/mb0/diff v0.0.0-20131118162322-d8d9a906c24d
2387+ github.com/mb0/diff
2388++# github.com/microcosm-cc/bluemonday v1.0.2
2389++github.com/microcosm-cc/bluemonday
2390+ # github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d
2391+ github.com/nu7hatch/gouuid
2392+ # github.com/pkg/errors v0.8.0
pkgs/servers/echoip/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule {
1111 sha256 = "17gkh1qfxasvxy25lmjdwk5fsjkcp7lmw9si3xzf01m7qnj5zi4b";
1212 };
1313
14− modSha256 = "025p891klwpid5fw4z39fimgfkwgkcwqpn5276hflzdp1hfv35ly";
14+ vendorSha256 = "0vvs717pl5gzggxpbn2vkyxmpiw5zjdfnpbh8i81xidbqvlnm22h";
1515
1616 outputs = [ "out" "index" ];
1717
@@ -25,4 +25,4 @@ buildGoModule {
2525 license = licenses.bsd3;
2626 maintainers = with maintainers; [ rvolosatovs ];
2727 };
28−}
28+}
pkgs/servers/gobetween/default.nix+20−4
@@ -1,4 +1,4 @@
1−{ buildGoModule, fetchFromGitHub, lib, enableStatic ? false }:
1+{ rsync, buildGoModule, fetchFromGitHub, lib, runCommand, enableStatic ? false }:
22
33buildGoModule rec {
44 pname = "gobetween";
@@ -10,14 +10,30 @@ buildGoModule rec {
1010 rev = version;
1111 sha256 = "f01593509ccece063acd47002c4fc52261fbbbcdbf14b088d813b7d8e38fcca8";
1212 };
13+ patches = [ ./gomod.patch ];
1314
14− modSha256 =
15− "dd91838d20c99c73447590e43edd13c87755276f17ef3e53f24c5df3d0908f78";
15+ deleteVendor = true;
1616
1717 buildPhase = ''
18− make build${lib.optionalString enableStatic "-static"}
18+ make -e build${lib.optionalString enableStatic "-static"}
1919 '';
2020
21+ lxd = fetchFromGitHub {
22+ owner = "lxc";
23+ repo = "lxd";
24+ rev = "41efd98813f3b42f1752ff6c2c7569a054924623";
25+ sha256 = "02vnvjjkzl7b0i2cn03f1lb3jgj5rd3wdkii4pqi9bvmhzszg0l2";
26+ };
27+
28+ overrideModAttrs = (_: {
29+ postBuild = ''
30+ rm -r vendor/github.com/lxc/lxd
31+ cp -r --reflink=auto ${lxd} vendor/github.com/lxc/lxd
32+ '';
33+ });
34+
35+ vendorSha256 = "1pd0zrjwpw6yv2s86a818yy2ma2fkazd3sb2h6zfp9mvyixgxgri";
36+
2137 installPhase = ''
2238 mkdir -p $out/bin
2339 cp bin/gobetween $out/bin
pkgs/servers/gobetween/gomod.patchnew file+21
@@ -0,0 +1,21 @@
1+diff --git a/go.mod b/go.mod
2+index 536631a..f91e862 100644
3+--- a/go.mod
4++++ b/go.mod
5+@@ -7,7 +7,7 @@ require (
6+ github.com/burntsushi/toml v0.3.1
7+ github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13
8+ github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8 // indirect
9+- github.com/flosch/pongo2 v0.0.0-20181225140029-79872a7b2769 // indirect
10++ github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4 // indirect
11+ github.com/fsouza/go-dockerclient v1.3.6
12+ github.com/gin-contrib/cors v0.0.0-20190301062745-f9e10995c85a
13+ github.com/gin-gonic/gin v1.3.0
14+@@ -20,7 +20,6 @@ require (
15+ github.com/juju/go4 v0.0.0-20160222163258-40d72ab9641a // indirect
16+ github.com/juju/persistent-cookiejar v0.0.0-20171026135701-d5e5a8405ef9 // indirect
17+ github.com/juju/schema v0.0.0-20181210140654-64a6158e9071 // indirect
18+- github.com/juju/utils v0.0.0-20180820210520-bf9cc5bdd62d // indirect
19+ github.com/juju/webbrowser v0.0.0-20180907093207-efb9432b2bcb // indirect
20+ github.com/julienschmidt/httprouter v1.2.0 // indirect
21+ github.com/lxc/lxd v0.0.0-20190314233831-41efd98813f3
pkgs/servers/gortr/default.nix+2−2
@@ -10,7 +10,7 @@ buildGoModule rec {
1010 rev = "v${version}";
1111 sha256 = "03wxlras2akk2ig8sxzs89nvbc6zr2kbcmjlqldjdfhs1rcg82ra";
1212 };
13− modSha256 = "157dpalfz3z1s3mxq63xy6lrkwzyy9xzmvn7wsxkwznjq4djv1a1";
13+ vendorSha256 = "1nwrzbpqycr4ixk8a90pgaxcwakv5nlfnql6hmcc518qrva198wp";
1414
1515 meta = with lib; {
1616 description = "The RPKI-to-Router server used at Cloudflare";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 maintainers = with maintainers; [ petabyteboy ];
2020 platforms = platforms.all;
2121 };
22−}
22+}
pkgs/servers/gotify/default.nix+1−1
@@ -21,7 +21,7 @@ buildGoModule rec {
2121 sha256 = import ./source-sha.nix;
2222 };
2323
24− modSha256 = import ./mod-sha.nix;
24+ vendorSha256 = "1ha0zgz1n07sd3if6823fi83j7yajysjdzfbwqk9rpsi6zv3cfh3";
2525
2626 postPatch = ''
2727 substituteInPlace app.go \
pkgs/servers/gotify/mod-sha.nixdeleted−1
@@ -1 +0,0 @@
1−"0zpdbj8a0akhzi1ian8zs6y7ymhlpcfy13q64xdlwc5w0286554r"
pkgs/servers/hasura/cli.nix+2−2
@@ -10,7 +10,7 @@ buildGoModule rec {
1010 goPackagePath = "github.com/hasura/graphql-engine/cli";
1111 subPackages = [ "cmd/hasura" ];
1212
13− modSha256 = "0bpb9r0n8n8c1p8sas3qanhvqw45rq8kygb4dmkfhj3d9vlgn6d2";
13+ vendorSha256 = "0a3mlkl00r680v8x3hy24ykggq5qm7k3101krlyfrb5y4karp75a";
1414
1515 buildFlagsArray = [''-ldflags=
1616 -X github.com/hasura/graphql-engine/cli/version.BuildVersion=${version}
@@ -30,4 +30,4 @@ buildGoModule rec {
3030 inherit (hasura-graphql-engine.meta) license homepage maintainers;
3131 description = "Hasura GraphQL Engine CLI";
3232 };
33−}
33+}
pkgs/servers/imgproxy/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 rev = "v${version}";
1212 };
1313
14− modSha256 = "02pj8ryis89dl4wjp2mvx6h5d0xdvskxdxiwarg7q0x23m9r7kpg";
14+ vendorSha256 = "069if1ifsmdn5hrwybiifhnq6xzmdccq85mzi9v98iii18pzfwqx";
1515
1616 nativeBuildInputs = [ pkg-config ];
1717
@@ -27,4 +27,4 @@ buildGoModule rec {
2727 license = licenses.mit;
2828 maintainers = with maintainers; [ paluh ];
2929 };
30−}
30+}
pkgs/servers/matterbridge/default.nix+2−2
@@ -5,7 +5,7 @@ buildGoModule rec {
55 version = "1.17.1";
66
77 goPackagePath = "github.com/42wim/matterbridge";
8− modSha256 = "1mqp8dlwa4p70iv9ksq3pxx5zbxdh56xyksvd98zk0vkrz4f1rij";
8+ vendorSha256 = null;
99
1010 src = fetchurl {
1111 url = "https://github.com/42wim/matterbridge/archive/v${version}.tar.gz";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 maintainers = with maintainers; [ ryantm ];
2020 platforms = platforms.unix;
2121 };
22−}
22+}
pkgs/servers/mautrix-whatsapp/default.nix+17−2
@@ -1,5 +1,13 @@
11{ stdenv, buildGoModule, fetchFromGitHub }:
22
3+let
4+webp = fetchFromGitHub {
5+ owner = "chai2010";
6+ repo = "webp";
7+ rev = "19c584e49a98c31e2138c82fd0108435cd80d182";
8+ sha256 = "1bqf1ifsfw5dwvnc9vl3dhp775qv5hgl34219lvnja0bj6pq5zks";
9+};
10+in
311buildGoModule {
412 pname = "mautrix-whatsapp-unstable";
513 version = "2020-04-21-1";
@@ -11,7 +19,14 @@ buildGoModule {
1119 sha256 = "1gayjyh0x0axc1xak38zkdhvx6fy8pwlniqsirqy2mwcgkkll9i5";
1220 };
1321
14− modSha256 = "1pddabyyz6q1snx9j7yv7dchasqa1y8nbpb5zrwmrpnwpns8kxl7";
22+ vendorSha256 = "0j397zyjs7v5q2jjd3l0wz4lh1fh45whgxjp7cwgc332ch9j2010";
23+
24+ overrideModAttrs = (_: {
25+ postBuild = ''
26+ rm -r vendor/github.com/chai2010/webp
27+ cp -r --reflink=auto ${webp} vendor/github.com/chai2010/webp
28+ '';
29+ });
1530
1631 meta = with stdenv.lib; {
1732 homepage = "https://github.com/tulir/mautrix-whatsapp";
@@ -19,4 +34,4 @@ buildGoModule {
1934 license = licenses.agpl3;
2035 maintainers = with maintainers; [ vskilet ma27 ];
2136 };
22−}
37+}
pkgs/servers/minio/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0yyq5j82rcl8yhn2jg8sjfxii6kzbrbmxvb05yiwv7p0q42ag5rn";
1212 };
1313
14− modSha256 = "1g5vwllxpiy4qlfhn3v5k6sn4g4qpbv0hpg32y1vi2q342lag116";
14+ vendorSha256 = "15yx5nkyf424v42glg3cx0gkqckdfv1xn25570s9cwf8zid0zlxd";
1515
1616 subPackages = [ "." ];
1717
@@ -28,4 +28,4 @@ buildGoModule rec {
2828 platforms = platforms.unix;
2929 license = licenses.asl20;
3030 };
31−}
31+}
pkgs/servers/monitoring/do-agent/default.nix+2−2
@@ -16,7 +16,7 @@ buildGoModule rec {
1616 -X main.version=${version}
1717 '';
1818
19− modSha256 = "164bwqg996097db399j7lar6gj9xpshjdmyapvzg7zh655xlkf3d";
19+ vendorSha256 = null;
2020
2121 meta = with lib; {
2222 description = "DigitalOcean droplet system metrics agent";
@@ -30,4 +30,4 @@ buildGoModule rec {
3030 maintainers = with maintainers; [ yvt ];
3131 platforms = platforms.linux;
3232 };
33−}
33+}
pkgs/servers/monitoring/mtail/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "04hzr0cw0dq7hmqvp1lhm5wl239yrxmcpsl25sqk74wy06cgrrqd";
1212 };
1313
14− modSha256 = "0h3q1qd9a01wlfkk0yv74a4bk5nilpsppq522cv7kl8ysnrjh5yi";
14+ vendorSha256 = "1km3ldqz35lpkglp9n332vxr38xxfqyij1fi2qq0agyyydbvakj5";
1515 subPackages = [ "cmd/mtail" ];
1616
1717 preBuild = ''
@@ -27,4 +27,4 @@ buildGoModule rec {
2727 homepage = "https://github.com/google/mtail";
2828 description = "Tool for extracting metrics from application logs";
2929 };
30−}
30+}
pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 rev = "v${version}";
1212 };
1313
14− modSha256 = "1ag1k0z35zkazaxj8hh2wxfj73xg63xdybfm1565il2vxs5986dh";
14+ vendorSha256 = "1dqpa180pbdi2gcmp991d4cry560mx5rm5l9x065s9n9gnd38hvl";
1515
1616 meta = with stdenv.lib; {
1717 inherit (src.meta) homepage;
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.asl20;
2020 maintainers = with maintainers; [ willibutz globin ma27 ];
2121 };
22−}
22+}
pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 rev = "3b33400d24abcfdc07dc31c15ca5ba7b82de444f";
1212 };
1313
14− modSha256 = "1cqjn6j3dfq51ssjx0qrajprlac1h0lb1r4af44lfpigzmrfyi07";
14+ vendorSha256 = "0i5x4d3ra0s41knmybbg8gnjxgraxkid6y3gfkjwa65xcbp7hr7q";
1515
1616 meta = with stdenv.lib; {
1717 inherit (src.meta) homepage;
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.bsd3;
2020 maintainers = with maintainers; [ mmilata ];
2121 };
22−}
22+}
pkgs/servers/monitoring/prometheus/varnish-exporter.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1viiiyvhpr7cnf8ykaaq4fzgg9xvn4hnlhv7cagy3jkjlmz60947";
1212 };
1313
14− modSha256 = "1vb720axjziiqcba4bdi528r6mc97ci0pfsk0ny50isrkh0s3jzz";
14+ vendorSha256 = "1h9iz3sbz02hb8827hcssqlfg2ag3ymq38siffw9wzajslzhp9sx";
1515
1616 nativeBuildInputs = [ makeWrapper ];
1717
@@ -28,4 +28,4 @@ buildGoModule rec {
2828 license = lib.licenses.mit;
2929 maintainers = with lib.maintainers; [ MostAwesomeDude willibutz ];
3030 };
31−}
31+}
pkgs/servers/monitoring/sensu-go/default.nix+2−2
@@ -18,7 +18,7 @@ let
1818
1919 inherit subPackages postInstall;
2020
21− modSha256 = "02h4cav6ivzs3z0qakwxzf5lfy6hzax5c0i2icp0qymqc2789npw";
21+ vendorSha256 = "03lkra5vf07zicd2aipvmkrda56ys5swwj6lq5hnp324ndajfcya";
2222
2323 buildFlagsArray = let
2424 versionPkg = "github.com/sensu/sensu-go/version";
@@ -66,4 +66,4 @@ in
6666 pname = "sensu-go-agent";
6767 subPackages = [ "cmd/sensu-agent" ];
6868 };
69−}
69+}
pkgs/servers/monitoring/telegraf/default.nix+2−2
@@ -17,7 +17,7 @@ buildGoModule rec {
1717 sha256 = "17lzz0f9vzyfwr3kgwg6i6361hqzq54jnaaw9rdc132xppdx03nr";
1818 };
1919
20− modSha256 = "1q7il1x1pfyz15z23cs0kk7zyacn6b3y28b1q52bqi30l1x8bdbp";
20+ vendorSha256 = "05nj99hl5f5l0a2aswy19wmbm94hd1h03r227gmn419dkzc5hpah";
2121
2222 buildFlagsArray = [ ''-ldflags=
2323 -w -s -X main.version=${version}
@@ -31,4 +31,4 @@ buildGoModule rec {
3131 homepage = "https://www.influxdata.com/time-series-platform/telegraf/";
3232 maintainers = with maintainers; [ mic92 roblabla foxit64 ];
3333 };
34−}
34+}
pkgs/servers/monitoring/thanos/default.nix+2−2
@@ -10,7 +10,7 @@ buildGoModule rec {
1010 sha256 = "10xscm9h2krha66v96v2q85fynnxfizjcc47h7yz4xhjwvb5dgz2";
1111 };
1212
13− modSha256 = "0c8gc4qzdazxxnabfms63df8vlf2iy6iy0jrm710x76m4vm6mrbj";
13+ vendorSha256 = "126rghnyjpykvjg9sr4kwpskc13qqafxgfn9ffykwc4jjz8vc07q";
1414
1515 subPackages = "cmd/thanos";
1616
@@ -30,4 +30,4 @@ buildGoModule rec {
3030 maintainers = with maintainers; [ basvandijk ];
3131 platforms = platforms.unix;
3232 };
33−}
33+}
pkgs/servers/nosql/influxdb/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "111n36xifmd644xp80imqxx61nlap6fdwx1di2qphlqb43z99jrq";
1212 };
1313
14− modSha256 = "07v4ijblvl2zq049fdz5vdfhk6d3phrsajhnhwl46x02dbdzgj13";
14+ vendorSha256 = "097x3z1fhdl5s3ni2qzbqxqr60l6lqcrbikq20fs052dp287q0sp";
1515
1616 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
1717
@@ -23,4 +23,4 @@ buildGoModule rec {
2323 homepage = "https://influxdata.com/";
2424 maintainers = with maintainers; [ offline zimbatm ];
2525 };
26−}
26+}
pkgs/servers/sql/dolt/default.nix+2−2
@@ -13,7 +13,7 @@ buildGoModule rec {
1313
1414 modRoot = "./go";
1515 subPackages = [ "cmd/dolt" "cmd/git-dolt" "cmd/git-dolt-smudge" ];
16− modSha256 = "1fx830dif9cq2rvigdbqbc3vmmq01ywj9b095adbrwddvay8m8si";
16+ vendorSha256 = "1kjh252p91yxq5mi0igamkwlsr50lij24wsp2ilgz6ksv3ijzfr1";
1717
1818 meta = with lib; {
1919 description = "Relational database with version control and CLI a-la Git.";
@@ -22,4 +22,4 @@ buildGoModule rec {
2222 maintainers = with maintainers; [ danbst ];
2323 platforms = platforms.linux ++ platforms.darwin;
2424 };
25−}
25+}
pkgs/servers/tailscale/default.nix+9−2
@@ -18,7 +18,14 @@ buildGoModule rec {
1818 CGO_ENABLED = 0;
1919
2020 goPackagePath = "tailscale.com";
21− modSha256 = "1xgdhbck3pkix10lfshzdszrv6d3p0hbx8jdjvswz7jjd0vzm4x1";
21+ overrideModAttrs = (_: {
22+ preBuild = ''
23+ rm ipn/e2e_test.go
24+ rm control/controlclient/auto_test.go
25+ rm control/controlclient/direct_test.go
26+ '';
27+ });
28+ vendorSha256 = "1v90lbwgrc2m4kvpglf2jykrm8rry3pbhqqbc3mcysrzmqlw84yl";
2229 subPackages = [ "cmd/tailscale" "cmd/tailscaled" ];
2330
2431 postInstall = ''
@@ -34,4 +41,4 @@ buildGoModule rec {
3441 license = licenses.bsd3;
3542 maintainers = with maintainers; [ danderson mbaillie ];
3643 };
37−}
44+}
pkgs/servers/traefik/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0byi2h1lma95l77sdj8jkidmwb12ryjqwxa0zz6vwjg07p5ps3k4";
1212 };
1313
14− modSha256 = "17imp24abfgh75g8161daknzqzk2m19q9d1mij6487046lk75hqz";
14+ vendorSha256 = "0rbwp0cxqfv4v5sii6kavdj73a0q0l4fnvxincvyy698qzx716kf";
1515 subPackages = [ "cmd/traefik" ];
1616
1717 nativeBuildInputs = [ go-bindata ];
@@ -34,4 +34,4 @@ buildGoModule rec {
3434 license = licenses.mit;
3535 maintainers = with maintainers; [ vdemeester ];
3636 };
37−}
37+}
pkgs/servers/web-apps/shiori/default.nix+2−2
@@ -4,7 +4,7 @@ buildGoModule rec {
44 pname = "shiori";
55 version = "1.5.0";
66
7− modSha256 = "1z6q5lv0j433p8lc3nxlw1rds5x1kvs1vzl63jf3disxw7ppyai3";
7+ vendorSha256 = "1ik5faysc880kz7nymvbmjj006l1fsqfy76036szwzg314v78643";
88
99 src = fetchFromGitHub {
1010 owner = "go-shiori";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.mit;
2020 maintainers = with maintainers; [ minijackson ];
2121 };
22−}
22+}
pkgs/shells/elvish/default.nix+2−2
@@ -18,7 +18,7 @@ buildGoModule rec {
1818 sha256 = "0lz9lf1swrn67kymcp2wh67lh3c0ifqm9035gpkd3zynlq3wzqfm";
1919 };
2020
21− modSha256 = "13x4wbfj8049ygm3zbgzyr2bm4sq4x6xddrxx6shr8fydlcf1g8v";
21+ vendorSha256 = null;
2222
2323 meta = with stdenv.lib; {
2424 description = "A friendly and expressive command shell";
@@ -36,4 +36,4 @@ buildGoModule rec {
3636 passthru = {
3737 shellPath = "/bin/elvish";
3838 };
39−}
39+}
pkgs/shells/zsh/antibody/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0m7c879b3f402av20jsybq2dhhckbknlvn2n1csp7xmcz4zcyn1n";
1212 };
1313
14− modSha256 = "0yny1p8vll1wdqdlwyxf9m4kd5njdm7nq527blqqa680zf2k4h8b";
14+ vendorSha256 = "072kxr68p9f58w2q98fjcn4wzd5szy5l5sz8sh4ssapljvic2lam";
1515
1616 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = licenses.mit;
2222 maintainers = with maintainers; [ filalex77 worldofpeace ];
2323 };
24−}
24+}
pkgs/shells/zsh/zsh-history/default.nix+2−2
@@ -13,7 +13,7 @@ buildGoModule rec {
1313
1414 nativeBuildInputs = [ installShellFiles ];
1515
16− modSha256 = "0f10b86gyn7m7lw43c8y1m30mdg0i092a319v3cb2qj05jb9vn42";
16+ vendorSha256 = "13rc1afds5xg30faqz35haha4kxg73b5nvjirbrkc6kna0vhb54z";
1717 goPackagePath = "github.com/b4b4r07/history";
1818
1919 postInstall = ''
@@ -33,4 +33,4 @@ buildGoModule rec {
3333 passthru.tests = {
3434 zsh-history-shell-integration = nixosTests.zsh-history;
3535 };
36−}
36+}
pkgs/tools/admin/aws-vault/default.nix+2−2
@@ -10,7 +10,7 @@ buildGoModule rec {
1010 sha256 = "04dyibcaijv5011laycf39m4gvprvvsn5zkxslyih1kqd170w3wg";
1111 };
1212
13− modSha256 = "1d3hjfmfmlpw2scfyn597zkzz864w97p0wrsxjp49m9mi0pgmhq9";
13+ vendorSha256 = "0jlraq480llamns6yw8yjkzxsndyqiyzy120djni8sw5h0bz65j7";
1414 subPackages = [ "." ];
1515
1616 # set the version. see: aws-vault's Makefile
@@ -26,4 +26,4 @@ buildGoModule rec {
2626 license = licenses.mit;
2727 maintainers = with maintainers; [ zimbatm ];
2828 };
29−}
29+}
pkgs/tools/admin/awsweeper/default.nix+8−2
@@ -1,9 +1,15 @@
1−{ lib, buildGoModule, fetchFromGitHub }:
1+{ lib, buildGoModule, fetchurl, fetchFromGitHub }:
22
33buildGoModule rec {
44 pname = "awsweeper";
55 version = "0.7.0";
66
7+ # Requires go generate to be run with mockgen, but doesn't check in the results.
8+ patches = fetchurl {
9+ url = "https://raw.githubusercontent.com/c00w/patches/master/awskeeper.patch";
10+ sha256 = "0dz553ffxc37m2iwygrbhxf7pm91hxdriic8a1gjf8q3nyn13npl";
11+ };
12+
713 src = fetchFromGitHub {
814 owner = "cloudetc";
915 repo = pname;
@@ -11,7 +17,7 @@ buildGoModule rec {
1117 sha256 = "1ybrrpnp6rh7rcwihww43cvhfhzzyy51rdk1hwy9ljpkg37k4y28";
1218 };
1319
14− modSha256 = "07zz6wf9cq3wylihi9fx0rd85iybnq5z5c9gqw1lhpvqcrad4491";
20+ vendorSha256 = "0hnpb1xp135z2qpn1b6xad59739hffhs8dfpr3n5drmrvajpn4xp";
1521
1622 meta = with lib; {
1723 description = "A tool to clean out your AWS account";
pkgs/tools/admin/berglas/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0y393g36h35zzqyf5b10j6qq2jhvz83j17cmasnv6wbyrb3vnn0n";
1212 };
1313
14− modSha256 = "0m2bqx102lf6nihdjbl8a08xcwi80rawvh91j1cav0njm9w5vmmm";
14+ vendorSha256 = null;
1515
1616 meta = with stdenv.lib; {
1717 description = "A tool for managing secrets on Google Cloud";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.asl20;
2020 platforms = platforms.unix;
2121 };
22−}
22+}
pkgs/tools/admin/certigo/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0siwbxxzknmbsjy23d0lvh591ngabqhr2g8mip0siwa7c1y7ivv4";
1212 };
1313
14− modSha256 = "1i5n5yh6nvv2i2nm60vqy1gngj8p5w6ma5fcwmp7bl4jxjrzbi83";
14+ vendorSha256 = "1l6ajfl04rfbssvijgd5jrppmqc5svfrswdx01x007lr8rvdfd94";
1515
1616 meta = with stdenv.lib; {
1717 description = "A utility to examine and validate certificates in a variety of formats";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.asl20;
2020 maintainers = [ maintainers.marsam ];
2121 };
22−}
22+}
pkgs/tools/admin/clair/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "14dh9iv2g138rivvfk135m3l90kk6c1ln1iqxhbi7s99h1jixbqw";
1212 };
1313
14− modSha256 = "0rgkrid58kji39nlmiii95r8shbzr6dwalj5m7qwxy5w1rcaljr5";
14+ vendorSha256 = "0x31n50vd8660z816as6kms5dkv87b0mhblccpkvd9cbvcv2n37a";
1515
1616 nativeBuildInputs = [ makeWrapper ];
1717
@@ -26,4 +26,4 @@ buildGoModule rec {
2626 license = licenses.asl20;
2727 maintainers = with maintainers; [ marsam ];
2828 };
29−}
29+}
pkgs/tools/admin/eksctl/default.nix+1−1
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0xlr7hsncih4nzydi6sphp7j7k82cbhmi7jb0sd954i8kzl3sc1q";
1212 };
1313
14− modSha256 = "0iw5za1fc9hsbc3fhhj3l276064vfdjqsad9c3c54y7b9rjgcqrv";
14+ vendorSha256 = "14d9hl01z7ixp1wa8kp1zs0z1p3pvz6hkp49z582nqllpb2xjmkx";
1515
1616 subPackages = [ "cmd/eksctl" ];
1717
pkgs/tools/admin/iamy/default.nix+2−2
@@ -13,7 +13,7 @@ buildGoModule rec {
1313 sha256 = "1fypc6yjnhlpk7zhb2lvah2ikh2zji9sll55rqjbr3i4j02h484z";
1414 };
1515
16− modSha256 = "0akak573zvz3xg5d7vf0ch2mrmj1jkzcdc29v3kn43f7944c2wcl";
16+ vendorSha256 = "0c4g1zr0wl118g41hqri0vwvfin39yvgs214w3spw8ggjcj6bzph";
1717
1818 buildFlagsArray = [''-ldflags=
1919 -X main.Version=v${version} -s -w
@@ -25,4 +25,4 @@ buildGoModule rec {
2525 license = licenses.mit;
2626 maintainers = with maintainers; [ suvash ];
2727 };
28−}
28+}
pkgs/tools/admin/lego/default.nix+1−1
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 hash = "sha256-hjH1TBw6GHYNI9JSBOzdyEtJmp8NhlwNYydGZwsjAg0=";
1212 };
1313
14− modSha256 = "sha256-+PJRaDdZqVO6D9SXojlr8JXn++pL18HOHFdaiUEalw8=";
14+ vendorSha256 = "14453iiya6algkympyvwm03qgjcwk79z8bbrij7qhnp52qfrbmrp";
1515 subPackages = [ "cmd/lego" ];
1616
1717 buildFlagsArray = [
pkgs/tools/audio/mpd-mpris/default.nix+2−3
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1cr5j2z2ynj1hwkjzi5amcg59vmgazsci41v6vpsj119g7psjmzm";
1212 };
1313
14− modSha256 = "1a95kfy8w952269x4llbl0afyxr5fjkg30mxsn81zdh5wr8gabwh";
14+ vendorSha256 = "108yjymp64iqx1b2wqjbkmbm2w199wq46g7hrmqhcziv6f4aqljp";
1515
1616 subPackages = [ "cmd/${pname}" ];
1717
@@ -29,5 +29,4 @@ buildGoModule rec {
2929 maintainers = with maintainers; [ doronbehar ];
3030 platforms = platforms.linux;
3131 };
32−}
33−
32+}
pkgs/tools/backup/wal-g/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1hslhs9i4wib6c74gdq9yail958ff1y11pymjww2xr84wkwd9v7i";
1212 };
1313
14− modSha256 = "0kwl5gwc5gc0cq2gldg13nvswp9wd90xiv1qb3g8yxcczywkpmrm";
14+ vendorSha256 = "0jjr33k27k6h27sa01ipz0aydch3i9klknqb3yq8f048zkb54gv8";
1515
1616 buildInputs = [ brotli ];
1717
@@ -31,4 +31,4 @@ buildGoModule rec {
3131 description = "An archival restoration tool for PostgreSQL";
3232 maintainers = [ stdenv.lib.maintainers.ocharles ];
3333 };
34−}
34+}
pkgs/tools/misc/3mux/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "02ry066psvlqdyhimci7nskw4sfb70dw5z7ag7s7rz36gmx1vnmr";
1212 };
1313
14− modSha256 = "1ag9lx8xcp2z9lrg404914zin45n8f4s08365yk71q5vyiwxjj3i";
14+ vendorSha256 = "1hjzpg3q4znvgzk0wbl8rq6cq877xxdsf950bcsks92cs8386847";
1515
1616 meta = with stdenv.lib; {
1717 description = "Terminal multiplexer inspired by i3";
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 # TODO: fix modules build on darwin
2222 broken = stdenv.isDarwin;
2323 };
24−}
24+}
pkgs/tools/misc/chezmoi/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1b8y0wq3myhvjdnwl0i4x85iil7i7kmsjajvbw1a47afm83jkbaw";
1212 };
1313
14− modSha256 = "147bbhbcf81i6vyiv9q8abx5qw44fx3qw5v5f6zjnkfajdqlvbsx";
14+ vendorSha256 = "1za47n08iamhfl4ky928rixgadflmz86vnmnwbczd167bdndh5rq";
1515
1616 buildFlagsArray = [
1717 "-ldflags=-s -w -X main.version=${version} -X main.builtBy=nixpkgs"
@@ -34,4 +34,4 @@ buildGoModule rec {
3434 maintainers = with maintainers; [ jhillyerd ];
3535 platforms = platforms.all;
3636 };
37−}
37+}
pkgs/tools/misc/clipman/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1lf5fbzplyc1mpdqgfwbrn8m5568vhjf48580fvvfgbhz6zcil8n";
1212 };
1313
14− modSha256 = "1sim3x794kj3wdw0g432zbgh1cimdmmg1hjgynh9jgm3y8w9q7ij";
14+ vendorSha256 = "18jw4z0lcrh00yjr3qdkgvlrpfwqbsm0ncz7fp1h72pzkh41byv7";
1515
1616 nativeBuildInputs = [ makeWrapper ];
1717
@@ -27,4 +27,4 @@ buildGoModule rec {
2727 description = "A simple clipboard manager for Wayland";
2828 platforms = platforms.linux;
2929 };
30−}
30+}
pkgs/tools/misc/docui/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0jya0wdp8scjmsr44krdbbb8q4gplf44gsng1nyn12a6ldqzayxl";
1212 };
1313
14− modSha256 = "1wyx05kk4f41mgvwnvfc9xk7vd3x96cbn5xb5ph7p443f70ydnak";
14+ vendorSha256 = "1ggdczvv03lj0g6cq26vrk1rba6pk0805n85w9hkbjx9c4r3j577";
1515
1616 meta = with stdenv.lib; {
1717 description = "TUI Client for Docker";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 platforms = platforms.linux ++ platforms.darwin;
2121 maintainers = with maintainers; [ aethelz ];
2222 };
23−}
23+}
pkgs/tools/misc/fzf/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0piz1dzczcw1nsff775zicvpm6iy0iw0v0ba7rj7i0xqv9ni1prw";
1212 };
1313
14− modSha256 = "16bb0a9z49jqhh9lmq8rvl7x9vh79mi4ygkb9sm04g41g5z6ag1s";
14+ vendorSha256 = "1c2iz28hjrw9rig9a6r27wd8clycdhi8fgs3da91c63w4qi140zm";
1515
1616 outputs = [ "out" "man" ];
1717
@@ -63,4 +63,4 @@ buildGoModule rec {
6363 maintainers = with maintainers; [ filalex77 ma27 ];
6464 platforms = platforms.unix;
6565 };
66−}
66+}
pkgs/tools/misc/gotify-cli/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "131gs6xzfggnrzq5jgyky23zvcmhx3q3hd17xvqxd02s2i9x1mg4";
1212 };
1313
14− modSha256 = "1lrsg33zd7m24za2gv407hz02n3lmz9qljfk82whlj44hx7kim1z";
14+ vendorSha256 = "1lhhsf944gm1p6qxn05g2s3hdnra5dggj7pdrdq6qr6r2xg7f5qh";
1515
1616 postInstall = ''
1717 mv $out/bin/cli $out/bin/gotify
@@ -23,4 +23,4 @@ buildGoModule rec {
2323 description = "A command line interface for pushing messages to gotify/server.";
2424 maintainers = with maintainers; [ ma27 ];
2525 };
26−}
26+}
pkgs/tools/misc/kepubify/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "13d3fl53v9pqlm555ly1dm9vc58xwkyik0qmsg173q78ysy2p4q5";
1212 };
1313
14− modSha256 = "0jz8v4rnwm5zbxxp49kv96wm4lack6prwyhcrqwsrm79dr9yjcxf";
14+ vendorSha256 = "04qpxl4j6v6w25i7r6wghd9xi7jzpy7dynhs9ni35wflq0rlczax";
1515
1616 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
1717
@@ -23,4 +23,4 @@ buildGoModule rec {
2323 license = licenses.mit;
2424 maintainers = with maintainers; [ zowoq ];
2525 };
26−}
26+}
pkgs/tools/misc/lf/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0kl9yrgph1i0jbxhlg3k0411436w80xw1s8dzd7v7h2raygkb4is";
1212 };
1313
14− modSha256 = "1c6c6qg8yrhdhqsnqj3jw3x2hi8vrhfm47cp9xlkfnjfrz3nk6jp";
14+ vendorSha256 = "1zb2z3c2w4gnq9cjczg1y7r7jg4mlrm2hsb12dqd9w8mh44rvr37";
1515
1616 nativeBuildInputs = [ installShellFiles ];
1717
@@ -47,4 +47,4 @@ buildGoModule rec {
4747 platforms = platforms.unix;
4848 maintainers = with maintainers; [ primeos ];
4949 };
50−}
50+}
pkgs/tools/misc/libgen-cli/default.nix+2−2
@@ -10,7 +10,7 @@ buildGoModule rec {
1010 sha256 = "1lfsnyzin2dqhwhz6phms6yipli88sqiw55ls18dfv7bvx30sqlp";
1111 };
1212
13− modSha256 = "1k16zjb7p65g72hr9vsk38jhpsy1yclm7fjgq47qy6jwjd44w1bi";
13+ vendorSha256 = "1j45h8p13xfz0qy1nrddlx1xzbr5vqxd3q76hbb0v60636izfk0r";
1414
1515 subPackages = [ "." ];
1616
@@ -27,4 +27,4 @@ buildGoModule rec {
2727 platforms = platforms.all;
2828 maintainers = with maintainers; [ zaninime ];
2929 };
30−}
30+}
pkgs/tools/misc/mutagen/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0ykzrxlllip4wvhd9rja5bcr2m72695fjj2q1scwn8ri6jcgfa19";
1212 };
1313
14− modSha256 = "1r6b4y6civk75if6nljl66pgv5qm7x05qqby1anf7s7cz7d1rc3g";
14+ vendorSha256 = "0szs9yc49fyh55ra1wf8zj76kdah0x49d45cgivk3gqh2hl17j6l";
1515
1616 subPackages = [ "cmd/mutagen" "cmd/mutagen-agent" ];
1717
@@ -22,4 +22,4 @@ buildGoModule rec {
2222 maintainers = [ maintainers.marsam ];
2323 license = licenses.mit;
2424 };
25−}
25+}
pkgs/tools/misc/neo-cowsay/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0c6lygdqi26mczij41sn8ckc3g6qaakkkh3iasf10a4d07amxci1";
1212 };
1313
14− modSha256 = "063ds35dzv8m4bjk7v1q3f6jwyp7j5jrkrhrl41z1c1mbzzkagkq";
14+ vendorSha256 = "1clar59x2dvn7yj4fbylby9nrzy8kdixi48hkbmrv8g5l8n0wdl2";
1515
1616 subPackages = [ "cmd/cowsay" "cmd/cowthink" ];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = with licenses; [artistic1 /* or */ gpl3];
2222 maintainers = with maintainers; [ filalex77 ];
2323 };
24−}
24+}
pkgs/tools/misc/pg_flame/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1a03vxqnga83mhjp7pkl0klhkyfaby7ncbwm45xbl8c7s6zwhnw2";
1212 };
1313
14− modSha256 = "0j7qpvji546z0cfjijdd66l0vsl0jmny6i1n9fsjqjgjpwg26naq";
14+ vendorSha256 = "1rkx20winh66y2m7i7q13jpr83044i2d1pfd5p5l5kkpsix5mra5";
1515
1616 meta = with lib; {
1717 description = "Flamegraph generator for Postgres EXPLAIN ANALYZE output";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.asl20;
2020 maintainers = with maintainers; [ filalex77 ];
2121 };
22−}
22+}
pkgs/tools/misc/pgcenter/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0p8ck4s5jj53nc638darhwbylcsslfmfz72bwy6wxby9iqi9kq6b";
1212 };
1313
14− modSha256 = "0kassq52v07zmffs6l066g0d3kfv6wmrh9g5cgk79bmyq13clqjj";
14+ vendorSha256 = "1mzvpr12qh9668iz97p62zl4zhlrcyfgwr4a9zg9irj585pkb5x2";
1515
1616 meta = with stdenv.lib; {
1717 homepage = "https://pgcenter.org/";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.bsd3;
2020 maintainers = [ maintainers.marsam ];
2121 };
22−}
22+}
pkgs/tools/misc/pgmetrics/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0f7pjagr3zcqmbhmk446j6n7nanyhvyq4rn68f5wljl9g68ni7sj";
1212 };
1313
14− modSha256 = "13a969yki47gw4b3mwhsgl0x53xylmflsykcs63f8pmigckw7jac";
14+ vendorSha256 = "16x33fmh4q993rw0jr65337yimska4fwgyyw3kmq84q0x28a3zg5";
1515
1616 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = licenses.asl20;
2222 maintainers = [ maintainers.marsam ];
2323 };
24−}
24+}
pkgs/tools/misc/pistol/default.nix+2−3
@@ -15,8 +15,7 @@ buildGoModule rec {
1515 sha256 = "1d9c1bhidh781dis4427wramfrla4avqw9y2bmpjp81cqq3nc27d";
1616 };
1717
18− modSha256 = "0r062nka72ah2nb2gf8dfrrj4sxadkykcqjzkp4c9vwk93mhw41k";
19− buildFlagsArray = [ "-ldflags=-s -w -X main.Version=${version}" ];
18+ vendorSha256 = "1f780vhxw0brvnr8hhah4sf6ms8spar29rqmy1kcqf9m75n94g56";
2019
2120 subPackages = [ "cmd/pistol" ];
2221
@@ -30,4 +29,4 @@ buildGoModule rec {
3029 license = licenses.mit;
3130 maintainers = with maintainers; [ doronbehar ];
3231 };
33−}
32+}
pkgs/tools/misc/powerline-go/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "135j18d53nhg6adjd2hax067c5f1py9fyprzfcr3plsxnaki2hrx";
1212 };
1313
14− modSha256 = "0mz1qrwar9cgrhrgw4z3gwhjj62bnfnn59ji31zkyvwlc1mqh9an";
14+ vendorSha256 = "0dkgp9vlb76la0j439w0rb548qg5v8648zryk3rqgfhd4qywlk11";
1515
1616 meta = with stdenv.lib; {
1717 description = "A Powerline like prompt for Bash, ZSH and Fish";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 platforms = platforms.unix;
2020 maintainers = with maintainers; [ sifmelcara ];
2121 };
22−}
22+}
pkgs/tools/misc/up/default.nix+4−2
@@ -4,6 +4,8 @@ buildGoModule rec {
44 pname = "up";
55 version = "0.3.2";
66
7+ patches = [ ./gomod.patch ];
8+
79 src = fetchFromGitHub {
810 owner = "akavel";
911 repo = "up";
@@ -11,7 +13,7 @@ buildGoModule rec {
1113 sha256 = "1psixyymk98z52yy92lwb75yfins45dw6rif9cxwd7yiascwg2if";
1214 };
1315
14− modSha256 = "0nfs190rzabphhhyacypz3ic5c4ajlqpx9jiiincs0vxfkmfwnjd";
16+ vendorSha256 = "1h3w4i7dyh6yagqmdclvflfq6fx0z880jdnpf28assv7fxd9rjsx";
1517
1618 meta = with lib; {
1719 description = "Ultimate Plumber is a tool for writing Linux pipes with instant live preview";
@@ -19,4 +21,4 @@ buildGoModule rec {
1921 maintainers = with maintainers; [ ma27 ];
2022 license = licenses.asl20;
2123 };
22−}
24+}
pkgs/tools/misc/up/gomod.patchnew file+23
@@ -0,0 +1,23 @@
1+diff --git a/go.mod b/go.mod
2+index ecbfe90..56a1409 100644
3+--- a/go.mod
4++++ b/go.mod
5+@@ -1,11 +1,14 @@
6+ module github.com/akavel/up
7+
8++go 1.14
9++
10+ require (
11+- github.com/gdamore/encoding v0.0.0-20151215212835-b23993cbb635
12++ github.com/gdamore/encoding v0.0.0-20151215212835-b23993cbb635 // indirect
13+ github.com/gdamore/tcell v0.0.0-20180924055237-493f3b46b3c2
14+- github.com/lucasb-eyer/go-colorful v0.0.0-20170903184257-231272389856
15++ github.com/lucasb-eyer/go-colorful v0.0.0-20170903184257-231272389856 // indirect
16+ github.com/mattn/go-isatty v0.0.3
17+- github.com/mattn/go-runewidth v0.0.2
18++ github.com/mattn/go-runewidth v0.0.2 // indirect
19+ github.com/spf13/pflag v1.0.3
20+- golang.org/x/text v0.0.0-20171214130843-f21a4dfb5e38
21++ golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 // indirect
22++ golang.org/x/text v0.0.0-20171214130843-f21a4dfb5e38 // indirect
23+ )
pkgs/tools/networking/amass/default.nix+1−1
@@ -14,7 +14,7 @@ buildGoModule rec {
1414 sha256 = "05rh61dx4f9kv5p8sahhwwiyivwq438fl30j9d97i4sagvb5jvvm";
1515 };
1616
17− modSha256 = "1k7yd2lh6hwz3qm6ywrlr1qw0asqwdgrpj594v1gvav426yqyr6s";
17+ vendorSha256 = "1f8za3z5pv1pznbd91fk5j4y8qg93qk5zvnchjl7inyirciawdf6";
1818
1919 outputs = [ "out" "wordlists" ];
2020
pkgs/tools/networking/cassowary/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0p5vcs25h5nj36dm9yjmdjymcq0zldm3zlqfppxcjx862h48k8zj";
1212 };
1313
14− modSha256 = "1iylnnmj5slji89pkb3shp4xqar1zbpl7bzwddbzpp8y52fmsv1c";
14+ vendorSha256 = "1m5jaqf5jrib415k0i7w6rf5bjjwfn572wk94jwfpwjcbbvh8fck";
1515
1616 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
1717
@@ -22,4 +22,4 @@ buildGoModule rec {
2222 maintainers = with maintainers; [ hugoreeves ];
2323 platforms = platforms.unix;
2424 };
25−}
25+}
pkgs/tools/networking/clash/default.nix+2−2
@@ -12,7 +12,7 @@ buildGoModule rec {
1212 };
1313
1414 goPackagePath = "github.com/Dreamacro/clash";
15− modSha256 = "113ynl1f01ihmbc376rb421rrjlxxbc8p9fhxrvpxcsm10rjky8w";
15+ vendorSha256 = "0nh3cn31p7yhnhjzqp84dnhzy3hag253bjp70w8q03lw7mkhdgz3";
1616
1717 buildFlagsArray = [
1818 "-ldflags="
@@ -26,4 +26,4 @@ buildGoModule rec {
2626 maintainers = with maintainers; [ contrun filalex77 ];
2727 platforms = platforms.all;
2828 };
29−}
29+}
pkgs/tools/networking/corerad/default.nix+3−1
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1r9kvz1ylrnfc7y5c4knqhx6xngh1p8j1axb8bd7h7p51c4i7jz2";
1212 };
1313
14− modSha256 = "00xisa4l90f0digb1jfd2w616r080m7yp01y1rb83r8k147z5d2v";
14+ vendorSha256 = "0ncwf197dx6mqzg69mnyp0iyad585izmydm0yj8ikd0y8ngpx7a3";
1515
1616 buildFlagsArray = ''
1717 -ldflags=
@@ -19,6 +19,8 @@ buildGoModule rec {
1919 -X github.com/mdlayher/corerad/internal/build.linkVersion=v${version}
2020 '';
2121
22+ deleteVendor = true;
23+
2224 meta = with stdenv.lib; {
2325 homepage = "https://github.com/mdlayher/corerad";
2426 description = "CoreRAD extensible and observable IPv6 NDP RA daemon";
pkgs/tools/networking/croc/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0kwpn1nv93f8swzc70j8srddqz7qb33pxc9nhqrd92jhcl4cc7iv";
1212 };
1313
14− modSha256 = "1wcnf3sd4hkfm38q2z03ixys1hbscay5rsac49ng4kabqjh7rxhg";
14+ vendorSha256 = "1vl5yz3z5z30rxnnxy74g2m5025vbisqyv31nc21kxdfrdqrwp6c";
1515
1616 subPackages = [ "." ];
1717
@@ -34,4 +34,4 @@ buildGoModule rec {
3434 - Does not require a server or port-forwarding
3535 '';
3636 };
37−}
37+}
pkgs/tools/networking/curlie/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "09v8alrbw6qva3q3bcqxnyjm7svagfxqvhdff7cqf5pbmkxnhln9";
1212 };
1313
14− modSha256 = "18nwq99vv3nbdwfilfn8v64mn58jviwybi93li0lcg7779nxab3d";
14+ vendorSha256 = "1mxgf004czf65a2mv99gfp27g98xhllmfcz4ynfv66nfkbfz6a8n";
1515
1616 meta = with lib; {
1717 description = "Curlie is a frontend to curl that adds the ease of use of httpie, without compromising on features and performance";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 maintainers = with maintainers; [ ma27 ];
2020 license = licenses.mit;
2121 };
22−}
22+}
pkgs/tools/networking/dnsproxy/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0nsj75aw5dym1pzn18p6fzh17vcryz1xs4xly6ga79dkpyijr9j8";
1212 };
1313
14− modSha256 = "1m8565hkn981b6xld8jyrbxay48ww8lzr94kgakx0rg5548kd7v5";
14+ vendorSha256 = null;
1515
1616 meta = with stdenv.lib; {
1717 description = "Simple DNS proxy with DoH, DoT, and DNSCrypt support";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 maintainers = with maintainers; [ contrun ];
2121 platforms = platforms.all;
2222 };
23−}
23+}
pkgs/tools/networking/frp/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1z914p20n3i1bf4hx5iq2fylx1s49knb70cbg53ji2n7nrm1q33r";
1212 };
1313
14− modSha256 = "1v90w5grc0vjpcp0m56d73zi0qnbswgz1rcvcwrjfa3rwqhigbal";
14+ vendorSha256 = "0pi661mb5vwj16wwxnyx9b0ic7gzby6qfs3y4w00agn6sn5nahx2";
1515
1616 subPackages = [ "cmd/frpc" "cmd/frps" ];
1717
@@ -28,4 +28,4 @@ buildGoModule rec {
2828 maintainers = with maintainers; [ filalex77 ];
2929 platforms = platforms.all;
3030 };
31−}
31+}
pkgs/tools/networking/grpcui/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0dcah6bamjqyp9354qrd1cykdr5k5l93hh7qcy5b4nkag9531gl0";
1212 };
1313
14− modSha256 = "1yq8484cjxad72nqsrim3zppr8hmn7dc6f8rgkw8fg952lqy5jjb";
14+ vendorSha256 = "0m9nn8x0ji0n9v3d5w5z3grwv0zh8ijvh92jqjpcfv4bcjr5vsjr";
1515
1616 meta = with lib; {
1717 description = "An interactive web UI for gRPC, along the lines of postman";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 maintainers = with maintainers; [ pradyuman ];
2121 platforms = platforms.linux ++ platforms.darwin;
2222 };
23−}
23+}
pkgs/tools/networking/hey/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "06w5hf0np0ayvjnfy8zgy605yrs5j326nk2gm0fy7amhwx1fzkwv";
1212 };
1313
14− modSha256 = "0a00kcyagqczw0vhl8qs2xs1y8myw080y9kjs4qrcmj6kibdy55q";
14+ vendorSha256 = null;
1515
1616 meta = with lib; {
1717 description = "HTTP load generator, ApacheBench (ab) replacement";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 license = licenses.asl20;
2020 maintainers = with maintainers; [ filalex77 ];
2121 };
22−}
22+}
pkgs/tools/networking/minio-client/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0ff2fyr3787zp0lpgbph064am33py2wzjikzmxd3zwp3y0dic770";
1212 };
1313
14− modSha256 = "1bcz7jchfnglypr2md9hhqbvcbghic2yp6njdrx3m5nqhylypzfx";
14+ vendorSha256 = "0nfcxz47v5gl0wih59xarhz82nd8wy61c3ijvg2v08ipk29zivcc";
1515
1616 subPackages = [ "." ];
1717
@@ -24,4 +24,4 @@ buildGoModule rec {
2424 platforms = platforms.unix;
2525 license = licenses.asl20;
2626 };
27−}
27+}
pkgs/tools/networking/nebula/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0xrki9w83b4b3l5adq1rxz374f124wf388sdyvy7ngc3b04k7qlb";
1212 };
1313
14− modSha256 = "0v45ikw0bl00412krg4v6sr9bggvsrvl0h6clihkh4mdfz6kwa47";
14+ vendorSha256 = "094mn1r69c40w7k3lsggjh0dpws9l0j7mgiyjy1lpblkvkyk2azm";
1515
1616 subPackages = [ "cmd/nebula" "cmd/nebula-cert" ];
1717
@@ -40,4 +40,4 @@ buildGoModule rec {
4040 platforms = platforms.all;
4141 };
4242
43−}
43+}
pkgs/tools/networking/obfs4/default.nix+2−2
@@ -10,7 +10,7 @@ buildGoModule rec {
1010 sha256 = "05aqmw8x8s0yqyqmdj5zcsq06gsbcmrlcd52gaqm20m1pg9503ad";
1111 };
1212
13− modSha256 = "150kg22kznrdj5icjxk3qd70g7wpq8zd2zklw1y2fgvrggw8zvyv";
13+ vendorSha256 = "0h3gjxv26pc6cysvy1hny2f4abw6i847dk8fx0m113ixx9qghk87";
1414
1515 meta = with lib; {
1616 description = "A pluggable transport proxy";
@@ -18,4 +18,4 @@ buildGoModule rec {
1818 repositories.git = "https://git.torproject.org/pluggable-transports/obfs4.git";
1919 maintainers = with maintainers; [ phreedom thoughtpolice ];
2020 };
21−}
21+}
pkgs/tools/networking/pixiecore/default.nix+2−2
@@ -12,7 +12,7 @@ buildGoModule rec {
1212 sha256 = "14dslmx3gk08h9gqfjw5y27x7d2c6r8ir7mjd7l9ybysagpzr02a";
1313 };
1414
15− modSha256 = "1waqaglm6f9zy5296z309ppkck2vmydhk9gjnxrgzmhqld5lcq4f";
15+ vendorSha256 = "08n3m6fkwh8jmmzky3ygij4gxlcqidqk5ywi8ki8bkyzzs2lqaw7";
1616 subPackages = [ "cmd/pixiecore" ];
1717
1818 meta = {
@@ -22,4 +22,4 @@ buildGoModule rec {
2222 maintainers = with stdenv.lib.maintainers; [ bbigras danderson ];
2323 platforms = stdenv.lib.platforms.linux;
2424 };
25−}
25+}
pkgs/tools/networking/shadowfox/default.nix+2−2
@@ -13,7 +13,7 @@ buildGoModule rec {
1313
1414 goPackagePath = "github.com/SrKomodo/shadowfox-updater";
1515
16− modSha256 = "0hcc87mzacqwbw10l49kx0sxl4mivdr88c40wh6hdfvrbam2w86r";
16+ vendorSha256 = "06ar9ivry9b01609izjbl6hqgg0cy7aqd8n2cqpyq0g7my0l0lbj";
1717
1818 buildFlags = [ "--tags" "release" ];
1919
@@ -27,4 +27,4 @@ buildGoModule rec {
2727 platforms = platforms.all;
2828 maintainers = with maintainers; [ infinisil ];
2929 };
30−}
30+}
pkgs/tools/networking/tendermint/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "17p7khfiv5aflpl4imbqp8v7gignd6v6a7g80xlnzgix5ismh84l";
1212 };
1313
14− modSha256 = "1sdjzj52gkqk51ml29hijzv64clmi38km5z7j7paf28dla2brfxq";
14+ vendorSha256 = "1vhd3s6yxfhirgipxcy0rh8sk55cdzirr8n8r31sijgyak92mq0l";
1515
1616 meta = with stdenv.lib; {
1717 description = "Byzantine-Fault Tolerant State Machines. Or Blockchain, for short.";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 maintainers = with maintainers; [ alexfmpe ];
2121 platforms = platforms.linux ++ platforms.darwin;
2222 };
23−}
23+}
pkgs/tools/networking/termshark/default.nix+2−2
@@ -14,7 +14,7 @@ buildGoModule rec {
1414 nativeBuildInputs = [ makeWrapper ];
1515 buildInputs = [ wireshark-cli ];
1616
17− modSha256 = "0lp4gky76di7as78421p3lsirfr7mic3z204ildvj6gf6d15svpr";
17+ vendorSha256 = "14apff3vcbndr30765lzi4qswakavb4396bjixxvpxv6i5c04dq7";
1818
1919 postFixup = ''
2020 wrapProgram $out/bin/termshark --prefix PATH : ${stdenv.lib.makeBinPath [ wireshark-cli ]}
@@ -31,4 +31,4 @@ buildGoModule rec {
3131 license = licenses.mit;
3232 maintainers = with maintainers; [ winpat elseym ];
3333 };
34−}
34+}
pkgs/tools/networking/v2ray/generic.nix+2−2
@@ -13,7 +13,7 @@ let
1313 pname = "v2ray-core";
1414 inherit version src;
1515
16− modSha256 = "11gsncy3449a7y6w6pr7acqabyj2q2a1q52f8fcl5cdz1vjbmmxi";
16+ vendorSha256 = "1lh8382gyss01frq4gxyx9p26p5m8f158qfw55sy5wb7ddrafcc2";
1717
1818 buildPhase = ''
1919 runHook preBuild
@@ -47,4 +47,4 @@ in runCommand "v2ray-${version}" {
4747 makeWrapper "$file" "$out/bin/$(basename "$file")" \
4848 --set-default V2RAY_LOCATION_ASSET ${assetsDrv}
4949 done
50−''
50+''
pkgs/tools/networking/yggdrasil/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "147kl2kvv1rn3yk0mlvd998a2yayjl07csxxkjvs6264j6csb860";
1212 };
1313
14− modSha256 = "1ffp7q7kbkm1312sz6xnpc7342iczy9vj3m76lflirr1ljmw0dnb";
14+ vendorSha256 = "09xv2p9rydnsb185x61fxhyjqx41wz285c1gdd47ad3s08ay1qc7";
1515
1616 # Change the default location of the management socket on Linux
1717 # systems so that the yggdrasil system service unit does not have to
@@ -37,4 +37,4 @@ buildGoModule rec {
3737 platforms = platforms.all;
3838 maintainers = with maintainers; [ ehmry gazally lassulus ];
3939 };
40−}
40+}
pkgs/tools/package-management/mynewt-newt/default.nix+2−2
@@ -22,7 +22,7 @@ buildGoModule rec {
2222 })
2323 ];
2424
25− modSha256 = "068r8wa2pgd68jv50x0l1w8n96f97b3mgv7z6f85280ahgywaasq";
25+ vendorSha256 = "1sh9mx3lc28fzvc1yrhz58rlbaac7aq1dqyvxwj98vld3kigpv1z";
2626
2727 meta = with stdenv.lib; {
2828 homepage = "https://mynewt.apache.org/";
@@ -36,4 +36,4 @@ buildGoModule rec {
3636 maintainers = with maintainers; [ pjones ];
3737 platforms = platforms.unix;
3838 };
39−}
39+}
pkgs/tools/package-management/nfpm/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0zl8xf74k5is8rxbirrqb5cnfgrlppr1gchfqm31305mnpicr92s";
1212 };
1313
14− modSha256 = "14izjwadl4ify0wrz0yinqvayar79h0pxxqj5n69a5dgbx09fp0l";
14+ vendorSha256 = "07xg8cm7pqpnb96drcmzk7rj2dhfn4pd8vr2a7nxqizd3qk6d5bf";
1515
1616 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 maintainers = [ maintainers.marsam ];
2222 license = licenses.mit;
2323 };
24−}
24+}
pkgs/tools/security/age/default.nix+2−2
@@ -4,7 +4,7 @@ buildGoModule rec {
44 pname = "age";
55 version = "unstable-2020-03-25";
66 goPackagePath = "github.com/FiloSottile/age";
7− modSha256 = "00yhn1894ni8bvkqm1vr0rqkky52pkhvdzbi2sqx3czlgb5ibw3h";
7+ vendorSha256 = "0km7a2826j3fk2nrkmgc990chrkcfz006wfw14yilsa4p2hmfl7m";
88
99 subPackages = [
1010 "cmd/age"
@@ -24,4 +24,4 @@ buildGoModule rec {
2424 license = licenses.bsd3;
2525 maintainers = with maintainers; [ tazjin ];
2626 };
27−}
27+}
pkgs/tools/security/bettercap/default.nix+2−2
@@ -19,7 +19,7 @@ buildGoModule rec {
1919 sha256 = "18hwz9m16pxlb7wp78iqmdi0kimrx3h05fs0zhzm8qhzancq8alf";
2020 };
2121
22− modSha256 = "1qhmrjb3fvw6maxrl7hb3bizrw6szhwx6s2g59p5pj3dz4x8jajn";
22+ vendorSha256 = "1j272w0zdndcz4fmh9fzbk2q8wmyfi70vn0p6d8cg0r0l231sbyx";
2323
2424 nativeBuildInputs = [ pkg-config ];
2525 buildInputs = [ libpcap libnfnetlink libnetfilter_queue libusb1 ];
@@ -34,4 +34,4 @@ buildGoModule rec {
3434 maintainers = with maintainers; [ y0no ];
3535 platforms = platforms.all;
3636 };
37−}
37+}
pkgs/tools/security/browserpass/default.nix+2−2
@@ -12,7 +12,7 @@ buildGoModule rec {
1212
1313 nativeBuildInputs = [ makeWrapper ];
1414
15− modSha256 = "13yw7idgw8l48yvm4jjha0kbx6q22m2zp13y006mikavynqsr5kj";
15+ vendorSha256 = "1wcbn0ip596f2dp68y6jmxgv20l0dgrcxg5cwclkawigj05416zj";
1616
1717 postPatch = ''
1818 # Because this Makefile will be installed to be used by the user, patch
@@ -51,4 +51,4 @@ buildGoModule rec {
5151 platforms = platforms.all;
5252 maintainers = with maintainers; [ rvolosatovs infinisil ];
5353 };
54−}
54+}
pkgs/tools/security/gobuster/default.nix+2−2
@@ -14,7 +14,7 @@ buildGoModule rec {
1414 sha256 = "0q8ighqykh8qyvidnm6az6dc9mp32bbmhkmkqzl1ybbw6paa8pym";
1515 };
1616
17− modSha256 = "0jq0z5s05vqdvq7v1gdjwlqqwbl1j2rv9f16k52idl50vdiqviql";
17+ vendorSha256 = "0kr9i2nm5csf3070hwaiss137pfa3088xbw2zigp7aqb2naky036";
1818
1919 meta = with lib; {
2020 description = "Tool used to brute-force URIs, DNS subdomains, Virtual Host names on target web servers";
@@ -22,4 +22,4 @@ buildGoModule rec {
2222 license = licenses.asl20;
2323 maintainers = with maintainers; [ pamplemousse ];
2424 };
25−}
25+}
pkgs/tools/security/gopass/default.nix+2−2
@@ -20,7 +20,7 @@ buildGoModule rec {
2020 sha256 = "19xhyyd76r17rwn6s8xgfjnyi7kywagy0i4anqws40w79j3qb1p0";
2121 };
2222
23− modSha256 = "0zr4ihpcclw5pfhcdrd4n4qb3i3djcwyvwr4m2kpn99icp55bml8";
23+ vendorSha256 = "1wn20bh7ma4pblsf6qnlbz5bx4p9apig3d1yz7cpsqv4z3w07baw";
2424
2525 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version} -X main.commit=${src.rev}" ];
2626
@@ -61,4 +61,4 @@ buildGoModule rec {
6161 well, providing a stellar user experience and a sane, simple interface.
6262 '';
6363 };
64−}
64+}
pkgs/tools/security/saml2aws/default.nix+15−2
@@ -11,7 +11,20 @@ buildGoModule rec {
1111 sha256 = "12aidylamrq4rvy2cfdz669lr1p20yqrshigcc5x1hrlhh9y64xc";
1212 };
1313
14− modSha256 = "1kcj5065yy52p1jy4fad5lsz3y4spqc40k1qsirm53qqixhrhvag";
14+ hid = fetchFromGitHub {
15+ owner = "karalabe";
16+ repo = "hid";
17+ rev = "9c14560f9ee858c43f40b5cd01392b167aacf4e8";
18+ sha256 = "0xc7b8mwha64j7l2fr2g5zy8pz7cqi0vrxx60gii52b6ii31xncx";
19+ };
20+
21+ vendorSha256 = "0mns5clykvj33krf29yjh8lkf05nih42ka5ji7miq0iaikqyyc78";
22+ overrideModAttrs = (_: {
23+ postBuild = ''
24+ cp -r --reflink=auto ${hid}/libusb vendor/github.com/karalabe/hid
25+ cp -r --reflink=auto ${hid}/hidapi vendor/github.com/karalabe/hid
26+ '';
27+ });
1528
1629 subPackages = [ "." "cmd/saml2aws" ];
1730
@@ -26,4 +39,4 @@ buildGoModule rec {
2639 platforms = stdenv.lib.platforms.unix;
2740 maintainers = [ stdenv.lib.maintainers.pmyjavec ];
2841 };
29−}
42+}
pkgs/tools/security/sops/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "1515bk0fl0pvdkp402l51gdg63bmqlh89sglss6prc1qqvv5v2xy";
1212 };
1313
14− modSha256 = "0vhxd3dschj5i9sig6vpxzbl59cas1qa843akzmjnfjrrafb916y";
14+ vendorSha256 = "0yryc799k4563wy53z7amraj89cyprklj0lfv207530hwv5i5gm6";
1515
1616 meta = with stdenv.lib; {
1717 homepage = "https://github.com/mozilla/sops";
@@ -19,4 +19,4 @@ buildGoModule rec {
1919 maintainers = [ maintainers.marsam ];
2020 license = licenses.mpl20;
2121 };
22−}
22+}
pkgs/tools/system/ctop/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0y72l65xgfqrgghzbm1zcy776l5m31z0gn6vfr689zyi3k3f4kh8";
1212 };
1313
14− modSha256 = "0wxv6yzlgki7047qszx9p9xpph95bg097jkgaa0b3wbpx8vg7qml";
14+ vendorSha256 = "1x4li44vg0l1x205v9a971cgphplxhsrn59q97gmj9cfy4m7jdfw";
1515
1616 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version} -X main.build=v${version}" ];
1717
@@ -21,4 +21,4 @@ buildGoModule rec {
2121 license = licenses.mit;
2222 maintainers = with maintainers; [ apeyroux marsam ];
2323 };
24−}
24+}
pkgs/tools/system/gotop/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "01a2y2604dh2zfy5f2fxr306id0fbq0df91fpz2m8w7rpaszd6xr";
1212 };
1313
14− modSha256 = "1gbpxq2vyshln97gij5y9qsjyf3mkwfqwwhikc0cck3mnwiv87dd";
14+ vendorSha256 = "1ais548gii4q7xzysnw2ykjxyzb7azszsqdlp9hgiwp0bax9nj2n";
1515
1616 meta = with stdenv.lib; {
1717 description = "A terminal based graphical activity monitor inspired by gtop and vtop";
@@ -20,4 +20,4 @@ buildGoModule rec {
2020 maintainers = [ maintainers.magnetophon ];
2121 platforms = platforms.unix;
2222 };
23−}
23+}
pkgs/tools/system/jump/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0mph3bqfjnw3yf0a6ml3ccmkr1shviwvvq4d04ky4gppfy6z51jy";
1212 };
1313
14− modSha256 = "1fzsm85c31vkdw80kijxmjhk8jyhjz8b21npgks2qrnizhm6iaf8";
14+ vendorSha256 = "1500vim2lmkkls758pwhlx3piqbw6ap0nnhdwz9pcxih4s4as2nk";
1515
1616 outputs = [ "out" "man"];
1717 postInstall = ''
@@ -37,4 +37,4 @@ buildGoModule rec {
3737 platforms = platforms.all;
3838 maintainers = with maintainers; [ sondr3 ];
3939 };
40−}
40+}
pkgs/tools/system/netdata/go.d.plugin.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "15h4075lwqh58ssdgyq34jj8r4dga0sz7h18dzy4nir75p8a0s7b";
1212 };
1313
14− modSha256 = "1386qhk1yr47h7qv15k0abc8mfif96pqapw0v4wrf3pl1z9mzl2n";
14+ vendorSha256 = "1pw9pb3rdjzf2dx1p1jiqxs7qhlpjki7fy74nyxza5wzrv4317sj";
1515
1616 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
1717
@@ -26,4 +26,4 @@ buildGoModule rec {
2626 license = licenses.gpl3;
2727 maintainers = [ maintainers.lethalman ];
2828 };
29−}
29+}
pkgs/tools/text/gjo/default.nix+2−3
@@ -16,7 +16,7 @@ buildGoModule rec {
1616
1717 doCheck = true;
1818
19− modSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5";
19+ vendorSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5";
2020
2121 meta = with stdenv.lib; {
2222 description = "Small utility to create JSON objects";
@@ -24,5 +24,4 @@ buildGoModule rec {
2424 license = licenses.mit;
2525 maintainers = with maintainers; [ doronbehar ];
2626 };
27−}
28−
27+}
pkgs/tools/text/shfmt/default.nix+2−2
@@ -11,7 +11,7 @@ buildGoModule rec {
1111 sha256 = "0zlk1jjk65jwd9cx0xarz4yg2r2h86kd5g00gcnsav6dp6rx3aw8";
1212 };
1313
14− modSha256 = "080k8d5rp8kyg0x7vjxm758b9ya9z336yd4rcqws7yhqawxiv55z";
14+ vendorSha256 = "1jq2x4yxshsy4ahp7nrry8dc9cyjj46mljs447rq57sgix4ndpq8";
1515 subPackages = ["cmd/shfmt"];
1616
1717 buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
@@ -25,4 +25,4 @@ buildGoModule rec {
2525 '';
2626 license = licenses.bsd3;
2727 };
28−}
28+}