diff options
author | Colin L Rice <colin@daedrum.net> | 2020-04-30 21:59:00 -0400 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2020-05-14 07:22:21 +0100 |
commit | d6162dab509ababe7c3ce83c17a3ef63855e0832 (patch) | |
tree | 671629ece52745e2498c9debb7b6ccb4e7092efd | |
parent | a0ddea1d6a9f07b0631e0dbcd3b7240d2eb82ef7 (diff) |
go-modules: Update files to use vendorSha256
215 files changed, 3251 insertions, 423 deletions
diff --git a/pkgs/applications/blockchains/go-ethereum.nix b/pkgs/applications/blockchains/go-ethereum.nix index 6a443571d0f28..15583d0a1efd8 100644 --- a/pkgs/applications/blockchains/go-ethereum.nix +++ b/pkgs/applications/blockchains/go-ethereum.nix @@ -11,7 +11,21 @@ buildGoModule rec { sha256 = "1yqqflp73yvjy6bp05xd1nv5fc6p1nx7g4spbssxf3ws96pdh425"; }; - modSha256 = "07xrw3fivfpbkg4mp8ghrj1bishfas82dbd780fymgs2h74iigf3"; + usb = fetchFromGitHub { + owner = "karalabe"; + repo = "usb"; + rev = "911d15fe12a9c411cf5d0dd5635231c759399bed"; + sha256 = "0asd5fz2rhzkjmd8wjgmla5qmqyz4jaa6qf0n2ycia16jsck6wc2"; + }; + + vendorSha256 = "12aw8b8ci7nssidh1yz8d2hk43csdacq5jca9y70rjakpl3zndsz"; + + overrideModAttrs = (_: { + postBuild = '' + cp -r --reflink=auto ${usb}/libusb vendor/github.com/karalabe/usb + cp -r --reflink=auto ${usb}/hidapi vendor/github.com/karalabe/usb + ''; + }); subPackages = [ "cmd/abidump" diff --git a/pkgs/applications/blockchains/lnd.nix b/pkgs/applications/blockchains/lnd.nix index aff38e242f81c..1f249223df58d 100644 --- a/pkgs/applications/blockchains/lnd.nix +++ b/pkgs/applications/blockchains/lnd.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1amciz924s2h6qhy7w34jpv1jc25p5ayfxzvjph6hhx0bccrm88w"; }; - modSha256 = "15i4h3pkvyav9qsbfinzifram0knkylg24j6j0mxs4bnj80j4ycm"; + vendorSha256 = "1iyghg11cxvbzi0gl40fvv8pl3d3k52j179w3x5m1f09r5ji223y"; subPackages = ["cmd/lncli" "cmd/lnd"]; @@ -21,4 +21,4 @@ buildGoModule rec { license = lib.licenses.mit; maintainers = with maintainers; [ cypherpunk2140 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/editors/glow/default.nix b/pkgs/applications/editors/glow/default.nix index 928291940cfe3..fd1e61463f8b2 100644 --- a/pkgs/applications/editors/glow/default.nix +++ b/pkgs/applications/editors/glow/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0vhl8d7xxqqyl916nh8sgm1xdaf7xlc3r18464bd2av22q9yz68n"; }; - modSha256 = "0r0yq7kgz7i1wf4gxxihdrn1c8mi4wcyhadncxbln24s9c5apxsf"; + vendorSha256 = "1c16s5xiqr36azh2w90wg14jlw67ca2flbgjijpz7qd0ypxyfqlk"; buildFlagsArray = [ "-ldflags=" "-X=main.Version=${version}" ]; @@ -21,4 +21,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ ehmry filalex77 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/graphics/pdfcpu/default.nix b/pkgs/applications/graphics/pdfcpu/default.nix index b127be821c139..bcbdfb9980e8b 100644 --- a/pkgs/applications/graphics/pdfcpu/default.nix +++ b/pkgs/applications/graphics/pdfcpu/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0a7d36hzcvj68apzc726r2vqsjyrkcynxif5laarxapm6p67g3z4"; }; - modSha256 = "0ak34wr5cbcvblndslsxdd24vfj3h02xqjqnj5amkll5iqn5mzi1"; + vendorSha256 = "09alkpfyxapycv6zsaz7prgbr0a1jzd78n7w2mh01mg4hhb2j3k7"; subPackages = [ "cmd/pdfcpu" ]; @@ -22,5 +22,4 @@ buildGoModule rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.all; }; -} - +} \ No newline at end of file diff --git a/pkgs/applications/misc/archiver/default.nix b/pkgs/applications/misc/archiver/default.nix index 64b592b78714b..0e345b1e273de 100644 --- a/pkgs/applications/misc/archiver/default.nix +++ b/pkgs/applications/misc/archiver/default.nix @@ -14,7 +14,7 @@ buildGoModule rec { sha256 = "1yr2jhidqvbwh1y08lpqaidwpr5yx3bhvznm5fc9pk64s7z5kq3h"; }; - modSha256 = "1mrfqhd0zb78rlqlj2ncb0srwjfl7rzhy2p9mwa82pgysvlp08gv"; + vendorSha256 = "1ikrgl03r9zkn86kxkqi2kf540g3qzzz24i5wvh6g3d5q49nygl9"; meta = with lib; { description = "Easily create & extract archives, and compress & decompress files of various formats"; @@ -23,4 +23,4 @@ buildGoModule rec { maintainers = with maintainers; [ kalbasit ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/misc/cheat/default.nix b/pkgs/applications/misc/cheat/default.nix index 85101a6d71bfa..3a8aea913cafd 100644 --- a/pkgs/applications/misc/cheat/default.nix +++ b/pkgs/applications/misc/cheat/default.nix @@ -20,7 +20,7 @@ buildGoModule rec { installShellCompletion scripts/cheat.{bash,fish,zsh} ''; - modSha256 = "1z4za3rivc3vqv59p5yb5c9dcpmq669rzmf4z7zilbvmgm0pbgfp"; + vendorSha256 = null; meta = with stdenv.lib; { description = "Create and view interactive cheatsheets on the command-line"; diff --git a/pkgs/applications/misc/exercism/default.nix b/pkgs/applications/misc/exercism/default.nix index a071761599a31..d983458a7ce15 100644 --- a/pkgs/applications/misc/exercism/default.nix +++ b/pkgs/applications/misc/exercism/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "17gvz9a0sn4p36hf4l77bxhhfipf4x998iay31layqwbnzmb4xy7"; }; - modSha256 = "0pg0hxrr6jjd03wbjn5y65x02md3h352mnm1gr6vyiv7hn4ws14m"; + vendorSha256 = "0b2m9xkac60k5rbxmb03cxf530m23av14pnsjk8067l998sm4vqi"; subPackages = [ "./exercism" ]; @@ -21,4 +21,4 @@ buildGoModule rec { license = licenses.mit; maintainers = [ maintainers.rbasso ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/misc/geoipupdate/default.nix b/pkgs/applications/misc/geoipupdate/default.nix index b7b90448e4bc1..2d3c3f799e8bf 100644 --- a/pkgs/applications/misc/geoipupdate/default.nix +++ b/pkgs/applications/misc/geoipupdate/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "057f9kp8g3wixjh9dm58g0qvzfcmhwbk1d573ldly4g5404r9bvf"; }; - modSha256 = "1bypanvrkcqp8rk84cv2569671irgaf3cy27lcrknyina4pdvir5"; + vendorSha256 = "0q4byhvs1c1xm4qjvs2vyf98vdv121qn0z51arcf7k4ayrys5xcx"; meta = with stdenv.lib; { description = "Automatic GeoIP database updater"; @@ -20,4 +20,4 @@ buildGoModule rec { platforms = platforms.all; maintainers = with maintainers; [ das_j ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/misc/gomatrix/default.nix b/pkgs/applications/misc/gomatrix/default.nix index 5d412469617fc..0cf6c9660932a 100644 --- a/pkgs/applications/misc/gomatrix/default.nix +++ b/pkgs/applications/misc/gomatrix/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1wq55rvpyz0gjn8kiwwj49awsmi86zy1fdjcphzgb7883xalgr2m"; }; - modSha256 = "13higizadnf4ypk8qn1b5s6mdg7n6l3indb43mjp1b4cfzjsyl91"; + vendorSha256 = "1yw0gph4zfg8w4343882l6b9lggwyak2zz8ic1l1m2m44p3aq169"; meta = with lib; { description = ''Displays "The Matrix" in a terminal''; @@ -19,4 +19,4 @@ buildGoModule rec { maintainers = with maintainers; [ skykanin ]; homepage = "https://github.com/GeertJohan/gomatrix"; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/misc/hugo/default.nix b/pkgs/applications/misc/hugo/default.nix index f0e191097d50c..a3135c4bcdf0a 100644 --- a/pkgs/applications/misc/hugo/default.nix +++ b/pkgs/applications/misc/hugo/default.nix @@ -1,10 +1,10 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, libsass }: buildGoModule rec { pname = "hugo"; version = "0.70.0"; - goPackagePath = "github.com/gohugoio/hugo"; + buildInputs = [ libsass ]; src = fetchFromGitHub { owner = "gohugoio"; @@ -13,7 +13,21 @@ buildGoModule rec { sha256 = "14g1x95jh91z9xm3xkv2psw2jn7z6bv2009miyv727df4d58nh6m"; }; - modSha256 = "015ha8pjz1fv8qg558xa6hl52fp2qd486ir9m01dvxw63xqx76ss"; + golibsass = fetchFromGitHub { + owner = "bep"; + repo = "golibsass"; + rev = "8a04397f0baba474190a9f58019ff499ec43057a"; + sha256 = "0xk3m2ynbydzx87dz573ihwc4ryq0r545vz937szz175ivgfrhh3"; + }; + + overrideModAttrs = (_: { + postBuild = '' + rm -rf vendor/github.com/bep/golibsass/ + cp -r --reflink=auto ${golibsass} vendor/github.com/bep/golibsass + ''; + }); + + vendorSha256 = "1wl9pg5wf1n5n7gq6lyz0l5ij4icjpfinl4myxwj93l2hqqyx2lf"; buildFlags = [ "-tags" "extended" ]; diff --git a/pkgs/applications/misc/sampler/default.nix b/pkgs/applications/misc/sampler/default.nix index 0c5494f146f70..a1f4c8f41bca2 100644 --- a/pkgs/applications/misc/sampler/default.nix +++ b/pkgs/applications/misc/sampler/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1lanighxhnn28dfzils7i55zgxbw2abd6y723mq7x9wg1aa2bd0z"; }; - modSha256 = "02ai193lpzsxdn1hpbndkfxdc88nyl4kcgbadhy122kgx13crcy8"; + vendorSha256 = "04nywhkil5xkipcibrp6vi63rfcvqgv7yxbxmmrhqys2cdxfvazv"; subPackages = [ "." ]; @@ -24,4 +24,4 @@ buildGoModule rec { maintainers = with maintainers; [ uvnikita ]; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/misc/terminal-parrot/default.nix b/pkgs/applications/misc/terminal-parrot/default.nix index 68241d79850d8..accaf62c60e2d 100644 --- a/pkgs/applications/misc/terminal-parrot/default.nix +++ b/pkgs/applications/misc/terminal-parrot/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1b4vr4s1zpkpf5kc1r2kdlp3hf88qp1f7h05g8kd62zf4sfbj722"; }; - modSha256 = "01i8fim9z2l8rpdgfaih9ldvbap7gcx5767a15miv8q7sxpr90cp"; + vendorSha256 = "1qalnhhq3fmyzj0hkzc5gk9wbypr558mz3ik5msw7fid68k2i48c"; meta = with stdenv.lib; { description = "Shows colorful, animated party parrot in your terminial"; @@ -20,4 +20,4 @@ buildGoModule rec { platforms = platforms.all; maintainers = [ maintainers.heel ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/misc/todoist/default.nix b/pkgs/applications/misc/todoist/default.nix index 1e82ac2cccbe6..b3b3561227f15 100644 --- a/pkgs/applications/misc/todoist/default.nix +++ b/pkgs/applications/misc/todoist/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0d3c621jaqxd6i58xm6nvi0avrh5mk23r169i95bn73igzw62w33"; }; - modSha256 = "1nnp5ijz4n34gc97rar4wlvlbx21ndpjyb2mc6gxdk1wzx3mgswp"; + vendorSha256 = "0cznb8glh36dwyyn1gx1ggkwa9zffrrxg52k78brnaczsl0rsmky"; meta = { homepage = "https://github.com/sachaos/todoist"; @@ -19,4 +19,4 @@ buildGoModule rec { license = lib.licenses.mit; platforms = lib.platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/misc/wtf/default.nix b/pkgs/applications/misc/wtf/default.nix index e557c5081c814..330d778c5de87 100644 --- a/pkgs/applications/misc/wtf/default.nix +++ b/pkgs/applications/misc/wtf/default.nix @@ -16,7 +16,7 @@ buildGoModule rec { sha256 = "0v6yafpz3sycq6yb7w4dyxqclszvdgwbyhqs5ii8ckynqcf6ifn7"; }; - modSha256 = "0csxc5q7i2iq8z71ysfan2kwf4mghi89i5zja5g1a4cvmcabiq1g"; + vendorSha256 = "1q54bl1z9ljpsf63i5r6vzv7f143slja0n8lyppaxxdcg18h8gn0"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; @@ -36,4 +36,4 @@ buildGoModule rec { maintainers = with maintainers; [ kalbasit ]; platforms = platforms.linux ++ platforms.darwin; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cloudflared/default.nix b/pkgs/applications/networking/cloudflared/default.nix index b34cd3306c06e..31bb18f20a828 100644 --- a/pkgs/applications/networking/cloudflared/default.nix +++ b/pkgs/applications/networking/cloudflared/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub, runCommand }: buildGoModule rec { pname = "cloudflared"; @@ -11,7 +11,8 @@ buildGoModule rec { sha256 = "1vbxm5z72y9zfg4carmja3fc1vhkanmc25pgnlw550p1l14y6404"; }; - modSha256 = "1mnfp8nhbllv8msglci1hq4026rqsc1yibrh2xnwwbf2f3yqx8h0"; + vendorSha256 = "14w2iz3ycbzfvlr8a6qn86aaa8687cm203d73wpfkfskp277hwz0"; + deleteVendor = true; buildFlagsArray = "-ldflags=-X main.Version=${version}"; diff --git a/pkgs/applications/networking/cluster/argo/default.nix b/pkgs/applications/networking/cluster/argo/default.nix index 891d153a09e1f..7179a29154344 100644 --- a/pkgs/applications/networking/cluster/argo/default.nix +++ b/pkgs/applications/networking/cluster/argo/default.nix @@ -28,7 +28,7 @@ buildGoModule rec { sha256 = "12wq79h4m8wlzf18r66965mbbjjb62kvnxdj50ra7nxa8jjxpsmf"; }; - modSha256 = "1394bav1k1xv9n1rvji0j9a09mibk97xpha24640jkgmy9bnmg45"; + vendorSha256 = "0dhzr62x2lzf3w0j2r496cr7jvkdcavfqaqr2xh972k3qqc9caky"; subPackages = [ "cmd/argo" ]; @@ -46,4 +46,4 @@ buildGoModule rec { maintainers = with maintainers; [ groodt ]; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/argocd/default.nix b/pkgs/applications/networking/cluster/argocd/default.nix index 7f9ebda93c0a3..4094989050512 100644 --- a/pkgs/applications/networking/cluster/argocd/default.nix +++ b/pkgs/applications/networking/cluster/argocd/default.nix @@ -12,7 +12,7 @@ buildGoModule rec { sha256 = "01vsyrks1k5yfvrarv8ia0isr7snilr21b7lfiy860si82r2r8hj"; }; - modSha256 = "1qivg7yy7ymmgkrvl365x29d8jnsphbz18j1ykgwwysyw3n4jkdg"; + vendorSha256 = "0r2nh7v00m6zbdnhsgjn01q9pkiz41ckkqgfnpqmkxaqmjz31iyj"; nativeBuildInputs = [ packr ]; @@ -37,4 +37,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ shahrukh330 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/atlantis/default.nix b/pkgs/applications/networking/cluster/atlantis/default.nix index 7d04595d3feb7..b6077b5c4d827 100644 --- a/pkgs/applications/networking/cluster/atlantis/default.nix +++ b/pkgs/applications/networking/cluster/atlantis/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "16zz4xwpqipdmszbz93xxw31hbh7s8pfa9dm64ybyni7wc4lvdy6"; }; - modSha256 = "18f7cf61yn5jkji5a4v6xw6c7xl40nj32n5w34xmcmszzf64cwkn"; + vendorSha256 = null; subPackages = [ "." ]; @@ -22,4 +22,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ jpotier ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/docker-machine/hyperkit.nix b/pkgs/applications/networking/cluster/docker-machine/hyperkit.nix index ec5a79e9acee9..0c5a716aa8a14 100644 --- a/pkgs/applications/networking/cluster/docker-machine/hyperkit.nix +++ b/pkgs/applications/networking/cluster/docker-machine/hyperkit.nix @@ -1,7 +1,7 @@ { lib, buildGoModule, minikube }: buildGoModule rec { - inherit (minikube) version src nativeBuildInputs buildInputs modSha256 commit; + inherit (minikube) version src nativeBuildInputs buildInputs vendorSha256 commit; pname = "docker-machine-hyperkit"; @@ -20,4 +20,4 @@ buildGoModule rec { maintainers = with maintainers; [ atkinschang ]; platforms = platforms.darwin; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/docker-machine/kvm2.nix b/pkgs/applications/networking/cluster/docker-machine/kvm2.nix index 6af1bf126b561..60d478fe15846 100644 --- a/pkgs/applications/networking/cluster/docker-machine/kvm2.nix +++ b/pkgs/applications/networking/cluster/docker-machine/kvm2.nix @@ -1,7 +1,7 @@ { lib, buildGoModule, minikube }: buildGoModule rec { - inherit (minikube) version src nativeBuildInputs buildInputs modSha256 commit; + inherit (minikube) version src nativeBuildInputs buildInputs vendorSha256 commit; pname = "docker-machine-kvm2"; @@ -24,4 +24,4 @@ buildGoModule rec { maintainers = with maintainers; [ tadfisher atkinschang ]; platforms = platforms.linux; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/fluxctl/default.nix b/pkgs/applications/networking/cluster/fluxctl/default.nix index 10991d47cca9e..4354d72a5bd90 100644 --- a/pkgs/applications/networking/cluster/fluxctl/default.nix +++ b/pkgs/applications/networking/cluster/fluxctl/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1w6ndp0nrpps6pkxnq38hikbnzwahi6j9gn8l0bxd0qkf7cjc5w0"; }; - modSha256 = "0zwq7n1lggj27j5yxgfplbaccw5fhbm7vm0sja839r1jamrn3ips"; + vendorSha256 = "0w5l1lkzx4frllflkbilj8qqwf54wkz7hin7q8xn1vflkv3lxcnp"; subPackages = [ "cmd/fluxctl" ]; @@ -23,4 +23,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ Gonzih filalex77 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/helm/default.nix b/pkgs/applications/networking/cluster/helm/default.nix index deb6d75f12c57..9d3809c1717be 100644 --- a/pkgs/applications/networking/cluster/helm/default.nix +++ b/pkgs/applications/networking/cluster/helm/default.nix @@ -10,7 +10,7 @@ buildGoModule rec { rev = "v${version}"; sha256 = "1x05xnc3czk7vpn9qnfdavdjy5agv800nh7jyqczpiw125l9jfyd"; }; - modSha256 = "000knqwsajlqika4abp3fh721mn1vykcsnv3c1qw0mzffkmzwsqd"; + vendorSha256 = "0j25m56cwzjd9b75v7xlb26q81bsmln77k23h9n8v2f2gqwwpkrl"; subPackages = [ "cmd/helm" ]; buildFlagsArray = [ "-ldflags=-w -s -X helm.sh/helm/v3/internal/version.version=v${version}" ]; @@ -28,4 +28,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ rlupton20 edude03 saschagrunert Frostman ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/helmfile/default.nix b/pkgs/applications/networking/cluster/helmfile/default.nix index 628ae10f11b7d..f193186144a29 100644 --- a/pkgs/applications/networking/cluster/helmfile/default.nix +++ b/pkgs/applications/networking/cluster/helmfile/default.nix @@ -15,7 +15,7 @@ buildGoModule { goPackagePath = "github.com/roboll/helmfile"; - modSha256 = "0j7w12rrnsv2h5v0bqh6sjq9anm51zs0p3nzlhwsksw9c98r9avk"; + vendorSha256 = "0m16l3px2ykdsrmlirf7c4lwgmigs6p3rdr61l49acwsmniz2m8a"; nativeBuildInputs = [ makeWrapper ]; @@ -36,4 +36,4 @@ buildGoModule { maintainers = with lib.maintainers; [ pneumaticat yurrriq ]; platforms = lib.platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/helmsman/default.nix b/pkgs/applications/networking/cluster/helmsman/default.nix index f1d81975e1e63..992b6c4dc5e30 100644 --- a/pkgs/applications/networking/cluster/helmsman/default.nix +++ b/pkgs/applications/networking/cluster/helmsman/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0i7sg3iwxb07gjxcz6chpdcx3fqykzldmf7s1c9m02hkps910ca8"; }; - modSha256 = "19qdrrwmjc32nw8m0zi251z32wqj2d956wgd1dkcvx1x0n4p435g"; + vendorSha256 = "05vnysr5r3hbayss1pyifgp989kjw81h95iack8ady62k6ys5njl"; meta = with lib; { description = "Helm Charts (k8s applications) as Code tool"; diff --git a/pkgs/applications/networking/cluster/hetzner-kube/default.nix b/pkgs/applications/networking/cluster/hetzner-kube/default.nix index 1d9940c8f3189..98edd849bac51 100644 --- a/pkgs/applications/networking/cluster/hetzner-kube/default.nix +++ b/pkgs/applications/networking/cluster/hetzner-kube/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1iqgpmljqx6rhmvsir2675waj78amcfiw08knwvlmavjgpxx2ysw"; }; - modSha256 = "0jjrk93wdi13wrb5gchhqk7rgwm74kcizrbqsibgkgs2dszwfazh"; + vendorSha256 = "1jh2f66ys6rmrrwrf5zqfprgcvziyq6l4z8bfqwxgf1ysnxx525h"; buildFlagsArray = '' -ldflags= @@ -25,4 +25,4 @@ buildGoModule rec { maintainers = with lib.maintainers; [ eliasp ]; platforms = lib.platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/jx/gomod.patch b/pkgs/applications/networking/cluster/jx/gomod.patch new file mode 100644 index 0000000000000..0116d45955dc1 --- /dev/null +++ b/pkgs/applications/networking/cluster/jx/gomod.patch @@ -0,0 +1,186 @@ +diff --git a/go.mod b/go.mod +index cd54a606e..a78b23286 100644 +--- a/go.mod ++++ b/go.mod +@@ -1,5 +1,7 @@ + module github.com/jenkins-x/jx + ++go 1.14 ++ + require ( + code.gitea.io/sdk v0.0.0-20180702024448-79a281c4e34a + github.com/Azure/draft v0.15.0 +@@ -7,7 +9,6 @@ require ( + github.com/IBM-Cloud/bluemix-go v0.0.0-20181008063305-d718d474c7c2 + github.com/Jeffail/gabs v1.1.1 + github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e +- github.com/Masterminds/semver v1.4.2 // indirect + github.com/Netflix/go-expect v0.0.0-20180814212900-124a37274874 + github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect + github.com/Pallinder/go-randomdata v0.0.0-20180616180521-15df0648130a +@@ -20,7 +21,7 @@ require ( + github.com/andygrunwald/go-gerrit v0.0.0-20181026193842-43cfd7a94eb4 + github.com/andygrunwald/go-jira v1.5.0 + github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 // indirect +- github.com/antham/chyle v1.4.0 ++ github.com/antham/chyle v1.9.0 + github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect + github.com/armon/go-radix v1.0.0 // indirect + github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf // indirect +@@ -36,21 +37,18 @@ require ( + github.com/cloudflare/cfssl v0.0.0-20190409034051-768cd563887f + github.com/codeship/codeship-go v0.0.0-20180717142545-7793ca823354 + github.com/containerd/continuity v0.0.0-20181203112020-004b46473808 // indirect +- github.com/cpuguy83/go-md2man v1.0.8 // indirect + github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect + github.com/denormal/go-gitignore v0.0.0-20180713143441-75ce8f3e513c + github.com/dsnet/compress v0.0.0-20171208185109-cc9eb1d7ad76 // indirect + github.com/duosecurity/duo_api_golang v0.0.0-20190107154727-539434bf0d45 // indirect + github.com/elazarl/go-bindata-assetfs v1.0.0 // indirect + github.com/elazarl/goproxy v0.0.0-20181111060418-2ce16c963a8a // indirect +- github.com/emicklei/go-restful v2.8.0+incompatible +- github.com/emirpasic/gods v1.9.0 // indirect +- github.com/fatih/color v1.7.0 ++ github.com/emicklei/go-restful v2.8.0+incompatible // indirect ++ github.com/fatih/color v1.9.0 + github.com/fatih/structs v1.0.0 + github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect + github.com/gfleury/go-bitbucket-v1 v0.0.0-20190216152406-3a732135aa4d + github.com/ghodss/yaml v1.0.0 +- github.com/gliderlabs/ssh v0.1.1 // indirect + github.com/go-ldap/ldap v3.0.1+incompatible // indirect + github.com/go-ole/go-ole v1.2.1 // indirect + github.com/go-openapi/jsonreference v0.17.0 +@@ -59,9 +57,9 @@ require ( + github.com/gobwas/glob v0.2.3 // indirect + github.com/gocql/gocql v0.0.0-20190126123547-8516aabb0f99 // indirect + github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b +- github.com/golang/protobuf v1.2.0 ++ github.com/golang/protobuf v1.3.1 + github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect +- github.com/google/go-cmp v0.2.0 ++ github.com/google/go-cmp v0.3.0 + github.com/google/go-containerregistry v0.0.0-20190317040536-ebbba8469d06 // indirect + github.com/google/go-github v17.0.0+incompatible + github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135 // indirect +@@ -79,15 +77,15 @@ require ( + github.com/hashicorp/go-sockaddr v1.0.0 // indirect + github.com/hashicorp/go-uuid v1.0.1 // indirect + github.com/hashicorp/go-version v0.0.0-20180716215031-270f2f71b1ee +- github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce ++ github.com/hashicorp/hcl v1.0.0 + github.com/hashicorp/vault v0.11.4 + github.com/hashicorp/vault-plugin-secrets-kv v0.0.0-20190115203747-edbfe287c5d9 // indirect +- github.com/heptio/sonobuoy v0.12.0 ++ github.com/heptio/sonobuoy v0.18.1 + github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c + github.com/hpcloud/tail v1.0.0 + github.com/iancoleman/orderedmap v0.0.0-20181121102841-22c6ecc9fe13 + github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 // indirect +- github.com/imdario/mergo v0.3.6 ++ github.com/imdario/mergo v0.3.8 + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/jbrukh/bayesian v0.0.0-20161210175230-bf3f261f9a9c // indirect + github.com/jefferai/jsonx v1.0.0 // indirect +@@ -95,14 +93,12 @@ require ( + github.com/jenkins-x/golang-jenkins v0.0.0-20180919102630-65b83ad42314 + github.com/jetstack/cert-manager v0.5.2 + github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect +- github.com/kevinburke/ssh_config v0.0.0-20180317175531-9fc7bb800b55 // indirect + github.com/keybase/go-crypto v0.0.0-20181127160227-255a5089e85a // indirect + github.com/knative/build v0.5.0 + github.com/knative/build-pipeline v0.1.0 // indirect + github.com/knative/pkg v0.0.0-20190402181056-ff46edef0ae5 + github.com/knative/serving v0.5.0 + github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect +- github.com/kr/pty v1.1.2 // indirect + github.com/kubernetes/code-generator v0.0.0-20180904193909-8c97d6ab64da // indirect + github.com/kubernetes/kube-openapi v0.0.0-20190320154901-5e45bb682580 // indirect + github.com/lusis/go-slackbot v0.0.0-20180109053408-401027ccfef5 // indirect +@@ -114,9 +110,8 @@ require ( + github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect + github.com/mholt/archiver v3.1.1+incompatible + github.com/mitchellh/copystructure v1.0.0 // indirect +- github.com/mitchellh/go-homedir v0.0.0-20180523094522-3864e76763d9 // indirect + github.com/mitchellh/go-testing-interface v1.0.0 // indirect +- github.com/mitchellh/mapstructure v0.0.0-20180715050151-f15292f7a699 ++ github.com/mitchellh/mapstructure v1.1.2 + github.com/nlopes/slack v0.0.0-20180721202243-347a74b1ea30 + github.com/nwaples/rardecode v1.0.0 // indirect + github.com/onsi/ginkgo v1.6.0 +@@ -130,55 +125,48 @@ require ( + github.com/petergtz/pegomock v2.2.0+incompatible + github.com/pierrec/lz4 v2.0.5+incompatible // indirect + github.com/pkg/browser v0.0.0-20170505125900-c90ca0c84f15 +- github.com/pkg/errors v0.8.0 +- github.com/prometheus/common v0.2.0 // indirect ++ github.com/pkg/errors v0.8.1 + github.com/rodaine/hclencoder v0.0.0-20180926060551-0680c4321930 +- github.com/russross/blackfriday v1.5.1 +- github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 ++ github.com/russross/blackfriday v1.5.2 ++ github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 // indirect + github.com/satori/go.uuid v1.2.1-0.20180103174451-36e9d2ebbde5 + github.com/sergi/go-diff v1.0.0 // indirect + github.com/sethvargo/go-password v0.1.2 + github.com/shirou/gopsutil v0.0.0-20180901134234-eb1f1ab16f2e + github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect +- github.com/sirupsen/logrus v1.4.1 +- github.com/spf13/cobra v0.0.3 +- github.com/spf13/pflag v1.0.3 +- github.com/src-d/gcfg v1.3.0 // indirect ++ github.com/sirupsen/logrus v1.4.2 ++ github.com/spf13/cobra v0.0.7 ++ github.com/spf13/pflag v1.0.5 + github.com/stoewer/go-strcase v1.0.1 + github.com/stretchr/objx v0.2.0 // indirect +- github.com/stretchr/testify v1.3.0 ++ github.com/stretchr/testify v1.4.0 + github.com/tektoncd/pipeline v0.0.0-20190327171839-7c43fbae2816 + github.com/trivago/tgo v1.0.1 // indirect + github.com/ulikunitz/xz v0.5.6 // indirect + github.com/wbrefvem/go-bitbucket v0.0.0-20190128183802-fc08fd046abb + github.com/xanzy/go-gitlab v0.0.0-20180814191223-f3bc634ab936 +- github.com/xanzy/ssh-agent v0.2.0 // indirect + github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect + gocloud.dev v0.9.0 + golang.org/x/arch v0.0.0-20190312162104-788fe5ffcd8c // indirect +- golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 // indirect + golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81 // indirect +- golang.org/x/net v0.0.0-20181201002055-351d144fa1fc // indirect + golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890 +- golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 +- golang.org/x/sys v0.0.0-20190411185658-b44545bcd369 ++ golang.org/x/sync v0.0.0-20190423024810-112230192c58 ++ golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e + google.golang.org/api v0.1.0 // indirect + google.golang.org/genproto v0.0.0-20190219182410-082222b4a5c5 // indirect + gopkg.in/AlecAivazis/survey.v1 v1.6.2 + gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect + gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect +- gopkg.in/src-d/go-billy.v4 v4.2.0 // indirect +- gopkg.in/src-d/go-git-fixtures.v3 v3.3.0 // indirect +- gopkg.in/src-d/go-git.v4 v4.5.0 ++ gopkg.in/src-d/go-git.v4 v4.13.1 + gopkg.in/warnings.v0 v0.1.2 // indirect +- gopkg.in/yaml.v2 v2.2.1 ++ gopkg.in/yaml.v2 v2.2.2 + gotest.tools v2.2.0+incompatible // indirect + k8s.io/api v0.0.0-20190126160303-ccdd560a045f + k8s.io/apiextensions-apiserver v0.0.0-20181128195303-1f84094d7e8e + k8s.io/apimachinery v0.0.0-20190122181752-bebe27e40fb7 + k8s.io/client-go v9.0.0+incompatible +- k8s.io/code-generator v0.0.0-20180904193909-8c97d6ab64da +- k8s.io/gengo v0.0.0-20180718083919-906d99f89cd6 ++ k8s.io/code-generator v0.0.0-20180904193909-8c97d6ab64da // indirect ++ k8s.io/gengo v0.0.0-20180718083919-906d99f89cd6 // indirect + k8s.io/helm v2.7.2+incompatible + k8s.io/klog v0.2.0 // indirect + k8s.io/kube-openapi v0.0.0-20180719232738-d8ea2fe547a4 +@@ -197,6 +185,4 @@ replace k8s.io/metrics => k8s.io/metrics v0.0.0-20181128195641-3954d62a524d + + replace k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190122181752-bebe27e40fb7 + +-replace k8s.io/client-go => k8s.io/client-go v2.0.0-alpha.0.0.20190115164855-701b91367003+incompatible +- + replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999 diff --git a/pkgs/applications/networking/cluster/k9s/default.nix b/pkgs/applications/networking/cluster/k9s/default.nix index a51d1afb36740..4be3398f4be8a 100644 --- a/pkgs/applications/networking/cluster/k9s/default.nix +++ b/pkgs/applications/networking/cluster/k9s/default.nix @@ -18,7 +18,7 @@ buildGoModule rec { -X github.com/derailed/k9s/cmd.commit=${src.rev} ''; - modSha256 = "11jxyzajlk6b5j19sg1kjr7qdzpxkwjwrvyhx9mwy6jb5sgqbzv8"; + vendorSha256 = "0vvzv5v7j77v809h2ial9n23244j1sy3xhkarsv0wwkifc3swvq5"; meta = with stdenv.lib; { description = "Kubernetes CLI To Manage Your Clusters In Style."; @@ -26,4 +26,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ Gonzih ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/kube3d/default.nix b/pkgs/applications/networking/cluster/kube3d/default.nix index 2eea6adb28d14..32b8b4498611c 100644 --- a/pkgs/applications/networking/cluster/kube3d/default.nix +++ b/pkgs/applications/networking/cluster/kube3d/default.nix @@ -21,7 +21,7 @@ buildGoModule rec { -X github.com/rancher/k3d/version.K3sVersion=v${k3sVersion} ''; - modSha256 = "0c8bfl0hz5cfhi6jzhhylz051jiix6s7s20fn23w7wri4xaqrjn8"; + vendorSha256 = null; meta = with stdenv.lib; { homepage = "https://github.com/rancher/k3d"; @@ -30,4 +30,4 @@ buildGoModule rec { platforms = platforms.linux; maintainers = with maintainers; [ kuznero jlesquembre ngerstle ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/kubeseal/default.nix b/pkgs/applications/networking/cluster/kubeseal/default.nix index ef87b67a36002..4486f473969d9 100644 --- a/pkgs/applications/networking/cluster/kubeseal/default.nix +++ b/pkgs/applications/networking/cluster/kubeseal/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0z51iwdc4m0y8wyyx3mcvbzxlrgws7n5wkcd0g7nr73irnsld4lh"; }; - modSha256 = "029h0zr3fpzlsv9hf1d1x5j7aalxkcsyszsxjz8fqrhjafqc7zvq"; + vendorSha256 = null; subPackages = [ "cmd/kubeseal" ]; @@ -21,4 +21,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ groodt ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/kubeval/default.nix b/pkgs/applications/networking/cluster/kubeval/default.nix index 3d3674dbe0fc7..10d75435e4214 100644 --- a/pkgs/applications/networking/cluster/kubeval/default.nix +++ b/pkgs/applications/networking/cluster/kubeval/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "05li0qv4q7fy2lr50r6c1r8dhx00jb1g01qmgc72a9zqp378yiq0"; }; - modSha256 = "0y9x44y3bchi8xg0a6jmp2rmi8dybkl6qlywb6nj1viab1s8dd4y"; + vendorSha256 = "1kpwvi84i3h1yjprd6m6hn8l9j235931871y3qk9cl0g8q0hv9ja"; meta = with lib; { description = "Validate your Kubernetes configuration files"; @@ -20,4 +20,4 @@ buildGoModule rec { maintainers = with maintainers; [ johanot nicknovitski ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/linkerd/default.nix b/pkgs/applications/networking/cluster/linkerd/default.nix index 3d66a7c62f20e..331cef0444cdf 100644 --- a/pkgs/applications/networking/cluster/linkerd/default.nix +++ b/pkgs/applications/networking/cluster/linkerd/default.nix @@ -2,16 +2,16 @@ buildGoModule { pname = "linkerd-unstablle"; - version = "2019-07-26"; + version = "2020-05-01"; src = fetchFromGitHub { owner = "linkerd"; repo = "linkerd2"; - rev = "065dd3ec9d4b84c90383b31be16ccadd34a8ab0d"; - sha256 = "01m8g627sd126as0a74fy9svmymwd41sifd897nhn6kz78a21gq8"; + rev = "9e9f3bb1e2aeab8cf20f98f5cad159bbb6f24883"; + sha256 = "1pvj31wz1klwhcqga1m8kixdqsxwmppp9ix6r3wpp4dwfig45fm0"; }; - modSha256 = "0gahhywpcj16ww4l8s3wjwvavq24fpy258snhyf94ipy6lb797sl"; + vendorSha256 = "0vls58ld50jca5yn73kvg3lx4z83cc7skky54a90pkbj737y58pz"; subPackages = [ "cli/cmd" ]; @@ -21,4 +21,4 @@ buildGoModule { license = licenses.asl20; maintainers = with maintainers; [ Gonzih ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/minikube/default.nix b/pkgs/applications/networking/cluster/minikube/default.nix index 830dcec951680..040447b0ccd9a 100644 --- a/pkgs/applications/networking/cluster/minikube/default.nix +++ b/pkgs/applications/networking/cluster/minikube/default.nix @@ -16,7 +16,7 @@ buildGoModule rec { # for -ldflags commit = "63ab801ac27e5742ae442ce36dff7877dcccb278"; - modSha256 = "1g94jjwr5higg1b297zwp6grkj7if3mrdafjq9vls9y2svh11xr8"; + vendorSha256 = "1l9dxn7yy21x4b3cg6l5a08wx2ng8qf531ilg8yf1rznwfwjajrv"; src = fetchFromGitHub { owner = "kubernetes"; diff --git a/pkgs/applications/networking/cluster/node-problem-detector/default.nix b/pkgs/applications/networking/cluster/node-problem-detector/default.nix index a7a98de6d39b1..f68d5f08e66e2 100644 --- a/pkgs/applications/networking/cluster/node-problem-detector/default.nix +++ b/pkgs/applications/networking/cluster/node-problem-detector/default.nix @@ -11,14 +11,7 @@ buildGoModule rec { sha256 = "02avknglmkr9k933a64hkw0rjfxvyh4sc3x70p41b8q2g6vzv2gs"; }; - # Project upstream recommends building through vendoring - overrideModAttrs = (_: { - buildCommand = '' - echo "Skipping go.mod, using vendoring instead." && touch $out - ''; - }); - - modSha256 = "0ip26j2h11n1kgkz36rl4akv694yz65hr72q4kv4b3lxcbi65b3p"; + vendorSha256 = null; # Optionally, a log counter binary can be created to parse journald logs. # The binary is dynamically linked against systemd libraries, making it a @@ -47,4 +40,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ lbpdt ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/prow/default.nix b/pkgs/applications/networking/cluster/prow/default.nix index 0b2f798d35b46..4ad685418d35f 100644 --- a/pkgs/applications/networking/cluster/prow/default.nix +++ b/pkgs/applications/networking/cluster/prow/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { sha256 = "0mc3ynmbf3kidibdy8k3v3xjlvmxl8w7zm1z2m0skmhd0y4bpmk4"; }; - modSha256 = "1xajdg10a27icc7g1y3ym4pkgg64rp4afybbjlhbg3k3whir9xa1"; + vendorSha256 = "16fdc5r28andm8my4fxj0f1yygx6j2mvn92i6xdfhbcra0lvr4ql"; subPackages = [ "prow/cmd/admission" @@ -63,4 +63,4 @@ buildGoModule rec { maintainers = with maintainers; [ kalbasit ]; platforms = platforms.linux ++ platforms.darwin; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/qbec/default.nix b/pkgs/applications/networking/cluster/qbec/default.nix index 53b421ec5521d..ddde1e50eddeb 100644 --- a/pkgs/applications/networking/cluster/qbec/default.nix +++ b/pkgs/applications/networking/cluster/qbec/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0krdfaha19wzi10rh0wfhki5nknbd5mndaxhrq7y9m840xy43d6d"; }; - modSha256 = "1wb15vrkb4ryvrjp68ygmadnf78s354106ya210pnmsbb53rbhaz"; + vendorSha256 = "1cyr621fb6hxwswz9lf75brc9qjy1n9rqjkwi6r8s3y6nhw20db6"; meta = with lib; { description = "Configure kubernetes objects on multiple clusters using jsonnet https://qbec.io"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ groodt ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/terraform-providers/elasticsearch/default.nix b/pkgs/applications/networking/cluster/terraform-providers/elasticsearch/default.nix index 1aadbbc5ccd38..6afa63c4a525c 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/elasticsearch/default.nix +++ b/pkgs/applications/networking/cluster/terraform-providers/elasticsearch/default.nix @@ -10,7 +10,7 @@ buildGoModule rec { sha256 = "0ci9gcn9ijdbx25wa99iy0b3sl7akqa7b6gi9wnnl1dawpqznj7v"; }; - modSha256 = "1xk21xswqwpv34j4ba4fj8lcbvfdd12x7rq1hrdyd21mdhmrhw0p"; + vendorSha256 = "1rdvyypdl3fk6af66gfjhyl271cnlx5xgrl1w68sc6sbvq00bqkd"; subPackages = [ "." ]; @@ -24,4 +24,4 @@ buildGoModule rec { license = licenses.mpl20; maintainers = with maintainers; [ basvandijk ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/terraform-providers/lxd/default.nix b/pkgs/applications/networking/cluster/terraform-providers/lxd/default.nix index fd2a6c36d65c3..69d93ac1c7547 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/lxd/default.nix +++ b/pkgs/applications/networking/cluster/terraform-providers/lxd/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1k54021178zybh9dqly2ly8ji9x5rka8dn9xd6rv7gkcl5w3y6fv"; }; - modSha256 = "1h95ng9by3i3v15s1ws1fv86a47vglivn42xbffdy94s108g0908"; + vendorSha256 = "1shdpl1zsbbpc3mfs0l65ykq2h15ggvqylaixcap4j4lfl7m9my0"; postBuild = "mv ../go/bin/terraform-provider-lxd{,_v${version}}"; @@ -22,4 +22,4 @@ buildGoModule rec { license = licenses.mpl20; maintainers = with maintainers; [ gila ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/terraform-providers/vpsadmin/default.nix b/pkgs/applications/networking/cluster/terraform-providers/vpsadmin/default.nix index 2f788ed915ee6..270c7adcb47ff 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/vpsadmin/default.nix +++ b/pkgs/applications/networking/cluster/terraform-providers/vpsadmin/default.nix @@ -10,7 +10,7 @@ buildGoModule rec { hash = "sha256-+6jRjcManQdoKh7ewOJI1UaulY5OSbkIUHmtrBI33u4="; }; - modSha256 = "sha256-gz+t50uHFj4BQnJg6kOJI/joJVE+usLpVzTqziek2wY="; + vendorSha256 = "0j90fnzba23mwf9bzf9w5h0hszkl3h61p5i780s9v9c0hbzhbqsh"; subPackages = [ "." ]; @@ -24,4 +24,4 @@ buildGoModule rec { license = licenses.mpl20; maintainers = with maintainers; [ zimbatm ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/cluster/terragrunt/default.nix b/pkgs/applications/networking/cluster/terragrunt/default.nix index 245bd2fffbb0a..6a4e1979e8837 100644 --- a/pkgs/applications/networking/cluster/terragrunt/default.nix +++ b/pkgs/applications/networking/cluster/terragrunt/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1znb9d4n9zv3dq10dw17kb1h04gj8iz6gwx1a741fcf4ygp8zpy1"; }; - modSha256 = "0pjqsb6lxk73prc6jxj07iwd1wyy5gqz24kigb308r3n0c2vcnky"; + vendorSha256 = "0h737h25f80zfx84vm6ry0581c32ylcb5h9givqk5k5kh5qgkbgx"; buildInputs = [ makeWrapper ]; @@ -30,4 +30,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ peterhoeg ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/gmailctl/default.nix b/pkgs/applications/networking/gmailctl/default.nix index a7dc6fe1550d2..a9b9436a211ae 100644 --- a/pkgs/applications/networking/gmailctl/default.nix +++ b/pkgs/applications/networking/gmailctl/default.nix @@ -14,7 +14,7 @@ buildGoModule rec { sha256 = "08q4yjfbwlldirf3j5db18l8kn6sf288wd364s50jlcx2ka8w50j"; }; - modSha256 = "1c7dk6l8lkq2j04cp5g97hwkwfmmyn5r0vpr5zpavvalxgjidsf4"; + vendorSha256 = "0qp8n7z3vcsbc6safp7i18i0i3r4hy4nidzwl85i981sg12vcg6b"; meta = with stdenv.lib; { description = "Declarative configuration for Gmail filters"; @@ -23,5 +23,4 @@ buildGoModule rec { maintainers = [ maintainers.doronbehar ]; platforms = platforms.unix; }; -} - +} \ No newline at end of file diff --git a/pkgs/applications/networking/hydroxide/default.nix b/pkgs/applications/networking/hydroxide/default.nix index 679b3f4014fae..4753cd464b13d 100644 --- a/pkgs/applications/networking/hydroxide/default.nix +++ b/pkgs/applications/networking/hydroxide/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0d8wjyzmw89yhrszz487f7i19rcz7xlx4w2wd4c69k5nsdrs6dys"; }; - modSha256 = "0888ikywclhjb4n7xqxc7hvzlhx1qhf4c3skaddqs3nrxm171jwn"; + vendorSha256 = "0d8yfmsl8rycbq8gjnvc657j14644lq0zmr9l88ik360szw6v6gc"; subPackages = [ "cmd/hydroxide" ]; @@ -22,4 +22,4 @@ buildGoModule rec { maintainers = with maintainers; [ filalex77 ]; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/instant-messengers/gomuks/default.nix b/pkgs/applications/networking/instant-messengers/gomuks/default.nix index 2962d190d369d..c58940c6c32c6 100644 --- a/pkgs/applications/networking/instant-messengers/gomuks/default.nix +++ b/pkgs/applications/networking/instant-messengers/gomuks/default.nix @@ -5,6 +5,7 @@ buildGoModule rec { version = "2020-03-20"; goPackagePath = "maunium.net/go/gomuks"; + patches = [ ./gomod.patch ]; src = fetchFromGitHub { owner = "tulir"; @@ -13,7 +14,7 @@ buildGoModule rec { sha256 = "0f7i88vrvl1xl4hmjplq3wwihqwijbgxy6nk5fkvc8pfmm5hsjcs"; }; - modSha256 = "10w0bjhnf6bbqx5jbgfv2jxxyqswzx25p64kkjmvh5qamjzpbjz2"; + vendorSha256 = "0awiw41nzgp4gj9fd8lcgk880aa07n535jksn0ya1cmsgavcfbvc"; postInstall = '' cp -r ${ @@ -37,4 +38,4 @@ buildGoModule rec { maintainers = with maintainers; [ tilpner emily ]; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/instant-messengers/gomuks/gomod.patch b/pkgs/applications/networking/instant-messengers/gomuks/gomod.patch new file mode 100644 index 0000000000000..ca8a32a4d2fba --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/gomuks/gomod.patch @@ -0,0 +1,20 @@ +diff --git a/go.mod b/go.mod +index 75d4a09..ef2a7ef 100644 +--- a/go.mod ++++ b/go.mod +@@ -9,13 +9,14 @@ require ( + github.com/lithammer/fuzzysearch v1.1.0 + github.com/lucasb-eyer/go-colorful v1.0.3 + github.com/mattn/go-runewidth v0.0.8 ++ github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect + github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect + github.com/pkg/errors v0.9.1 + github.com/rivo/uniseg v0.1.0 + github.com/russross/blackfriday/v2 v2.0.1 + github.com/sasha-s/go-deadlock v0.2.0 + github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect +- github.com/stretchr/testify v1.5.1 ++ github.com/stretchr/testify v1.3.0 + go.etcd.io/bbolt v1.3.3 + golang.org/x/image v0.0.0-20200119044424-58c23975cae1 + golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e diff --git a/pkgs/applications/networking/ipfs-cluster/default.nix b/pkgs/applications/networking/ipfs-cluster/default.nix index f921970175a2a..c41912794d06d 100644 --- a/pkgs/applications/networking/ipfs-cluster/default.nix +++ b/pkgs/applications/networking/ipfs-cluster/default.nix @@ -5,7 +5,7 @@ buildGoModule rec { version = "0.12.1"; rev = "v${version}"; - modSha256 = "0bn47lcb9plzvl2vqqj7p33ishz6bbqpsgf2i6p34g13bwwpq647"; + vendorSha256 = "1n0zb3v83wsy8y3k7xbpjc2ykh1b2n6p10d5wkflhga49q7rf64h"; src = fetchFromGitHub { owner = "ipfs"; @@ -21,5 +21,4 @@ buildGoModule rec { platforms = platforms.unix; maintainers = with maintainers; [ jglukasik ]; }; -} - +} \ No newline at end of file diff --git a/pkgs/applications/networking/ipfs-migrator/default.nix b/pkgs/applications/networking/ipfs-migrator/default.nix index 727f89da9a2b0..7a9d8f6397073 100644 --- a/pkgs/applications/networking/ipfs-migrator/default.nix +++ b/pkgs/applications/networking/ipfs-migrator/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "18pjxkxfbsbbj4hs4xyzfmmz991h31785ldx41dll6wa9zx4lsnm"; }; - modSha256 = "1magqgbb6prnihr8lr6jc2fcgsbqqc9y317mkdnvq9qs6bj0a6qj"; + vendorSha256 = null; subPackages = [ "." ]; @@ -22,4 +22,4 @@ buildGoModule rec { platforms = platforms.unix; maintainers = with maintainers; [ elitak ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/mailreaders/aerc/default.nix b/pkgs/applications/networking/mailreaders/aerc/default.nix index f53f2244e9f14..5841283563930 100644 --- a/pkgs/applications/networking/mailreaders/aerc/default.nix +++ b/pkgs/applications/networking/mailreaders/aerc/default.nix @@ -1,6 +1,7 @@ { stdenv, buildGoModule, fetchurl , go, ncurses, notmuch, scdoc , python3, perl, w3m, dante +, fetchFromGitHub }: let @@ -14,7 +15,21 @@ in buildGoModule rec { sha256 = "1bx2fypw053v3bzalfgyi6a0s5fvv040z8jy4i63s7p53m8gmzs9"; }; - modSha256 = "127xrah6xxrvc224g5dxn432sagrssx8v7phzapcsdajsnmagq6x"; + libvterm = fetchFromGitHub { + owner = "ddevault"; + repo = "go-libvterm"; + rev = "b7d861da381071e5d3701e428528d1bfe276e78f"; + sha256 = "06vv4pgx0i6hjdjcar4ch18hp9g6q6687mbgkvs8ymmbacyhp7s6"; + }; + + vendorSha256 = "0rnyjjlsxsi0y23m6ckyd52562m33qr35fvdcdzy31mbfpi8kl2k"; + + overrideModAttrs = (_: { + postBuild = '' + cp -r --reflink=auto ${libvterm}/libvterm vendor/github.com/ddevault/go-libvterm + cp -r --reflink=auto ${libvterm}/encoding vendor/github.com/ddevault/go-libvterm + ''; + }); nativeBuildInputs = [ scdoc @@ -60,4 +75,4 @@ in buildGoModule rec { license = licenses.mit; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/mailreaders/hasmail/default.nix b/pkgs/applications/networking/mailreaders/hasmail/default.nix index 49f0ac5336594..b02788e677224 100644 --- a/pkgs/applications/networking/mailreaders/hasmail/default.nix +++ b/pkgs/applications/networking/mailreaders/hasmail/default.nix @@ -19,7 +19,7 @@ buildGoModule rec { sha256 = "1p6kwa5xk1mb1fkkxz1b5rcyp5kb4zc8nfif1gk6fab6wbdj9ia1"; }; - modSha256 = "0z3asz7v1izg81f9xifx9s2sp5hly173hajsn9idi3bkv0h78is2"; + vendorSha256 = "0sblgjmn3i3k31jfq5zy3bx7bv5z2cg6rjzr7aj87c57yhzzcmk7"; nativeBuildInputs = [ pkgconfig @@ -38,4 +38,4 @@ buildGoModule rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/p2p/magnetico/default.nix b/pkgs/applications/networking/p2p/magnetico/default.nix index da7713d7bc62c..1dcf42b7ece17 100644 --- a/pkgs/applications/networking/p2p/magnetico/default.nix +++ b/pkgs/applications/networking/p2p/magnetico/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1622xcl5v67lrnkjwbg7g5b5ikrawx7p91jxbj3ixc1za2f3a3fn"; }; - modSha256 = "193n323xaypm9xkpray68nqcgyf141x8qzpxzwjnrmsgfz8p6wgk"; + vendorSha256 = "0g4m0jnpy0q64xnflphyc0lmhni0q9448h7grbbr7f1s9lpqsjml"; nativeBuildInputs = [ go-bindata ]; buildPhase = '' @@ -30,4 +30,4 @@ buildGoModule rec { badPlatforms = platforms.darwin; maintainers = with maintainers; [ rnhmjoj ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/syncthing/default.nix b/pkgs/applications/networking/syncthing/default.nix index fa3290f74850c..a00d0eb819eaa 100644 --- a/pkgs/applications/networking/syncthing/default.nix +++ b/pkgs/applications/networking/syncthing/default.nix @@ -13,7 +13,7 @@ let sha256 = "0yy31rfvr9d6kidfvvy36ljxlc14x5ir3ln19zg4k02hdqn0xkpj"; }; - modSha256 = "1vs7lxlqd7jr4r9xkk7w7k6gxzjmm7ic0a1scfpx8rcr5swa9cq1"; + vendorSha256 = "03df08nghcf6k3a7xxgw03cq2mvvkmrrzzai0w18mrga0aa700c9"; patches = [ ./add-stcli-target.patch @@ -103,4 +103,4 @@ in { --replace /usr/bin/strelaysrv $out/bin/strelaysrv ''; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/networking/websocketd/default.nix b/pkgs/applications/networking/websocketd/default.nix index 4160e70b9c444..17f42b5ece4f9 100644 --- a/pkgs/applications/networking/websocketd/default.nix +++ b/pkgs/applications/networking/websocketd/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1qc4yi4kwy7bfi3fb17w58ff0i95yi6m4syldh8j79930syr5y8q"; }; - modSha256 = "18hamj557ln8k3vmvcrpvnydjr1dy7zi9490iacwdldw5vp870xs"; + vendorSha256 = "05k31z4h3b327mh940zh52im4xfk7kf5phb8b7xp4l9bgckhz4lb"; meta = with lib; { description = "Turn any program that uses STDIN/STDOUT into a WebSocket server"; @@ -19,4 +19,4 @@ buildGoModule rec { maintainers = [ maintainers.bjornfor ]; license = licenses.bsd2; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/version-management/git-and-tools/gh/default.nix b/pkgs/applications/version-management/git-and-tools/gh/default.nix index adec2a361b545..2386ac87ceab0 100644 --- a/pkgs/applications/version-management/git-and-tools/gh/default.nix +++ b/pkgs/applications/version-management/git-and-tools/gh/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "08fy3677yq52x40rab49ijhw4r25ls2807dbv9wpna6w07n7r8v7"; }; - modSha256 = "0v33x9bnwjfg4425vralnsb4i22c0g1rcmaga9911v0i7d51k0fn"; + vendorSha256 = "0s99bjmsafnzhl3s2lcybxgsw1s4i1h3vh6p40gz4vsfhndidqrq"; buildFlagsArray = [ "-ldflags=-s -w -X github.com/cli/cli/command.Version=${version}" @@ -33,4 +33,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ zowoq ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/version-management/git-and-tools/ghq/default.nix b/pkgs/applications/version-management/git-and-tools/ghq/default.nix index f9d8eab8e55aa..3401e851b31b8 100644 --- a/pkgs/applications/version-management/git-and-tools/ghq/default.nix +++ b/pkgs/applications/version-management/git-and-tools/ghq/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1i0q9lxdxbyj0l0510cbkwkbycawrx8cxlbdrhb2p2fnk0vqnyiv"; }; - modSha256 = "0hlbhky3c6zva9khn73n6xgq57k5p8anskxy3g2m0wzhr72cyc41"; + vendorSha256 = "1r8lvy2xk0gvlwy6k86wh14ajb6hgs9f1fwfqk17ra1cb404l2lz"; buildFlagsArray = '' -ldflags= @@ -29,4 +29,4 @@ buildGoModule rec { maintainers = with stdenv.lib.maintainers; [ sigma ]; license = stdenv.lib.licenses.mit; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/version-management/git-and-tools/git-bug/default.nix b/pkgs/applications/version-management/git-and-tools/git-bug/default.nix index 3ca25d6cf13ec..0903af7499a70 100644 --- a/pkgs/applications/version-management/git-and-tools/git-bug/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-bug/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { sha256 = "01ab3mlwh5g1vr3x85fppflg18gb8ip9mjfsp2b5rfigd9lxyyns"; }; - modSha256 = "05wxvzsbhvz15596019vs7h09kynfsfjx3i5xyrl5xjzdxbaqbrq"; + vendorSha256 = "0c8b47lj4wl3s21lm0vx4z7hznylm8c4fb8b8gxm278kn3zys607"; buildFlagsArray = '' -ldflags= @@ -35,4 +35,4 @@ buildGoModule rec { platforms = platforms.all; maintainers = with maintainers; [ royneary ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/version-management/git-and-tools/git-subtrac/default.nix b/pkgs/applications/version-management/git-and-tools/git-subtrac/default.nix index a5097697a8679..df29eb1523536 100644 --- a/pkgs/applications/version-management/git-and-tools/git-subtrac/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-subtrac/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1nj950r38sxzrgw69m1xphm7a4km2g29iw2897gfx4wx57jl957k"; }; - modSha256 = "147vzllp1gydk2156hif313vwykagrj35vaiqy1swqczxs7p9hhs"; + vendorSha256 = "1ccwbhzwys8sl3m2rs2lp70snzsi2a0ahnnq8kn15rrlvsv5qahf"; meta = with lib; { description = "Keep the content for your git submodules all in one place: the parent repo"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = [ maintainers.marsam ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/version-management/git-and-tools/lab/default.nix b/pkgs/applications/version-management/git-and-tools/lab/default.nix index 5a00d6b1f86fc..eaab2e6c5054c 100644 --- a/pkgs/applications/version-management/git-and-tools/lab/default.nix +++ b/pkgs/applications/version-management/git-and-tools/lab/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { subPackages = [ "." ]; - modSha256 = "03fqa7s6729g0a6ffiyc61dkldpi7vg8pvvpqak4c0mqi1dycivd"; + vendorSha256 = "1lrmafvv5zfn9kc0p8g5vdz351n1zbaqwhwk861fxys0rdpqskyc"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; @@ -31,4 +31,4 @@ buildGoModule rec { maintainers = with maintainers; [ marsam dtzWill ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/version-management/git-and-tools/lefthook/default.nix b/pkgs/applications/version-management/git-and-tools/lefthook/default.nix index 9fc89d520ae90..613e5bf10d685 100644 --- a/pkgs/applications/version-management/git-and-tools/lefthook/default.nix +++ b/pkgs/applications/version-management/git-and-tools/lefthook/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "14rcvbzzrx0m3xijl8qhw5l2h0q10hqzad2hqm3079g893f2qad0"; }; - modSha256 = "0ih11gw2y9dhv3zw1fzjmdfjln5h6zg1bj7sl68cglf6743siqnq"; + vendorSha256 = "1pdrw4vwbj9cka2pjbjvxviigfvnrf8sgws27ixwwiblbkj4isc8"; meta = with stdenv.lib; { description = "Fast and powerful Git hooks manager for any type of projects"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ rencire ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/version-management/sourcehut/builds.nix b/pkgs/applications/version-management/sourcehut/builds.nix index 99907993104f7..a40a0552338dc 100644 --- a/pkgs/applications/version-management/sourcehut/builds.nix +++ b/pkgs/applications/version-management/sourcehut/builds.nix @@ -11,7 +11,7 @@ let pname = "builds-sr-ht-worker"; goPackagePath = "git.sr.ht/~sircmpwn/builds.sr.ht/worker"; - modSha256 = "10is7siscids9qz6jh9m1i17749dafqqkg4b3sslmxaxyn16yj97"; + vendorSha256 = "0prdlihcy5yz760llwyby747yy2981dn3gy401a48df7ndlfj6lp"; }; in buildPythonPackage rec { inherit version; @@ -57,4 +57,4 @@ in buildPythonPackage rec { license = licenses.agpl3; maintainers = with maintainers; [ eadwu ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/version-management/sourcehut/git.nix b/pkgs/applications/version-management/sourcehut/git.nix index de4656e588162..27ac5cc858dc0 100644 --- a/pkgs/applications/version-management/sourcehut/git.nix +++ b/pkgs/applications/version-management/sourcehut/git.nix @@ -11,7 +11,7 @@ let pname = "gitsrht-shell"; goPackagePath = "git.sr.ht/~sircmpwn/git.sr.ht/gitsrht-shell"; - modSha256 = "0lxxxzh39bviab71kfsqqr217338yxn5l2zkak55r6qqs6iz4ccv"; + vendorSha256 = "1zvbqn4r940mibn4h1cqz94gbr476scm281ps361n0rfqlimw8g5"; }; buildDispatcher = src: buildGoModule { @@ -19,7 +19,7 @@ let pname = "gitsrht-dispatcher"; goPackagePath = "git.sr.ht/~sircmpwn/git.sr.ht/gitsrht-dispatch"; - modSha256 = "1lmgmlin460g09dph2hw6yz25d4agqwjhrjv0qqsis7df9qpf3i1"; + vendorSha256 = "1lzkf13m54pq0gnn3bcxc80nfg76hgck4l8q8jpaicrsiwgcyrd9"; }; buildKeys = src: buildGoModule { @@ -27,7 +27,7 @@ let pname = "gitsrht-keys"; goPackagePath = "git.sr.ht/~sircmpwn/git.sr.ht/gitsrht-keys"; - modSha256 = "1pfcw9n63zhlxm9kd3bxa2zqmzd8mgl7yl2ck055j56v3k929w3f"; + vendorSha256 = "16j7kpar318s4766pln8xn6d51xqblwig5n1jywhj0sl80qjl5cv"; }; buildUpdateHook = src: buildGoModule { @@ -35,7 +35,7 @@ let pname = "gitsrht-update-hook"; goPackagePath = "git.sr.ht/~sircmpwn/git.sr.ht/gitsrht-update-hook"; - modSha256 = "0p8qd6hpgmnlfqk5vw6l41dqs7qjhf6xijzj5iv6wv1cf362b4wp"; + vendorSha256 = "1rmv3p60g6w4h4v9wx99jkyx0q02snslyjrjy9n1flardjs01b63"; }; in buildPythonPackage rec { inherit version; @@ -79,4 +79,4 @@ in buildPythonPackage rec { license = licenses.agpl3; maintainers = with maintainers; [ eadwu ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/virtualization/firectl/default.nix b/pkgs/applications/virtualization/firectl/default.nix index f91cc6d5ed3ec..47ae4637b57e1 100644 --- a/pkgs/applications/virtualization/firectl/default.nix +++ b/pkgs/applications/virtualization/firectl/default.nix @@ -4,6 +4,8 @@ buildGoModule rec { pname = "firectl"; version = "0.1.0"; + patches = [ ./gomod.patch ]; + src = fetchFromGitHub { owner = "firecracker-microvm"; repo = pname; @@ -11,7 +13,7 @@ buildGoModule rec { sha256 = "1ni3yx4rjhrkqk2038c6hkb2jwsdj2llx233wd5wgpvb6c57652p"; }; - modSha256 = "1nqjz1afklcxc3xcpmygjdh3lfxjk6zvmghr8z8fr3nw2wvw2ddr"; + vendorSha256 = "1xbpck1gvzl75xgrajf5yzl199l4f2f6j3mac5586i7b00b9jxqj"; meta = with stdenv.lib; { description = "A command-line tool to run Firecracker microVMs"; @@ -20,4 +22,4 @@ buildGoModule rec { platforms = platforms.linux; maintainers = with maintainers; [ xrelkd ]; }; -} +} \ No newline at end of file diff --git a/pkgs/applications/virtualization/firectl/gomod.patch b/pkgs/applications/virtualization/firectl/gomod.patch new file mode 100644 index 0000000000000..96c65e7282211 --- /dev/null +++ b/pkgs/applications/virtualization/firectl/gomod.patch @@ -0,0 +1,15 @@ +diff --git a/go.mod b/go.mod +index 1044001..7bafeda 100644 +--- a/go.mod ++++ b/go.mod +@@ -1,7 +1,10 @@ + module github.com/firecracker-microvm/firectl + ++go 1.14 ++ + require ( + github.com/firecracker-microvm/firecracker-go-sdk v0.15.1 ++ github.com/go-openapi/strfmt v0.17.1 + github.com/jessevdk/go-flags v1.4.0 + github.com/pkg/errors v0.8.0 + github.com/sirupsen/logrus v1.1.1 diff --git a/pkgs/applications/virtualization/gvisor/containerd-shim.nix b/pkgs/applications/virtualization/gvisor/containerd-shim.nix index 702aeaded3e98..97623511222f0 100644 --- a/pkgs/applications/virtualization/gvisor/containerd-shim.nix +++ b/pkgs/applications/virtualization/gvisor/containerd-shim.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "077bhrmjrpcxv1z020yxhx2c4asn66j21gxlpa6hz0av3lfck9lm"; }; - modSha256 = "1jdhgbrn59ahnabwnig99i21f6kimmqx9f3dg10ffwfs3dx0gzlg"; + vendorSha256 = "11jai5jl024k7wbhz4a3zzdbvl0si07jwgwmyr8bn4i0nqx8ig2k"; buildPhase = '' make @@ -33,4 +33,4 @@ buildGoModule rec { maintainers = with maintainers; [ andrew-d ]; platforms = [ "x86_64-linux" ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/compilers/go-jsonnet/default.nix b/pkgs/development/compilers/go-jsonnet/default.nix index a39ee351f21ec..6c00d5ee6ce55 100644 --- a/pkgs/development/compilers/go-jsonnet/default.nix +++ b/pkgs/development/compilers/go-jsonnet/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0l6cwky2xl7m8nnc9abp76bhkdcf2ldbbv3r8p30xv2yr5wd1j8i"; }; - modSha256 = "1b6hz5a66hhlzpcv1badxr1b4nmk4lw0507d5jks7lqzvvwd0sxq"; + vendorSha256 = "1vdv0nq31mjprxzxf8x0diaigissy07vnm338h8jrk5i74x5by39"; subPackages = [ "cmd/jsonnet" ]; @@ -21,4 +21,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ nshalman ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/compilers/tinygo/default.nix b/pkgs/development/compilers/tinygo/default.nix index 069ef69dc7ef6..b955cd7f87a7b 100644 --- a/pkgs/development/compilers/tinygo/default.nix +++ b/pkgs/development/compilers/tinygo/default.nix @@ -1,6 +1,9 @@ { lib, buildGoModule, fetchFromGitHub, llvm, clang-unwrapped, lld, avrgcc -, avrdude, openocd, gcc-arm-embedded, makeWrapper }: +, avrdude, openocd, gcc-arm-embedded, makeWrapper, fetchurl }: +let main = ./main.go; + gomod = ./go.mod; +in buildGoModule rec { pname = "tinygo"; version = "0.13.0"; @@ -11,8 +14,19 @@ buildGoModule rec { rev = "v${version}"; sha256 = "0x59j56y704m2hfkg78illgw9f6czrx265x887jfd989lnxphyqa"; }; + + overrideModAttrs = (_: { + patches = []; + preBuild = '' + rm -rf * + cp ${main} main.go + cp ${gomod} go.mod + ''; + }); - modSha256 = "0y8n4mcr4jhas29ahvk8k4zbj1iz65fdpsgq61qa8kcsm8m5kqa6"; + preBuild = "cp ${gomod} go.mod"; + + vendorSha256 = "19194dlzpl6zzw2gqybma5pwip71rw8z937f104k6c158qzzgy62"; enableParallelBuilding = true; subPackages = [ "." ]; buildInputs = [ llvm clang-unwrapped makeWrapper ]; diff --git a/pkgs/development/compilers/tinygo/go.mod b/pkgs/development/compilers/tinygo/go.mod new file mode 100644 index 0000000000000..f01b38d3e5127 --- /dev/null +++ b/pkgs/development/compilers/tinygo/go.mod @@ -0,0 +1,13 @@ +module github.com/tinygo-org/tinygo + +go 1.14 + +require ( + github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2 + github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf + github.com/marcinbor85/gohex v0.0.0-20180128172054-7a43cd876e46 + go.bug.st/serial v1.0.0 + golang.org/x/tools v0.0.0-20200512001501-aaeff5de670a + google.golang.org/appengine v1.4.0 + tinygo.org/x/go-llvm v0.0.0-20200401165421-8d120882fc7a +) diff --git a/pkgs/development/compilers/tinygo/main.go b/pkgs/development/compilers/tinygo/main.go new file mode 100644 index 0000000000000..050cf8afe39f1 --- /dev/null +++ b/pkgs/development/compilers/tinygo/main.go @@ -0,0 +1,18 @@ +package main + +import ( + "fmt" + + _ "github.com/blakesmith/ar" + _ "github.com/google/shlex" + _ "github.com/marcinbor85/gohex" + _ "go.bug.st/serial" + _ "golang.org/x/tools/go/ast/astutil" + _ "golang.org/x/tools/go/ssa" + _ "google.golang.org/appengine" + _ "tinygo.org/x/go-llvm" +) + +func main() { + fmt.Println("vim-go") +} diff --git a/pkgs/development/interpreters/joker/default.nix b/pkgs/development/interpreters/joker/default.nix index 39588a0c363b8..789816c34d040 100644 --- a/pkgs/development/interpreters/joker/default.nix +++ b/pkgs/development/interpreters/joker/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1pxj6flyhf522zjab1dfvxfajyx3v3rzs7l8ma7ma6b8zmwp2wdn"; }; - modSha256 = "165mjfjk4x95ckw7wg96bg9pzb3297sggnip38nz2jxxbqr0ff8b"; + vendorSha256 = "1rn8ijq3v3fzlbyvm7g4i3qpwcl3vrl4rbcvlbzv05wxrgcw9iqb"; preBuild = '' go generate ./... @@ -26,4 +26,4 @@ buildGoModule rec { platforms = platforms.all; maintainers = with maintainers; [ andrestylianos ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/libraries/packr/default.nix b/pkgs/development/libraries/packr/default.nix index 6a53743a10eae..ec2de274ccb2a 100644 --- a/pkgs/development/libraries/packr/default.nix +++ b/pkgs/development/libraries/packr/default.nix @@ -18,7 +18,7 @@ let p2 = buildGoModule rec { subPackages = [ "packr2" ]; - modSha256 = "1xxqyn78074jna0iri7sks6b2l4sdnn5sg57n09vrrf6kh39h2y9"; + vendorSha256 = "12yq121b0bn8z12091fyqhhz421kgx4z1nskrkvbxlhyc47bwyrp"; meta = with stdenv.lib; { description = "The simple and easy way to embed static files into Go binaries"; @@ -40,7 +40,7 @@ p1 = buildGoModule rec { subPackages = [ "packr" ]; - modSha256 = "045qfdi82yhpghjd0cimxhas4nkj7g30n9qyvkrl9ck01sahx76f"; + vendorSha256 = "0m3yj8ww4a16j56p8d8w0sdnyx0g2bkd8zg0l4d8vb72mvg5asga"; meta = with lib; { description = "The simple and easy way to embed static files into Go binaries"; @@ -53,4 +53,4 @@ in symlinkJoin{ name = "packr"; paths = [p1 p2]; -} +} \ No newline at end of file diff --git a/pkgs/development/libraries/protolock/default.nix b/pkgs/development/libraries/protolock/default.nix index f1eb3ae51f32e..2bdaa3ab7b6f7 100644 --- a/pkgs/development/libraries/protolock/default.nix +++ b/pkgs/development/libraries/protolock/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0qg26vcqdhgy91p6wiv16dq73ay0fymran3d8ylca9264zwi2vxw"; }; - modSha256 = "1q755ipqsfpr41s5fxzmx50lwcdqc5a7akwx6mzn789w2z07x8lg"; + vendorSha256 = "0ap1iwcapvvvmwgdc4zbsp8mglrhbswkdgm4dw8baw8qk0nlci6y"; postInstall = '' rm $out/bin/plugin* @@ -23,4 +23,4 @@ buildGoModule rec { license = licenses.bsd3; maintainers = with maintainers; [ groodt ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/analysis/tflint/default.nix b/pkgs/development/tools/analysis/tflint/default.nix index 8ad237bd1d2d7..bcd4f7daec8a0 100644 --- a/pkgs/development/tools/analysis/tflint/default.nix +++ b/pkgs/development/tools/analysis/tflint/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0mdxs019vzpfxaqkw4nb79p3rydril0ihbn55n4yyh0fznv6zzxi"; }; - modSha256 = "0ksblhra7ln4ryggr2x8fzl8a7ljz5zdjgdxz82c75wd7wdbw8f5"; + vendorSha256 = "0kjz9v7r7g4cg11w77ijfmvwnbbkrvrfwwsfsmyxrlhznmb3v0wi"; subPackages = [ "." ]; @@ -22,4 +22,4 @@ buildGoModule rec { license = licenses.mpl20; maintainers = [ maintainers.marsam ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/azcopy/default.nix b/pkgs/development/tools/azcopy/default.nix index 87e732e8dc701..903245deb31e2 100644 --- a/pkgs/development/tools/azcopy/default.nix +++ b/pkgs/development/tools/azcopy/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { subPackages = [ "." ]; - modSha256 = "02c668bp1pfrd994lhg6z3hm1qg3530nk9aw1cahiwj549vxxfhm"; + vendorSha256 = "1276k2hpyr7bqp6hdi576xcdcd2c8vz100jpls663z7vb2rbpvxf"; postInstall = '' ln -rs "$out/bin/azure-storage-azcopy" "$out/bin/azcopy" @@ -24,4 +24,4 @@ buildGoModule rec { license = licenses.mit; description = "The new Azure Storage data transfer utility - AzCopy v10"; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/bazel-gazelle/default.nix b/pkgs/development/tools/bazel-gazelle/default.nix index ca2a0ec1e6822..ff019e785100a 100644 --- a/pkgs/development/tools/bazel-gazelle/default.nix +++ b/pkgs/development/tools/bazel-gazelle/default.nix @@ -14,7 +14,7 @@ buildGoModule rec { sha256 = "1rw9zq8rmc0zr91kk70xl67dl6jx4dswwisv3bd1f16yncqgv2a1"; }; - modSha256 = "0bfhy0ig8apxb5qzxjdj6q7jr2i6rdq0ffby0pha8viadah8v2rm"; + vendorSha256 = null; subPackages = [ "cmd/gazelle" ]; @@ -28,4 +28,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ kalbasit ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/bazelisk/default.nix b/pkgs/development/tools/bazelisk/default.nix index 80ec4c4f448d2..d59e409b5ddf0 100644 --- a/pkgs/development/tools/bazelisk/default.nix +++ b/pkgs/development/tools/bazelisk/default.nix @@ -4,6 +4,8 @@ buildGoModule rec { pname = "bazelisk"; version = "1.4.0"; + patches = [ ./gomod.patch ]; + src = fetchFromGitHub { owner = "bazelbuild"; repo = pname; @@ -11,7 +13,7 @@ buildGoModule rec { sha256 = "14zp0bi0p1rfbx1pxi5y28ndxwbqbvfx0pvy3jh1mnx5qsii1gcq"; }; - modSha256 = "1w8k659ifapcxbbim0nf7wd7w10bhlagc33q08izh84gcgsh0yyz"; + vendorSha256 = "10156k90ky3znb9rxhy7zasskxmlcs5cn9f3xk25ana1c66vxszr"; buildFlagsArray = [ "-ldflags=-s -w -X main.BazeliskVersion=${version}" ]; @@ -24,4 +26,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ elasticdog ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/bazelisk/gomod.patch b/pkgs/development/tools/bazelisk/gomod.patch new file mode 100644 index 0000000000000..e5ff46bfa7bf5 --- /dev/null +++ b/pkgs/development/tools/bazelisk/gomod.patch @@ -0,0 +1,12 @@ +diff --git a/go.mod b/go.mod +index 8eef134..54382cb 100644 +--- a/go.mod ++++ b/go.mod +@@ -3,6 +3,7 @@ module github.com/bazelbuild/bazelisk + go 1.14 + + require ( ++ github.com/bazelbuild/rules_go v0.22.4 + github.com/hashicorp/go-version v1.2.0 + github.com/mitchellh/go-homedir v1.1.0 + ) diff --git a/pkgs/development/tools/build-managers/mage/default.nix b/pkgs/development/tools/build-managers/mage/default.nix index 37cea6adb1a52..ed145d38c7f74 100644 --- a/pkgs/development/tools/build-managers/mage/default.nix +++ b/pkgs/development/tools/build-managers/mage/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0lazf4r5ps1s04pvz608qaxbrbc6dv0j99n39iv42zwxxh0mbd0p"; }; - modSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"; + vendorSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"; buildFlagsArray = [ "-ldflags=" @@ -27,4 +27,4 @@ buildGoModule rec { maintainers = with maintainers; [ swdunlop ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/conftest/default.nix b/pkgs/development/tools/conftest/default.nix index 2d7c2c03cea8b..eb55bf5dd4c4f 100644 --- a/pkgs/development/tools/conftest/default.nix +++ b/pkgs/development/tools/conftest/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "15xzldcmnpfg1hd5zr5i7x2zjrgkwnp4nylxbn9kfic2dpjp1a38"; }; - modSha256 = "0nwmxmh1pmism5r9zzghfrzizr1fbyc8d4jljrbzjjq1l449r2ja"; + vendorSha256 = "1kay7b5rxypj4i0d2iwdlb1mj0qq3zvlrjp34zzv5kywz5gy4144"; buildFlagsArray = '' -ldflags= @@ -25,4 +25,4 @@ buildGoModule rec { maintainers = with maintainers; [ yurrriq ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/continuous-integration/drone-cli/default.nix b/pkgs/development/tools/continuous-integration/drone-cli/default.nix index a3df81d260532..bbd2c2f193586 100644 --- a/pkgs/development/tools/continuous-integration/drone-cli/default.nix +++ b/pkgs/development/tools/continuous-integration/drone-cli/default.nix @@ -7,7 +7,7 @@ in buildGoModule rec { revision = "v${version}"; goPackagePath = "github.com/drone/drone-cli"; - modSha256 = "0g0vq4vm2hy00r2gjsrhg57xv9sldlqix3wzimiqdli085bcz46b"; + vendorSha256 = "1zzx5yy0pp0c8pias4sfxfvdzhhrff9f8j51qf6dkif99xwdq3hb"; preBuild = '' buildFlagsArray+=("-ldflags" "-X main.version=${version}") @@ -25,4 +25,4 @@ in buildGoModule rec { license = licenses.asl20; description = "Command line client for the Drone continuous integration server."; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/continuous-integration/drone/default.nix b/pkgs/development/tools/continuous-integration/drone/default.nix index 05257f65af520..54b801da0756f 100644 --- a/pkgs/development/tools/continuous-integration/drone/default.nix +++ b/pkgs/development/tools/continuous-integration/drone/default.nix @@ -5,7 +5,7 @@ buildGoModule rec { version = "1.6.5"; goPackagePath = "github.com/drone/drone"; - modSha256 = "1fyb9218s52w8c6c3v6rgivbyzy5hz4q4z8r75ng2yrmjmmiv2gr"; + vendorSha256 = "1dvf8vz3jr9smki3jql0kvd8z8rwdq93y7blbr2yjjfsdvx6lxl1"; src = fetchFromGitHub { owner = "drone"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.asl20; description = "Continuous Integration platform built on container technology"; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/continuous-integration/fly/default.nix b/pkgs/development/tools/continuous-integration/fly/default.nix index 483b8e6b30c49..216121c8bd3f7 100644 --- a/pkgs/development/tools/continuous-integration/fly/default.nix +++ b/pkgs/development/tools/continuous-integration/fly/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0chavwymyh5kv4fkvdjvf3p5jjx4yn9aavq66333xnsl5pn7q9dq"; }; - modSha256 = "1wiyfii4rmj3rp8ls0ill0sjpnpjz7l3q5fzrscm8ap1qn90gvzg"; + vendorSha256 = "127mc1wzqhn0l4ni6qxcx06qfdb1cgahzypjrs4vgr6i4sipjxck"; subPackages = [ "fly" ]; @@ -34,4 +34,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ ivanbrennan ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/cue/default.nix b/pkgs/development/tools/cue/default.nix index 69e95f0484ae5..0b9bc192c3eea 100644 --- a/pkgs/development/tools/cue/default.nix +++ b/pkgs/development/tools/cue/default.nix @@ -10,7 +10,7 @@ buildGoModule rec { sha256 = "1qbnm3qb8jz9bljw2gb5bb9g41s5lbq4xvcaj3zgi4fc3708hlji"; }; - modSha256 = "0n9idgishlp4gaq12kngi42rq9rnkas7g6cj7jpkk8p30c74ki6z"; + vendorSha256 = "12w2rxp0s3i1ck0qvp2dkg9kk6pyymycdfnfxggcyg4fjshh8afg"; subPackages = [ "cmd/cue" ]; @@ -24,4 +24,4 @@ buildGoModule rec { maintainers = with stdenv.lib.maintainers; [ solson ]; license = stdenv.lib.licenses.asl20; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/database/dbmate/default.nix b/pkgs/development/tools/database/dbmate/default.nix index c710aeaa51670..ccf7a699dae85 100644 --- a/pkgs/development/tools/database/dbmate/default.nix +++ b/pkgs/development/tools/database/dbmate/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "16grd03r41n0vj5fs7j6jk395zs2q0i878p9nh1ycicy64nzmxky"; }; - modSha256 = "1ky6cxpmw93nrk26vyrxz8kqa7247axzaxilm6ciypxf30ad0vdq"; + vendorSha256 = "1915h1hi2y2sx5jvx84c1j281zaz100gbhyalvg5jqjr1van5s4d"; meta = with stdenv.lib; { description = "Database migration tool"; @@ -20,4 +20,4 @@ buildGoModule rec { maintainers = [ maintainers.manveru ]; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/dive/default.nix b/pkgs/development/tools/dive/default.nix index b942e0c919965..b48d7425b1400 100644 --- a/pkgs/development/tools/dive/default.nix +++ b/pkgs/development/tools/dive/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1v69xbkjmyzm5g4wi9amjk65fs4qgxkqc0dvq55vqjigzrranp22"; }; - modSha256 = "1y8mqxlzbizra2m9aayp6w07s39gddvm5igdaw9kwxwjwvd1dbfc"; + vendorSha256 = "0219q9zjc0i6fbdngqh0wjpmq8wj5bjiz5dls0c1aam0lh4vwkhc"; nativeBuildInputs = [ pkg-config ]; @@ -25,4 +25,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ marsam spacekookie ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/go-protobuf/default.nix b/pkgs/development/tools/go-protobuf/default.nix index febf71657eb4c..43731b72a55a3 100644 --- a/pkgs/development/tools/go-protobuf/default.nix +++ b/pkgs/development/tools/go-protobuf/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1k1wb4zr0qbwgpvz9q5ws9zhlal8hq7dmq62pwxxriksayl6hzym"; }; - modSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"; + vendorSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"; meta = with stdenv.lib; { homepage = "https://github.com/golang/protobuf"; @@ -20,4 +20,4 @@ buildGoModule rec { license = licenses.bsd3; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/go-tools/default.nix b/pkgs/development/tools/go-tools/default.nix index 2035408de3bca..faf2e9938d0d3 100644 --- a/pkgs/development/tools/go-tools/default.nix +++ b/pkgs/development/tools/go-tools/default.nix @@ -16,7 +16,7 @@ buildGoModule rec { sha256 = "0pvi1mzhy6zgx4zfgdypbl4zhvgg11hl5qv7blf2qs0a96j2djhf"; }; - modSha256 = "03560xjr2531xj87paskfx2zs364fz6y4kpsid8x08s1syq9nq7p"; + vendorSha256 = "0nbbngsphklzhcmqafrw1im2l1vnfcma9sb4vskdpdrsadv5ss5r"; meta = with lib; { description = "A collection of tools and libraries for working with Go code, including linters and static analysis"; @@ -24,4 +24,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ rvolosatovs kalbasit ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/godef/default.nix b/pkgs/development/tools/godef/default.nix index 5cf5159927207..a1dfac9b79be7 100644 --- a/pkgs/development/tools/godef/default.nix +++ b/pkgs/development/tools/godef/default.nix @@ -8,7 +8,7 @@ buildGoModule rec { goPackagePath = "github.com/rogpeppe/godef"; subPackages = [ "." ]; - modSha256 = "06mi8f2qs54gk2anxqcf70h96s63a99xhnlm294djyv37wy1yffi"; + vendorSha256 = null; src = fetchFromGitHub { inherit rev; @@ -23,4 +23,4 @@ buildGoModule rec { maintainers = with stdenv.lib.maintainers; [ vdemeester rvolosatovs ]; license = stdenv.lib.licenses.bsd3; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/gofumpt/default.nix b/pkgs/development/tools/gofumpt/default.nix index c5e27289615d3..adb2ef463f7a9 100644 --- a/pkgs/development/tools/gofumpt/default.nix +++ b/pkgs/development/tools/gofumpt/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1cw9mmavxz8gxzzwsllvf5lwb2wwi19jbc7hcwxsi4ywp7a84gh0"; }; - modSha256 = "1ladpxhr90awnms2qmlm2lz91wyh92fl3rqbfr54qngrkpkpbhr2"; + vendorSha256 = "14a3p163xy861xb6x160wy15hzjc75n36jdyzaxl877i17shba8z"; meta = with lib; { description = "A stricter gofmt"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.bsd3; maintainers = with maintainers; [ rvolosatovs ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/gogetdoc/default.nix b/pkgs/development/tools/gogetdoc/default.nix index 744ff0b60737a..5d360f4572ab9 100644 --- a/pkgs/development/tools/gogetdoc/default.nix +++ b/pkgs/development/tools/gogetdoc/default.nix @@ -8,7 +8,7 @@ buildGoModule rec { version = "2019-02-28"; rev = "b37376c5da6aeb900611837098f40f81972e63e4"; - modSha256 = "0j6a2b8hx54cnjz1ya65v9czg9ygqj6zwg52ffpz7cqkx0pgl9q4"; + vendorSha256 = null; goPackagePath = "github.com/zmb3/gogetdoc"; excludedPackages = "\\(testdata\\)"; @@ -30,4 +30,4 @@ buildGoModule rec { maintainers = with maintainers; [ kalbasit ]; platforms = platforms.linux ++ platforms.darwin; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/golangci-lint/default.nix b/pkgs/development/tools/golangci-lint/default.nix index 3fa326fe0d2ba..256e534155677 100644 --- a/pkgs/development/tools/golangci-lint/default.nix +++ b/pkgs/development/tools/golangci-lint/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1capiw8af4wmx3wpfslb30xivfyh72x5kj12f8p5pwhl6id31931"; }; - modSha256 = "0adsy71hl6256v40b5gb00kmqswbgfb1576m6lwak1fcfi07hf6b"; + vendorSha256 = "16wr8ixicbvdpg5mg6q07sa1b03ydpwdbvbjl3r9qihdqkhhzlr1"; subPackages = [ "cmd/golangci-lint" ]; meta = with lib; { diff --git a/pkgs/development/tools/gomodifytags/default.nix b/pkgs/development/tools/gomodifytags/default.nix index 2f784b999e271..dd3ea4b26223d 100644 --- a/pkgs/development/tools/gomodifytags/default.nix +++ b/pkgs/development/tools/gomodifytags/default.nix @@ -4,7 +4,7 @@ buildGoModule rec { pname = "gomodifytags"; version = "1.4.0"; - modSha256 = "0nkdk2zgnwsg9lv20vqk2lshk4g9fqwqxd5bpr78nlahb9xk486s"; + vendorSha256 = null; goPackagePath = "github.com/fatih/gomodifytags"; @@ -21,4 +21,4 @@ buildGoModule rec { maintainers = with stdenv.lib.maintainers; [ vdemeester ]; license = stdenv.lib.licenses.bsd3; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/gopkgs/default.nix b/pkgs/development/tools/gopkgs/default.nix index 51c4255a0135e..c1773333b5d26 100644 --- a/pkgs/development/tools/gopkgs/default.nix +++ b/pkgs/development/tools/gopkgs/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { sha256 = "1jak1bg6k5iasscw68ra875k59k3iqhka2ykabsd427k1j3mypln"; }; - modSha256 = "0v9lg5kq3776b2s4kgyi19jy8shjqrr0f5ljrchsj1k7867sxiw7"; + vendorSha256 = "1pwsc488ldw039by8nqpni801zry7dnf0rx4hhd73xpv2w7s8n2r"; meta = { description = "Tool to get list available Go packages."; @@ -23,4 +23,4 @@ buildGoModule rec { maintainers = with stdenv.lib.maintainers; [ vdemeester ]; license = stdenv.lib.licenses.mit; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/gopls/default.nix b/pkgs/development/tools/gopls/default.nix index 77fd195b1abf9..9591c64151628 100644 --- a/pkgs/development/tools/gopls/default.nix +++ b/pkgs/development/tools/gopls/default.nix @@ -12,7 +12,7 @@ buildGoModule rec { }; modRoot = "gopls"; - modSha256 = "1p0g28i707xyxz1g6hb56qlc4km9ik7vjky0v80hw7n73vzs5mr9"; + vendorSha256 = "1zj0zpyl9wq23vks426vqg5xjwjcaj1079rkc67489h0p7y0aqv5"; meta = with stdenv.lib; { description = "Official language server for the Go language"; @@ -20,4 +20,4 @@ buildGoModule rec { license = licenses.bsd3; maintainers = with maintainers; [ mic92 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/gotestsum/default.nix b/pkgs/development/tools/gotestsum/default.nix index 3dd7fb9e35233..fba4585155ed6 100644 --- a/pkgs/development/tools/gotestsum/default.nix +++ b/pkgs/development/tools/gotestsum/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0zifha3mj7386q2accrdmd8qniingadxz1v8vg4mciwi723msr44"; }; - modSha256 = "10zkk4zqla5yqs5sq2qc7x1vhadfyd1l7s29xyjmg4grs8iimk2j"; + vendorSha256 = "0d45i8wm35m2cdbk48razkdr49a3hfwnp84inlz7hj054cq6vimi"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; @@ -22,4 +22,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ endocrimes ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/gotools/default.nix b/pkgs/development/tools/gotools/default.nix index 6efb1d5da8fb3..a7858474a4269 100644 --- a/pkgs/development/tools/gotools/default.nix +++ b/pkgs/development/tools/gotools/default.nix @@ -21,7 +21,7 @@ buildGoModule rec { rm -rf gopls ''; - modSha256 = "1pijbkp7a9n2naicg21ydii6xc0g4jm5bw42lljwaks7211ag8k9"; + vendorSha256 = "0pplmqxrnc8qnr5708igx4dm7rb0hicvhg6lh5hj8zkx38nb19s0"; postConfigure = '' # Make the builtin tools available here @@ -47,4 +47,4 @@ buildGoModule rec { # Do not copy this without a good reason for enabling # In this case tools is heavily coupled with go itself and embeds paths. allowGoReference = true; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/hcloud/default.nix b/pkgs/development/tools/hcloud/default.nix index bdaf04054e9c2..ee7ed4766228c 100644 --- a/pkgs/development/tools/hcloud/default.nix +++ b/pkgs/development/tools/hcloud/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { sha256 = "0cxh92df8gdl4bmr22pdvdxdkdjyfy0jv48y0k6awy1xz61r94ap"; }; - modSha256 = "1sdp62q4rnx7dp4i0dhnc8kzi8h6zzjdy7ym0mk9r7xkxxx0s3ds"; + vendorSha256 = "1iiqmdnjnrsqgjisb5j5casa2hmqmafn79157skl5zxawndvc2rj"; buildFlagsArray = [ "-ldflags=" "-w -X github.com/hetznercloud/cli/cli.Version=${version}" ]; @@ -37,4 +37,4 @@ buildGoModule rec { platforms = stdenv.lib.platforms.all; maintainers = [ stdenv.lib.maintainers.zauberpony ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/kcli/default.nix b/pkgs/development/tools/kcli/default.nix index bbcb10a354cfe..fece8c17ceadb 100644 --- a/pkgs/development/tools/kcli/default.nix +++ b/pkgs/development/tools/kcli/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0whijr2r2j5bvfy8jgmpxsa0zvwk5kfjlpnkw4za5k35q7bjffls"; }; - modSha256 = "1wcqh3306q9wxb6pnl8cpk73vmy36bjv2gil03j7j4pajs1f2lwn"; + vendorSha256 = "0whqrms5mc7v14p2h1jfvkawm30xaylivijlsghrsaq468qcgg15"; subPackages = [ "." ]; @@ -21,4 +21,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ cswank ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/kind/default.nix b/pkgs/development/tools/kind/default.nix index 77df7bee063d5..f58303cae6f2a 100644 --- a/pkgs/development/tools/kind/default.nix +++ b/pkgs/development/tools/kind/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { sha256 = "0r301nqvycik8fwlghq0cymmq4rm7xp8haj39i2nynxyw8zk6zym"; }; - modSha256 = "1vfdyd4yj79f2n0w98k9h4sklxwg49ajlp1blvpslbzmpfkmcjsz"; + vendorSha256 = "1qvbm8v8yah6r6cw1cvdw79yiwxb2amzdkkzvzbwigy0j4bvn9mi"; goPackagePath = "sigs.k8s.io/kind"; subPackages = [ "." ]; diff --git a/pkgs/development/tools/kubeprompt/default.nix b/pkgs/development/tools/kubeprompt/default.nix index 7c6f3f3396cf3..bac22169edf25 100644 --- a/pkgs/development/tools/kubeprompt/default.nix +++ b/pkgs/development/tools/kubeprompt/default.nix @@ -19,7 +19,7 @@ buildGoModule rec { ''; goPackagePath = "github.com/jlesquembre/kubeprompt"; - modSha256 = "0rbpdk2dixywn3wcdgz48f3xw3b7fk8xh7mrlx27wz7fq5wj9v8f"; + vendorSha256 = "089lfkvyf00f05kkmr935jbrddf2c0v7m2356whqnz7ad6a2whsi"; meta = with stdenv.lib; { description = "Kubernetes prompt"; @@ -28,4 +28,4 @@ buildGoModule rec { maintainers = with maintainers; [ jlesquembre ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/kustomize/default.nix b/pkgs/development/tools/kustomize/default.nix index bf4aae23be762..e35cc1c8fbd51 100644 --- a/pkgs/development/tools/kustomize/default.nix +++ b/pkgs/development/tools/kustomize/default.nix @@ -23,7 +23,7 @@ buildGoModule rec { # avoid finding test and development commands sourceRoot = "source/kustomize"; - modSha256 = "1bas6al14ck0d2ccb4235426a5hldqsm0nf8vi76chz4nahzb71g"; + vendorSha256 = "06mf5zvxn10g5rqjpqv3afvhj9xmijbj8ag8pqcg1996s4rp4p7a"; meta = with lib; { description = "Customization of kubernetes YAML configurations"; @@ -36,4 +36,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ carlosdagos vdemeester periklis zaninime ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/misc/act/default.nix b/pkgs/development/tools/misc/act/default.nix index 8df465c4958fe..e7234c0492d4b 100644 --- a/pkgs/development/tools/misc/act/default.nix +++ b/pkgs/development/tools/misc/act/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "14ird8z8f467spa0kdzjf6lq7pipq7rwxrdk6ppv7y1fxw96qm9x"; }; - modSha256 = "09q8dh4g4k0y7mrhwyi9py7zdiipmq91j3f32cn635v2xw6zyg2k"; + vendorSha256 = "0ns20vvrj0j921wsx227dxbpga6kll7pxglfqhl53xckrh85yyd8"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; @@ -21,4 +21,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ filalex77 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/misc/circleci-cli/default.nix b/pkgs/development/tools/misc/circleci-cli/default.nix index 5b3b728ea9866..6e8f5676bbdb0 100644 --- a/pkgs/development/tools/misc/circleci-cli/default.nix +++ b/pkgs/development/tools/misc/circleci-cli/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0md6y2rnzhkpxc2pm3c46jrhwicrswy9qlr6a4mmvpjq1imj1hjq"; }; - modSha256 = "169d0mm52l6w6jln5ak6zkh97q65m9jpg3bm8qll6sfrmrnfncfi"; + vendorSha256 = "0y35ps2pw9z7gi4z50byd1py87bf2jdvj7l7w2gxpppmhi83myc9"; buildFlagsArray = [ "-ldflags=-s -w -X github.com/CircleCI-Public/circleci-cli/version.Version=${version}" ]; @@ -34,4 +34,4 @@ buildGoModule rec { license = licenses.mit; homepage = "https://circleci.com/"; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/misc/editorconfig-checker/default.nix b/pkgs/development/tools/misc/editorconfig-checker/default.nix index 88c43a8c42a58..c1181c41fb838 100644 --- a/pkgs/development/tools/misc/editorconfig-checker/default.nix +++ b/pkgs/development/tools/misc/editorconfig-checker/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1gn7q6wg7byhr1l5ly60rbb700xrww9slbq7gbxbw5c1fl0pp3yk"; }; - modSha256 = "1iiv12ginb3ky739z7v8wf4z5lv24gmghbybs3lzay0kqn449n4x"; + vendorSha256 = "1w5hsdmi95v7qj3fc4jkjapw8cnh41f09wbbzcfmfmvygrii7z16"; meta = with lib; { description = "A tool to verify that your files are in harmony with your .editorconfig"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ uri-canva ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/misc/go-license-detector/default.nix b/pkgs/development/tools/misc/go-license-detector/default.nix index 6675f7ed3e252..22b85a1fa3340 100644 --- a/pkgs/development/tools/misc/go-license-detector/default.nix +++ b/pkgs/development/tools/misc/go-license-detector/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0ln1z3y9q5igf9djkxw05ql2hb1ijcvvz0mrbwz11cdv9xrsa4z4"; }; - modSha256 = "163f1kiy7kqrnaazb8ydaaiz57lv30jyjkvv6i7pczvcg9yfhmdb"; + vendorSha256 = "0gan5l7vsq0hixxcymhhs8p07v92w60r0lhgvrr9a99nic12vmia"; meta = with lib; { description = "Reliable project licenses detector"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ dtzWill ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/misc/mkcert/default.nix b/pkgs/development/tools/misc/mkcert/default.nix index 1449a55e3a864..218473aee78de 100644 --- a/pkgs/development/tools/misc/mkcert/default.nix +++ b/pkgs/development/tools/misc/mkcert/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0w1ji96hbd3anzsz82xjcafsqhgyz7c7n41rsq60yrllwbj5946f"; }; - modSha256 = "13a3snhcqq3a9lfy9zfr2rx10mf2ymvhmds1bg8n4m7lbwnzm4fg"; + vendorSha256 = "0b8ggdpbyxx5n2myhchhlwmm5nndwpykp1ylnzdyw12mdskfvn9h"; goPackagePath = "github.com/FiloSottile/mkcert"; buildFlagsArray = '' @@ -25,4 +25,4 @@ buildGoModule rec { license = licenses.bsd3; maintainers = [ maintainers.marsam ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/misc/reviewdog/default.nix b/pkgs/development/tools/misc/reviewdog/default.nix index 1a6fb6746a1a9..9e4dbcac5b802 100644 --- a/pkgs/development/tools/misc/reviewdog/default.nix +++ b/pkgs/development/tools/misc/reviewdog/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1ag55n3gfwcp6v8v3hha8bdqxw9r4bmz97p00vyqla9gjzn5ka9w"; }; - modSha256 = "0x9bcszk9hd7vwg9lnlg4vqv4r9vx8x91j3ghijbr1jmqxhgjb9a"; + vendorSha256 = "0lann22hjdcrwyab76hinvbbmg3rf7y3knrxlfg0164gl3y5xb5g"; subPackages = [ "cmd/reviewdog" ]; diff --git a/pkgs/development/tools/misc/terracognita/default.nix b/pkgs/development/tools/misc/terracognita/default.nix index e533b065f4118..70b07dd71cd5f 100644 --- a/pkgs/development/tools/misc/terracognita/default.nix +++ b/pkgs/development/tools/misc/terracognita/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0ib0p361sxh2qzxccg32pcml4by4mk45abhljwmljwybs34wh5rh"; }; - modSha256 = "1cbhm3jwv0z9fh1q8mva56nbsp9rfyjcs03yxrc8ffkvif0gapps"; + vendorSha256 = "0q772i49nyxzs51jrh45n14ljh7qj5wygkn2x32pxi6ykw6la4x8"; subPackages = [ "." ]; @@ -23,4 +23,4 @@ buildGoModule rec { license = licenses.mit; maintainers = [ maintainers.marsam ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/mod/default.nix b/pkgs/development/tools/mod/default.nix index 5237d131af02b..839594f4cc803 100644 --- a/pkgs/development/tools/mod/default.nix +++ b/pkgs/development/tools/mod/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1n0pipbq4fjban8hsxhyl5w8xrl4ai1pvgd02i1j1awmm2l3ykzl"; }; - modSha256 = "1nl7d00prw1663xrl1nvj1xbs7wzkbqn75i92al821pz12dybdif"; + vendorSha256 = "032s62rjjq7bqiz5fg17yfkq4j4dsbl6vhvs1wf2sg8jvbqmvdwn"; subPackages = [ "cmd/mod" ]; @@ -26,4 +26,4 @@ buildGoModule rec { maintainers = with maintainers; [ kalbasit ]; platforms = platforms.linux ++ platforms.darwin; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/packet-cli/default.nix b/pkgs/development/tools/packet-cli/default.nix index 52bb0f1584461..a484098f0c60d 100644 --- a/pkgs/development/tools/packet-cli/default.nix +++ b/pkgs/development/tools/packet-cli/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "17f3ax7pjm5k93cxj7fd8hwr4id1lbzz9pkl2xflpxydi89bwdfz"; }; - modSha256 = "1hyv1vxk1rsr3jq3b08q0487sqf3y0km3mlwvqivib1y6hrknnnr"; + vendorSha256 = "10praxaiscxq4v3zknrabldxl7rpklkr5wdlwa5lxsx0if8mrvp7"; meta = with stdenv.lib; { description = "Official Packet CLI"; @@ -20,4 +20,4 @@ buildGoModule rec { maintainers = with maintainers; [ filalex77 ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/pet/default.nix b/pkgs/development/tools/pet/default.nix index 8bbb34fabd404..d37c529ecf9b4 100644 --- a/pkgs/development/tools/pet/default.nix +++ b/pkgs/development/tools/pet/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1na3az7vicjq1rxd3ybid47yrblsdazgli0dchkbwh8zchwhqj33"; }; - modSha256 = "06ham8lsx5c1vk5jkwp1aa9g4q4g7sfq7gxz2gkffa98x2vlawyf"; + vendorSha256 = "0pnd89iqdj3f719xf4iy5r04n51d0rrrf0qb2zjirpw7vh7g82i9"; subPackages = [ "." ]; @@ -22,4 +22,4 @@ buildGoModule rec { maintainers = with maintainers; [ kalbasit ]; platforms = platforms.linux ++ platforms.darwin; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/proto-contrib/default.nix b/pkgs/development/tools/proto-contrib/default.nix index 4de843be95121..90253ed57048e 100644 --- a/pkgs/development/tools/proto-contrib/default.nix +++ b/pkgs/development/tools/proto-contrib/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0ksxic7cypv9gg8q5lkl5bla1n9i65z7b03cx9lwq6252glmf2jk"; }; - modSha256 = "19cqz13jd95d5vibd10420gg69ldgf6afc51mkglhafgmmif56b0"; + vendorSha256 = "1ivvq5ch9grdrwqq29flv9821kyb16k0cj6wgj5v0dyn63w420aw"; meta = with lib; { description = "Contributed tools and other packages on top of the Go proto package"; @@ -20,4 +20,4 @@ buildGoModule rec { maintainers = with maintainers; [ kalbasit ]; platforms = platforms.linux ++ platforms.darwin; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/protoc-gen-doc/default.nix b/pkgs/development/tools/protoc-gen-doc/default.nix index 77c1df6f43e3e..5579d006e97b0 100644 --- a/pkgs/development/tools/protoc-gen-doc/default.nix +++ b/pkgs/development/tools/protoc-gen-doc/default.nix @@ -11,7 +11,7 @@ buildGoModule { sha256 = "004axh2gqc4f115mdxxg59d19hph3rr0bq9d08n3nyl315f590kj"; }; - modSha256 = "1952ycdkgl00q2s3qmhislhhim15nn6nmlkwbfdvrsfzznqj47rd"; + vendorSha256 = "17qdpsff8jk7ks5v6ix1rb966x3yvq03vk5bs2zbnxfdra7bv3n6"; meta = with lib; { description = "Documentation generator plugin for Google Protocol Buffers"; @@ -27,4 +27,4 @@ buildGoModule { license = licenses.mit; maintainers = with maintainers; [ kalbasit ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/prototool/default.nix b/pkgs/development/tools/prototool/default.nix index 37b0f1fdf8db0..63a805175dd8e 100644 --- a/pkgs/development/tools/prototool/default.nix +++ b/pkgs/development/tools/prototool/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper ]; - modSha256 = "1gc8kc9mbi3mlh48zx4lcgpsrf8z879f1qj9wfyr66s7wd1ljazg"; + vendorSha256 = "19wza3vkkda44cng8m6f9y7qpzrgk2adyjmcafk17v4773rxlncf"; postInstall = '' wrapProgram "$out/bin/prototool" \ @@ -30,4 +30,4 @@ buildGoModule rec { license = licenses.mit; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/reftools/default.nix b/pkgs/development/tools/reftools/default.nix index 7e71926b895ea..7f8d1be1a52b0 100644 --- a/pkgs/development/tools/reftools/default.nix +++ b/pkgs/development/tools/reftools/default.nix @@ -8,7 +8,7 @@ buildGoModule rec { version = "2019-12-21"; rev = "65925cf013156409e591f7a1be4df96f640d02f4"; - modSha256 = "1sihahgkcj018ixbnz58npfh4drhqip2xmc9p7lq3an8japb9nyx"; + vendorSha256 = null; goPackagePath = "github.com/davidrjenni/reftools"; excludedPackages = "\\(cmd/fillswitch/test-fixtures\\)"; @@ -28,4 +28,4 @@ buildGoModule rec { maintainers = with maintainers; [ kalbasit ]; platforms = platforms.linux ++ platforms.darwin; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/renderizer/default.nix b/pkgs/development/tools/renderizer/default.nix index 93634f935d1dd..877fdeea8f2b3 100644 --- a/pkgs/development/tools/renderizer/default.nix +++ b/pkgs/development/tools/renderizer/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1bip12pcn8bqgph7vd7bzzadwbyqh80fx7gqciv9fchycwsj04rf"; }; - modSha256 = "0ss5l2n1sl1i2hvxsdzy6p61mnnxmm6h256jvv0p0ajynx8g538q"; + vendorSha256 = "13z357ww4j5bmmy8ag6d6gd5b2dib8kby73q8317pqnqzaxrrbcj"; meta = with stdenv.lib; { description = "CLI to render Go template text files"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.gpl3; maintainers = with maintainers; [ yurrriq ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/richgo/default.nix b/pkgs/development/tools/richgo/default.nix index 9178f53bfde46..4fc4d4abc618d 100644 --- a/pkgs/development/tools/richgo/default.nix +++ b/pkgs/development/tools/richgo/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "07ipa54c4mzm6yizgvkm6x5yim1xgv3f0xdxg35qziacdfcwd6m4"; }; - modSha256 = "12wbjfqy6qnapm3f2pz1ci1gvc0y8kzr8c99kihyh1jv9r3zy1wz"; + vendorSha256 = "1nvk3akjwfcbvif1w4cglsqplcajlwq3mnvk9b75nmn9qaqfbfjf"; subPackages = [ "." ]; @@ -21,4 +21,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ rvolosatovs ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/run/default.nix b/pkgs/development/tools/run/default.nix index 61e04a774aa97..391cbff1716b2 100644 --- a/pkgs/development/tools/run/default.nix +++ b/pkgs/development/tools/run/default.nix @@ -10,7 +10,7 @@ buildGoModule rec { sha256 = "0q9f8lzrzybdablqph5wihqhfbfzb3bbnnxvhy7g5ccg1kzy7mgp"; }; - modSha256 = "0s2lw9q5jskj41jqr8bv5w45pkrp2s0yfd2hgjgsd0q4ifm07k7s"; + vendorSha256 = "1g5rmiiwqpm8gky9yr5f2a7zsjjmm9i12r7yxj9cz7y3rmw9sw8c"; meta = with stdenv.lib; { description = "Easily manage and invoke small scripts and wrappers"; @@ -19,4 +19,4 @@ buildGoModule rec { maintainers = with maintainers; [ rawkode filalex77 ]; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/development/tools/yq-go/default.nix b/pkgs/development/tools/yq-go/default.nix index 8bcfaa2e46ac4..882199a82a93b 100644 --- a/pkgs/development/tools/yq-go/default.nix +++ b/pkgs/development/tools/yq-go/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1jll5nmskvs61031h3sizhv3scv8znrr9apyc4qlxcp4jiv7xpmp"; }; - modSha256 = "1m7sha6kwis1a00il1iigb9lxxh5m2myj9ps20s816m0b9bhd43v"; + vendorSha256 = "0rlvbyhl53x1bhwr7f7zs4swa580saak19z3d3g58srq3jyw6zlc"; meta = with lib; { description = "Portable command-line YAML processor"; @@ -19,4 +19,4 @@ buildGoModule rec { license = [ licenses.mit ]; maintainers = [ maintainers.lewo ]; }; -} +} \ No newline at end of file diff --git a/pkgs/development/web/flyctl/default.nix b/pkgs/development/web/flyctl/default.nix index 22da8cd75189b..9cf73bd15f4e8 100644 --- a/pkgs/development/web/flyctl/default.nix +++ b/pkgs/development/web/flyctl/default.nix @@ -20,7 +20,7 @@ buildGoModule rec { rm $out/bin/helpgen ''; - modSha256 = "0d0hfmdk81apha3r7zspam8wqadpy6qmqkgbq0sbiwrji4155hrh"; + vendorSha256 = "10wcyxzkwvbhf86dq1rh852zgdg28draay0515zp459z34vv4zna"; meta = with lib; { description = "Command line tools for fly.io services"; @@ -28,5 +28,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ aaronjanse ]; }; -} - +} \ No newline at end of file diff --git a/pkgs/development/web/minify/default.nix b/pkgs/development/web/minify/default.nix index 3752519d06098..7396063a3f196 100644 --- a/pkgs/development/web/minify/default.nix +++ b/pkgs/development/web/minify/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "12jns7m9liyjg9wy8ynvji2d2g4k2z1ymp6k3610mivmvg159sy4"; }; - modSha256 = "09jk3mxf7n9wf1cgyiw9mhsr55fb12k399dmzhnib3vhd9xav15i"; + vendorSha256 = "120d3nzk8cr5496cxp5p6ydlzw9mmpg7dllqhv1kpgwlbxmd8vr3"; buildFlagsArray = [ "-ldflags=-s -w -X main.Version=${version}" ]; @@ -20,4 +20,4 @@ buildGoModule rec { license = licenses.mit; homepage = "https://go.tacodewolff.nl/minify"; }; -} +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/smimesign/default.nix b/pkgs/os-specific/darwin/smimesign/default.nix index fff3a3b43fd0e..39582ff6dccec 100644 --- a/pkgs/os-specific/darwin/smimesign/default.nix +++ b/pkgs/os-specific/darwin/smimesign/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0higcg2rdz02c0n50vigg7w7bxc7wlmg1x2ygrbh3iwms5lc74vi"; }; - modSha256 = "1k3gnjzblfk14y19zhlvwysx045nbw0xr5nngh7zj1wcqxhhm206"; + vendorSha256 = "00000000000000000hlvwysx045nbw0xr5nngh7zj1wcqxhhm206"; buildFlagsArray = "-ldflags=-X main.versionString=${version}"; diff --git a/pkgs/os-specific/linux/fscrypt/default.nix b/pkgs/os-specific/linux/fscrypt/default.nix index 9f734a47c29bd..2bed2aa1c6fb0 100644 --- a/pkgs/os-specific/linux/fscrypt/default.nix +++ b/pkgs/os-specific/linux/fscrypt/default.nix @@ -19,7 +19,7 @@ buildGoModule rec { --replace "/usr/local" "$out" ''; - modSha256 = "110b647q6ljsg5gwlciqv4cddxmk332nahcrpidrpsiqs2yjv1md"; + vendorSha256 = "0yak221mlyfacvlsaq9g3xiyk94n94vqgkbaji8d21pi8hhr38m6"; nativeBuildInputs = [ gnum4 ]; buildInputs = [ pam ]; @@ -50,4 +50,4 @@ buildGoModule rec { platforms = platforms.linux; maintainers = with maintainers; [ primeos ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/blockbook/default.nix b/pkgs/servers/blockbook/default.nix index 9bc10989efdb1..627ac42efd207 100644 --- a/pkgs/servers/blockbook/default.nix +++ b/pkgs/servers/blockbook/default.nix @@ -24,7 +24,7 @@ buildGoModule rec { sha256 = "01nb4if2dix2h95xvqvafil325jjw2a4v1izb9mad0cjqcf8rk6n"; }; - modSha256 = "1zp06mpkxaxykw8pr679fg9dd7039qj13j5lknxp7hr8dga0jvpy"; + vendorSha256 = "1qjlvhizl8cy06cgf4phia70bgbm4lj57z5z2gyr8aglx98bnpdn"; buildInputs = [ bzip2 zlib snappy zeromq lz4 ]; @@ -37,6 +37,20 @@ buildGoModule rec { -X github.com/trezor/blockbook/common.buildDate=unknown ''; + goethereum = fetchFromGitHub { + owner = "ethereum"; + repo = "go-ethereum"; + rev = "v1.8.20"; + sha256 = "0m2q1nz6f39pyr2rk6vflkwi4ykganzwr7wndpwr9rliw0x8jgi0"; + }; + + overrideModAttrs = (_: { + postBuild = '' + rm -r vendor/github.com/ethereum/go-ethereum + cp -r --reflink=auto ${goethereum} vendor/github.com/ethereum/go-ethereum + ''; + }); + preBuild = lib.optionalString stdenv.isDarwin '' ulimit -n 8192 '' + '' diff --git a/pkgs/servers/caddy/default.nix b/pkgs/servers/caddy/default.nix index bcd4b7065b587..415f85371850d 100644 --- a/pkgs/servers/caddy/default.nix +++ b/pkgs/servers/caddy/default.nix @@ -14,7 +14,7 @@ buildGoModule rec { rev = "v${version}"; sha256 = "0jrhwmr6gggppskg5h450wybzkv17iq69dgw36hd1dp56q002i7g"; }; - modSha256 = "1gc0xvsihr4zp7hkrdfrplvzkaphz1y4q53rgwn2jhd8s98l57an"; + vendorSha256 = "09vnci9pp8zp7bvn8zj68wslz2nc54nhcd0ll31sqfjbp00215mj"; preBuild = '' cat << EOF > caddy/main.go @@ -33,4 +33,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ rushmorem fpletz zimbatm filalex77 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/caddy/v2.nix b/pkgs/servers/caddy/v2.nix index 4175dfa20fcb1..c4f12e58b0fa4 100644 --- a/pkgs/servers/caddy/v2.nix +++ b/pkgs/servers/caddy/v2.nix @@ -12,8 +12,7 @@ buildGoModule rec { rev = "v${version}"; sha256 = "1c1frfx0qkprhf4var70cncvrw8s9gjag2hygndbd9055hb52bvv"; }; - - modSha256 = "19sxyvfq1bpg85w8cd1yk2s6rd8759cf2zqs5b6wyny4cak2bl83"; + vendorSha256 = "004hpjxpp18f71vy5v5ky0g07a8d5xh5qwl5b4bbx34hpf8yxs81"; meta = with stdenv.lib; { homepage = "https://caddyserver.com"; diff --git a/pkgs/servers/consul/default.nix b/pkgs/servers/consul/default.nix index dd6484344e853..a702626e1c141 100644 --- a/pkgs/servers/consul/default.nix +++ b/pkgs/servers/consul/default.nix @@ -26,7 +26,8 @@ buildGoModule rec { # has a split module structure in one repo subPackages = ["." "connect/certgen"]; - modSha256 = "01vyamfy9lcljzy99jmr48x0ypb12wab66n9kmj71mrvl50v8rzr"; + vendorSha256 = "1lcpldkssbq6qkkq22bvx9jb5klcxr8422mpx47wz39pry8vy9b6"; + deleteVendor = true; preBuild = '' buildFlagsArray+=("-ldflags" diff --git a/pkgs/servers/dns/coredns/default.nix b/pkgs/servers/dns/coredns/default.nix index cbf29b5d7c753..598f5bedc2bfe 100644 --- a/pkgs/servers/dns/coredns/default.nix +++ b/pkgs/servers/dns/coredns/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { sha256 = "18c02ss0sxxg8lkhdmyaac2x5alfxsizf6jqhck8bqkf6hiyv5hc"; }; - modSha256 = "07mlprwa37s6qpg5wvpljbvkiqcvrcljr27qsdwz49wldhdp6im6"; + vendorSha256 = "0ykhqsz4a7bkkxcg7w23jl3qs36law1f8l1b5r3i26qlamibqxl7"; meta = with stdenv.lib; { homepage = "https://coredns.io"; @@ -21,4 +21,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ rushmorem rtreffer deltaevo ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/documize-community/default.nix b/pkgs/servers/documize-community/default.nix index f6a44c9193db0..4c09d7f1eeb4f 100644 --- a/pkgs/servers/documize-community/default.nix +++ b/pkgs/servers/documize-community/default.nix @@ -4,6 +4,8 @@ buildGoModule rec { pname = "documize-community"; version = "3.7.0"; + patches = [ ./vendor.patch ]; + src = fetchFromGitHub { owner = "documize"; repo = "community"; @@ -11,18 +13,21 @@ buildGoModule rec { sha256 = "1pcldf9lqvpb2h2a3kr3mahj2v1jasjwrszj6czjmkyml7x2sz7c"; }; - modSha256 = "1z0v7n8klaxcqv7mvzf3jzgrp78zb4yiibx899ppk6i5qnj4xiv0"; + vendorSha256 = null; nativeBuildInputs = [ go-bindata go-bindata-assetfs ]; - subPackages = [ "edition/community.go" ]; + # This is really weird, but they've managed to screw up + # their folder structure enough, you can only build by + # literally cding into this folder. + preBuild = "cd edition"; + + subPackages = [ "." ]; passthru.tests = { inherit (nixosTests) documize; }; postInstall = '' - # `buildGoModule` calls `go install` (without `go build` first), so - # `-o bin/documize` doesn't work. - mv $out/bin/community $out/bin/documize + mv $out/bin/edition $out/bin/documize ''; meta = with lib; { diff --git a/pkgs/servers/documize-community/vendor.patch b/pkgs/servers/documize-community/vendor.patch new file mode 100644 index 0000000000000..82146981f321b --- /dev/null +++ b/pkgs/servers/documize-community/vendor.patch @@ -0,0 +1,2392 @@ +diff --git a/vendor/github.com/microcosm-cc/bluemonday/.coveralls.yml b/vendor/github.com/microcosm-cc/bluemonday/.coveralls.yml +new file mode 100644 +index 00000000..e0c87602 +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/.coveralls.yml +@@ -0,0 +1 @@ ++repo_token: x2wlA1x0X8CK45ybWpZRCVRB4g7vtkhaw +diff --git a/vendor/github.com/microcosm-cc/bluemonday/.travis.yml b/vendor/github.com/microcosm-cc/bluemonday/.travis.yml +new file mode 100644 +index 00000000..4f666461 +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/.travis.yml +@@ -0,0 +1,22 @@ ++language: go ++go: ++ - 1.1.x ++ - 1.2.x ++ - 1.3.x ++ - 1.4.x ++ - 1.5.x ++ - 1.6.x ++ - 1.7.x ++ - 1.8.x ++ - 1.9.x ++ - 1.10.x ++ - 1.11.x ++ - tip ++matrix: ++ allow_failures: ++ - go: tip ++ fast_finish: true ++install: ++ - go get . ++script: ++ - go test -v ./... +diff --git a/vendor/github.com/microcosm-cc/bluemonday/CONTRIBUTING.md b/vendor/github.com/microcosm-cc/bluemonday/CONTRIBUTING.md +new file mode 100644 +index 00000000..d2b12302 +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/CONTRIBUTING.md +@@ -0,0 +1,51 @@ ++# Contributing to bluemonday ++ ++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. ++ ++## Getting Started ++ ++* Make sure you have a [Github account](https://github.com/signup/free) ++ ++## Guidelines ++ ++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. ++ ++## Submitting an Issue ++ ++* Submit a ticket for your issue, assuming one does not already exist ++* Clearly describe the issue including the steps to reproduce (with sample input and output) if it is a bug ++ ++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: ++ ++* Fork the repository on Github ++* Issue a pull request containing code to resolve the issue ++ ++## Submitting a Pull Request ++ ++* Submit a ticket for your issue, assuming one does not already exist ++* Describe the reason for the pull request and if applicable show some example inputs and outputs to demonstrate what the patch does ++* Fork the repository on Github ++* Before submitting the pull request you should ++ 1. Include tests for your patch, 1 test should encapsulate the entire patch and should refer to the Github issue ++ 1. If you have added new exposed/public functionality, you should ensure it is documented appropriately ++ 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 ++ 1. Run all of the tests `go test -v ./...` or `make test` and ensure all tests pass ++ 1. Run gofmt `gofmt -w ./$*` or `make fmt` ++ 1. Run vet `go tool vet *.go` or `make vet` and resolve any issues ++ 1. Install golint using `go get -u github.com/golang/lint/golint` and run vet `golint *.go` or `make lint` and resolve every warning ++* When submitting the pull request you should ++ 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 ++ ++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. ++ ++### Contributor Licence Agreement ++ ++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. ++ ++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: ++ ++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. ++ ++You accept that all who comply with the licence of the project (BSD 3-clause) are permitted to use your contributions to the project. ++ ++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. +diff --git a/vendor/github.com/microcosm-cc/bluemonday/CREDITS.md b/vendor/github.com/microcosm-cc/bluemonday/CREDITS.md +new file mode 100644 +index 00000000..b98873f3 +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/CREDITS.md +@@ -0,0 +1,6 @@ ++1. Andrew Krasichkov @buglloc https://github.com/buglloc ++1. John Graham-Cumming http://jgc.org/ ++1. Mike Samuel mikesamuel@gmail.com ++1. Dmitri Shuralyov shurcooL@gmail.com ++1. https://github.com/opennota ++1. https://github.com/Gufran +\ No newline at end of file +diff --git a/vendor/github.com/microcosm-cc/bluemonday/LICENSE.md b/vendor/github.com/microcosm-cc/bluemonday/LICENSE.md +new file mode 100644 +index 00000000..f822458e +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/LICENSE.md +@@ -0,0 +1,28 @@ ++Copyright (c) 2014, David Kitchen <david@buro9.com> ++ ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are met: ++ ++* Redistributions of source code must retain the above copyright notice, this ++ list of conditions and the following disclaimer. ++ ++* Redistributions in binary form must reproduce the above copyright notice, ++ this list of conditions and the following disclaimer in the documentation ++ and/or other materials provided with the distribution. ++ ++* Neither the name of the organisation (Microcosm) nor the names of its ++ contributors may be used to endorse or promote products derived from ++ this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE ++FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +diff --git a/vendor/github.com/microcosm-cc/bluemonday/Makefile b/vendor/github.com/microcosm-cc/bluemonday/Makefile +new file mode 100644 +index 00000000..b15dc74f +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/Makefile +@@ -0,0 +1,42 @@ ++# Targets: ++# ++# all: Builds the code locally after testing ++# ++# fmt: Formats the source files ++# build: Builds the code locally ++# vet: Vets the code ++# lint: Runs lint over the code (you do not need to fix everything) ++# test: Runs the tests ++# cover: Gives you the URL to a nice test coverage report ++# ++# install: Builds, tests and installs the code locally ++ ++.PHONY: all fmt build vet lint test cover install ++ ++# The first target is always the default action if `make` is called without ++# args we build and install into $GOPATH so that it can just be run ++ ++all: fmt vet test install ++ ++fmt: ++ @gofmt -s -w ./$* ++ ++build: ++ @go build ++ ++vet: ++ @go vet *.go ++ ++lint: ++ @golint *.go ++ ++test: ++ @go test -v ./... ++ ++cover: COVERAGE_FILE := coverage.out ++cover: ++ @go test -coverprofile=$(COVERAGE_FILE) && \ ++ cover -html=$(COVERAGE_FILE) && rm $(COVERAGE_FILE) ++ ++install: ++ @go install ./... +diff --git a/vendor/github.com/microcosm-cc/bluemonday/README.md b/vendor/github.com/microcosm-cc/bluemonday/README.md +new file mode 100644 +index 00000000..ce679c10 +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/README.md +@@ -0,0 +1,350 @@ ++# 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) ++ ++bluemonday is a HTML sanitizer implemented in Go. It is fast and highly configurable. ++ ++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. ++ ++If you accept user generated content, and your server uses Go, you **need** bluemonday. ++ ++The default policy for user generated content (`bluemonday.UGCPolicy().Sanitize()`) turns this: ++```html ++Hello <STYLE>.XSS{background-image:url("javascript:alert('XSS')");}</STYLE><A CLASS=XSS></A>World ++``` ++ ++Into a harmless: ++```html ++Hello World ++``` ++ ++And it turns this: ++```html ++<a href="javascript:alert('XSS1')" onmouseover="alert('XSS2')">XSS<a> ++``` ++ ++Into this: ++```html ++XSS ++``` ++ ++Whilst still allowing this: ++```html ++<a href="http://www.google.com/"> ++ <img src="https://ssl.gstatic.com/accounts/ui/logo_2x.png"/> ++</a> ++``` ++ ++To pass through mostly unaltered (it gained a rel="nofollow" which is a good thing for user generated content): ++```html ++<a href="http://www.google.com/" rel="nofollow"> ++ <img src="https://ssl.gstatic.com/accounts/ui/logo_2x.png"/> ++</a> ++``` ++ ++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. ++ ++You should **always** run bluemonday **after** any other processing. ++ ++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. ++ ++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/). ++ ++## Technical Summary ++ ++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. ++ ++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. ++ ++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. ++ ++### Supported Go Versions ++ ++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. ++ ++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. ++ ++## Is it production ready? ++ ++*Yes* ++ ++We are using bluemonday in production having migrated from the widely used and heavily field tested OWASP Java HTML Sanitizer. ++ ++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. ++ ++We invite pull requests and issues to help us ensure we are offering comprehensive protection against various attacks via user generated content. ++ ++## Usage ++ ++Install in your `${GOPATH}` using `go get -u github.com/microcosm-cc/bluemonday` ++ ++Then call it: ++```go ++package main ++ ++import ( ++ "fmt" ++ ++ "github.com/microcosm-cc/bluemonday" ++) ++ ++func main() { ++ // Do this once for each unique policy, and use the policy for the life of the program ++ // Policy creation/editing is not safe to use in multiple goroutines ++ p := bluemonday.UGCPolicy() ++ ++ // The policy can then be used to sanitize lots of input and it is safe to use the policy in multiple goroutines ++ html := p.Sanitize( ++ `<a onblur="alert(secret)" href="http://www.google.com">Google</a>`, ++ ) ++ ++ // Output: ++ // <a href="http://www.google.com" rel="nofollow">Google</a> ++ fmt.Println(html) ++} ++``` ++ ++We offer three ways to call Sanitize: ++```go ++p.Sanitize(string) string ++p.SanitizeBytes([]byte) []byte ++p.SanitizeReader(io.Reader) bytes.Buffer ++``` ++ ++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. ++ ++You can build your own policies: ++```go ++package main ++ ++import ( ++ "fmt" ++ ++ "github.com/microcosm-cc/bluemonday" ++) ++ ++func main() { ++ p := bluemonday.NewPolicy() ++ ++ // Require URLs to be parseable by net/url.Parse and either: ++ // mailto: http:// or https:// ++ p.AllowStandardURLs() ++ ++ // We only allow <p> and <a href=""> ++ p.AllowAttrs("href").OnElements("a") ++ p.AllowElements("p") ++ ++ html := p.Sanitize( ++ `<a onblur="alert(secret)" href="http://www.google.com">Google</a>`, ++ ) ++ ++ // Output: ++ // <a href="http://www.google.com">Google</a> ++ fmt.Println(html) ++} ++``` ++ ++We ship two default policies: ++ ++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. ++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. ++ ++## Policy Building ++ ++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: ++ ++1. Avoid anything other than the standard HTML elements ++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 ++1. Avoid anything other than plain HTML attributes with values matched to a regexp ++ ++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()`. ++ ++To create a new policy: ++```go ++p := bluemonday.NewPolicy() ++``` ++ ++To add elements to a policy either add just the elements: ++```go ++p.AllowElements("b", "strong") ++``` ++ ++Or add elements as a virtue of adding an attribute: ++```go ++// Not the recommended pattern, see the recommendation on using .Matching() below ++p.AllowAttrs("nowrap").OnElements("td", "th") ++``` ++ ++Attributes can either be added to all elements: ++```go ++p.AllowAttrs("dir").Matching(regexp.MustCompile("(?i)rtl|ltr")).Globally() ++``` ++ ++Or attributes can be added to specific elements: ++```go ++// Not the recommended pattern, see the recommendation on using .Matching() below ++p.AllowAttrs("value").OnElements("li") ++``` ++ ++It is **always** recommended that an attribute be made to match a pattern. XSS in HTML attributes is very easy otherwise: ++```go ++// \p{L} matches unicode letters, \p{N} matches unicode numbers ++p.AllowAttrs("title").Matching(regexp.MustCompile(`[\p{L}\p{N}\s\-_',:\[\]!\./\\\(\)&]*`)).Globally() ++``` ++ ++You can stop at any time and call .Sanitize(): ++```go ++// string htmlIn passed in from a HTTP POST ++htmlOut := p.Sanitize(htmlIn) ++``` ++ ++And you can take any existing policy and extend it: ++```go ++p := bluemonday.UGCPolicy() ++p.AllowElements("fieldset", "select", "option") ++``` ++ ++### Links ++ ++Links are difficult beasts to sanitise safely and also one of the biggest attack vectors for malicious content. ++ ++It is possible to do this: ++```go ++p.AllowAttrs("href").Matching(regexp.MustCompile(`(?i)mailto|https?`)).OnElements("a") ++``` ++ ++But that will not protect you as the regular expression is insufficient in this case to have prevented a malformed value doing something unexpected. ++ ++We provide some additional global options for safely working with links. ++ ++`RequireParseableURLs` will ensure that URLs are parseable by Go's `net/url` package: ++```go ++p.RequireParseableURLs(true) ++``` ++ ++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): ++```go ++p.AllowRelativeURLs(true) ++``` ++ ++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: ++```go ++p.AllowURLSchemes("mailto", "http", "https") ++``` ++ ++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: ++```go ++// This applies to "a" "area" "link" elements that have a "href" attribute ++p.RequireNoFollowOnLinks(true) ++``` ++ ++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: ++```go ++p.AllowStandardURLs() ++p.AllowAttrs("cite").OnElements("blockquote", "q") ++p.AllowAttrs("href").OnElements("a", "area") ++p.AllowAttrs("src").OnElements("img") ++``` ++ ++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: ++ ++```html ++<img src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="> ++``` ++ ++We have provided a helper to verify the mimetype followed by base64 content of data URIs links: ++ ++```go ++p.AllowDataURIImages() ++``` ++ ++That helper will enable GIF, JPEG, PNG and WEBP images. ++ ++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. ++ ++We also have some features to help deal with user generated content: ++```go ++p.AddTargetBlankToFullyQualifiedLinks(true) ++``` ++ ++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. ++ ++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) ++ ++### Policy Building Helpers ++ ++We also bundle some helpers to simplify policy building: ++```go ++ ++// Permits the "dir", "id", "lang", "title" attributes globally ++p.AllowStandardAttributes() ++ ++// Permits the "img" element and its standard attributes ++p.AllowImages() ++ ++// Permits ordered and unordered lists, and also definition lists ++p.AllowLists() ++ ++// Permits HTML tables and all applicable elements and non-styling attributes ++p.AllowTables() ++``` ++ ++### Invalid Instructions ++ ++The following are invalid: ++```go ++// This does not say where the attributes are allowed, you need to add ++// .Globally() or .OnElements(...) ++// This will be ignored without error. ++p.AllowAttrs("value") ++ ++// This does not say where the attributes are allowed, you need to add ++// .Globally() or .OnElements(...) ++// This will be ignored without error. ++p.AllowAttrs( ++ "type", ++).Matching( ++ regexp.MustCompile("(?i)^(circle|disc|square|a|A|i|I|1)$"), ++) ++``` ++ ++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. ++ ++## Limitations ++ ++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**. ++ ++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. ++ ++## TODO ++ ++* 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 ++* 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 ++* 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) ++ ++## Development ++ ++If you have cloned this repo you will probably need the dependency: ++ ++`go get golang.org/x/net/html` ++ ++Gophers can use their familiar tools: ++ ++`go build` ++ ++`go test` ++ ++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. ++ ++`make` will build, vet, test and install the library. ++ ++`make clean` will remove the library from a *single* `${GOPATH}/pkg` directory tree ++ ++`make test` will run the tests ++ ++`make cover` will run the tests and *open a browser window* with the coverage report ++ ++`make lint` will run golint (install via `go get github.com/golang/lint/golint`) ++ ++## Long term goals ++ ++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) ++1. Raise funds and pay for an external security review +diff --git a/vendor/github.com/microcosm-cc/bluemonday/doc.go b/vendor/github.com/microcosm-cc/bluemonday/doc.go +new file mode 100644 +index 00000000..71dab608 +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/doc.go +@@ -0,0 +1,104 @@ ++// Copyright (c) 2014, David Kitchen <david@buro9.com> ++// ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are met: ++// ++// * Redistributions of source code must retain the above copyright notice, this ++// list of conditions and the following disclaimer. ++// ++// * Redistributions in binary form must reproduce the above copyright notice, ++// this list of conditions and the following disclaimer in the documentation ++// and/or other materials provided with the distribution. ++// ++// * Neither the name of the organisation (Microcosm) nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE ++// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ++// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++/* ++Package bluemonday provides a way of describing a whitelist of HTML elements ++and attributes as a policy, and for that policy to be applied to untrusted ++strings from users that may contain markup. All elements and attributes not on ++the whitelist will be stripped. ++ ++The default bluemonday.UGCPolicy().Sanitize() turns this: ++ ++ Hello <STYLE>.XSS{background-image:url("javascript:alert('XSS')");}</STYLE><A CLASS=XSS></A>World ++ ++Into the more harmless: ++ ++ Hello World ++ ++And it turns this: ++ ++ <a href="javascript:alert('XSS1')" onmouseover="alert('XSS2')">XSS<a> ++ ++Into this: ++ ++ XSS ++ ++Whilst still allowing this: ++ ++ <a href="http://www.google.com/"> ++ <img src="https://ssl.gstatic.com/accounts/ui/logo_2x.png"/> ++ </a> ++ ++To pass through mostly unaltered (it gained a rel="nofollow"): ++ ++ <a href="http://www.google.com/" rel="nofollow"> ++ <img src="https://ssl.gstatic.com/accounts/ui/logo_2x.png"/> ++ </a> ++ ++The primary purpose of bluemonday is to take potentially unsafe user generated ++content (from things like Markdown, HTML WYSIWYG tools, etc) and make it safe ++for you to put on your website. ++ ++It protects sites against XSS (http://en.wikipedia.org/wiki/Cross-site_scripting) ++and other malicious content that a user interface may deliver. There are many ++vectors for an XSS attack (https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet) ++and the safest thing to do is to sanitize user input against a known safe list ++of HTML elements and attributes. ++ ++Note: You should always run bluemonday after any other processing. ++ ++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. ++ ++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/). ++ ++We ship two default policies, one is bluemonday.StrictPolicy() and can be ++thought of as equivalent to stripping all HTML elements and their attributes as ++it has nothing on its whitelist. ++ ++The other is bluemonday.UGCPolicy() and 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. ++ ++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.google.com/search?q=xss+prevention+cheat+sheet ) ++to help explain the risks, but essentially: ++ ++ 1. Avoid whitelisting anything other than plain HTML elements ++ 2. Avoid whitelisting `script`, `style`, `iframe`, `object`, `embed`, `base` ++ elements ++ 3. Avoid whitelisting anything other than plain HTML elements with simple ++ values that you can match to a regexp ++*/ ++package bluemonday +diff --git a/vendor/github.com/microcosm-cc/bluemonday/go.mod b/vendor/github.com/microcosm-cc/bluemonday/go.mod +new file mode 100644 +index 00000000..fa8453c5 +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/go.mod +@@ -0,0 +1,5 @@ ++module github.com/microcosm-cc/bluemonday ++ ++go 1.9 ++ ++require golang.org/x/net v0.0.0-20181220203305-927f97764cc3 +diff --git a/vendor/github.com/microcosm-cc/bluemonday/go.sum b/vendor/github.com/microcosm-cc/bluemonday/go.sum +new file mode 100644 +index 00000000..bee241d1 +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/go.sum +@@ -0,0 +1,2 @@ ++golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis= ++golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +diff --git a/vendor/github.com/microcosm-cc/bluemonday/helpers.go b/vendor/github.com/microcosm-cc/bluemonday/helpers.go +new file mode 100644 +index 00000000..dfa5868d +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/helpers.go +@@ -0,0 +1,297 @@ ++// Copyright (c) 2014, David Kitchen <david@buro9.com> ++// ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are met: ++// ++// * Redistributions of source code must retain the above copyright notice, this ++// list of conditions and the following disclaimer. ++// ++// * Redistributions in binary form must reproduce the above copyright notice, ++// this list of conditions and the following disclaimer in the documentation ++// and/or other materials provided with the distribution. ++// ++// * Neither the name of the organisation (Microcosm) nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE ++// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ++// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++package bluemonday ++ ++import ( ++ "encoding/base64" ++ "net/url" ++ "regexp" ++) ++ ++// A selection of regular expressions that can be used as .Matching() rules on ++// HTML attributes. ++var ( ++ // CellAlign handles the `align` attribute ++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-align ++ CellAlign = regexp.MustCompile(`(?i)^(center|justify|left|right|char)$`) ++ ++ // CellVerticalAlign handles the `valign` attribute ++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-valign ++ CellVerticalAlign = regexp.MustCompile(`(?i)^(baseline|bottom|middle|top)$`) ++ ++ // Direction handles the `dir` attribute ++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo#attr-dir ++ Direction = regexp.MustCompile(`(?i)^(rtl|ltr)$`) ++ ++ // ImageAlign handles the `align` attribute on the `image` tag ++ // http://www.w3.org/MarkUp/Test/Img/imgtest.html ++ ImageAlign = regexp.MustCompile( ++ `(?i)^(left|right|top|texttop|middle|absmiddle|baseline|bottom|absbottom)$`, ++ ) ++ ++ // Integer describes whole positive integers (including 0) used in places ++ // like td.colspan ++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan ++ Integer = regexp.MustCompile(`^[0-9]+$`) ++ ++ // ISO8601 according to the W3 group is only a subset of the ISO8601 ++ // standard: http://www.w3.org/TR/NOTE-datetime ++ // ++ // Used in places like time.datetime ++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time#attr-datetime ++ // ++ // Matches patterns: ++ // Year: ++ // YYYY (eg 1997) ++ // Year and month: ++ // YYYY-MM (eg 1997-07) ++ // Complete date: ++ // YYYY-MM-DD (eg 1997-07-16) ++ // Complete date plus hours and minutes: ++ // YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00) ++ // Complete date plus hours, minutes and seconds: ++ // YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00) ++ // Complete date plus hours, minutes, seconds and a decimal fraction of a ++ // second ++ // YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00) ++ ISO8601 = regexp.MustCompile( ++ `^[0-9]{4}(-[0-9]{2}(-[0-9]{2}([ T][0-9]{2}(:[0-9]{2}){1,2}(.[0-9]{1,6})` + ++ `?Z?([\+-][0-9]{2}:[0-9]{2})?)?)?)?$`, ++ ) ++ ++ // ListType encapsulates the common value as well as the latest spec ++ // values for lists ++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol#attr-type ++ ListType = regexp.MustCompile(`(?i)^(circle|disc|square|a|A|i|I|1)$`) ++ ++ // SpaceSeparatedTokens is used in places like `a.rel` and the common attribute ++ // `class` which both contain space delimited lists of data tokens ++ // http://www.w3.org/TR/html-markup/datatypes.html#common.data.tokens-def ++ // Regexp: \p{L} matches unicode letters, \p{N} matches unicode numbers ++ SpaceSeparatedTokens = regexp.MustCompile(`^([\s\p{L}\p{N}_-]+)$`) ++ ++ // Number is a double value used on HTML5 meter and progress elements ++ // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-meter-element ++ Number = regexp.MustCompile(`^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$`) ++ ++ // NumberOrPercent is used predominantly as units of measurement in width ++ // and height attributes ++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-height ++ NumberOrPercent = regexp.MustCompile(`^[0-9]+[%]?$`) ++ ++ // Paragraph of text in an attribute such as *.'title', img.alt, etc ++ // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-title ++ // Note that we are not allowing chars that could close tags like '>' ++ Paragraph = regexp.MustCompile(`^[\p{L}\p{N}\s\-_',\[\]!\./\\\(\)]*$`) ++ ++ // dataURIImagePrefix is used by AllowDataURIImages to define the acceptable ++ // prefix of data URIs that contain common web image formats. ++ // ++ // This is not exported as it's not useful by itself, and only has value ++ // within the AllowDataURIImages func ++ dataURIImagePrefix = regexp.MustCompile( ++ `^image/(gif|jpeg|png|webp);base64,`, ++ ) ++) ++ ++// AllowStandardURLs is a convenience function that will enable rel="nofollow" ++// on "a", "area" and "link" (if you have allowed those elements) and will ++// ensure that the URL values are parseable and either relative or belong to the ++// "mailto", "http", or "https" schemes ++func (p *Policy) AllowStandardURLs() { ++ // URLs must be parseable by net/url.Parse() ++ p.RequireParseableURLs(true) ++ ++ // !url.IsAbs() is permitted ++ p.AllowRelativeURLs(true) ++ ++ // Most common URL schemes only ++ p.AllowURLSchemes("mailto", "http", "https") ++ ++ // For all anchors we will add rel="nofollow" if it does not already exist ++ // This applies to "a" "area" "link" ++ p.RequireNoFollowOnLinks(true) ++} ++ ++// AllowStandardAttributes will enable "id", "title" and the language specific ++// attributes "dir" and "lang" on all elements that are whitelisted ++func (p *Policy) AllowStandardAttributes() { ++ // "dir" "lang" are permitted as both language attributes affect charsets ++ // and direction of text. ++ p.AllowAttrs("dir").Matching(Direction).Globally() ++ p.AllowAttrs( ++ "lang", ++ ).Matching(regexp.MustCompile(`[a-zA-Z]{2,20}`)).Globally() ++ ++ // "id" is permitted. This is pretty much as some HTML elements require this ++ // to work well ("dfn" is an example of a "id" being value) ++ // This does create a risk that JavaScript and CSS within your web page ++ // might identify the wrong elements. Ensure that you select things ++ // accurately ++ p.AllowAttrs("id").Matching( ++ regexp.MustCompile(`[a-zA-Z0-9\:\-_\.]+`), ++ ).Globally() ++ ++ // "title" is permitted as it improves accessibility. ++ p.AllowAttrs("title").Matching(Paragraph).Globally() ++} ++ ++// AllowStyling presently enables the class attribute globally. ++// ++// Note: When bluemonday ships a CSS parser and we can safely sanitise that, ++// this will also allow sanitized styling of elements via the style attribute. ++func (p *Policy) AllowStyling() { ++ ++ // "class" is permitted globally ++ p.AllowAttrs("class").Matching(SpaceSeparatedTokens).Globally() ++} ++ ++// AllowImages enables the img element and some popular attributes. It will also ++// ensure that URL values are parseable. This helper does not enable data URI ++// images, for that you should also use the AllowDataURIImages() helper. ++func (p *Policy) AllowImages() { ++ ++ // "img" is permitted ++ p.AllowAttrs("align").Matching(ImageAlign).OnElements("img") ++ p.AllowAttrs("alt").Matching(Paragraph).OnElements("img") ++ p.AllowAttrs("height", "width").Matching(NumberOrPercent).OnElements("img") ++ ++ // Standard URLs enabled ++ p.AllowStandardURLs() ++ p.AllowAttrs("src").OnElements("img") ++} ++ ++// AllowDataURIImages permits the use of inline images defined in RFC2397 ++// http://tools.ietf.org/html/rfc2397 ++// http://en.wikipedia.org/wiki/Data_URI_scheme ++// ++// Images must have a mimetype matching: ++// image/gif ++// image/jpeg ++// image/png ++// image/webp ++// ++// NOTE: There is a potential security risk to allowing data URIs and you should ++// only permit them on content you already trust. ++// http://palizine.plynt.com/issues/2010Oct/bypass-xss-filters/ ++// https://capec.mitre.org/data/definitions/244.html ++func (p *Policy) AllowDataURIImages() { ++ ++ // URLs must be parseable by net/url.Parse() ++ p.RequireParseableURLs(true) ++ ++ // Supply a function to validate images contained within data URI ++ p.AllowURLSchemeWithCustomPolicy( ++ "data", ++ func(url *url.URL) (allowUrl bool) { ++ if url.RawQuery != "" || url.Fragment != "" { ++ return false ++ } ++ ++ matched := dataURIImagePrefix.FindString(url.Opaque) ++ if matched == "" { ++ return false ++ } ++ ++ _, err := base64.StdEncoding.DecodeString(url.Opaque[len(matched):]) ++ if err != nil { ++ return false ++ } ++ ++ return true ++ }, ++ ) ++} ++ ++// AllowLists will enabled ordered and unordered lists, as well as definition ++// lists ++func (p *Policy) AllowLists() { ++ // "ol" "ul" are permitted ++ p.AllowAttrs("type").Matching(ListType).OnElements("ol", "ul") ++ ++ // "li" is permitted ++ p.AllowAttrs("type").Matching(ListType).OnElements("li") ++ p.AllowAttrs("value").Matching(Integer).OnElements("li") ++ ++ // "dl" "dt" "dd" are permitted ++ p.AllowElements("dl", "dt", "dd") ++} ++ ++// AllowTables will enable a rich set of elements and attributes to describe ++// HTML tables ++func (p *Policy) AllowTables() { ++ ++ // "table" is permitted ++ p.AllowAttrs("height", "width").Matching(NumberOrPercent).OnElements("table") ++ p.AllowAttrs("summary").Matching(Paragraph).OnElements("table") ++ ++ // "caption" is permitted ++ p.AllowElements("caption") ++ ++ // "col" "colgroup" are permitted ++ p.AllowAttrs("align").Matching(CellAlign).OnElements("col", "colgroup") ++ p.AllowAttrs("height", "width").Matching( ++ NumberOrPercent, ++ ).OnElements("col", "colgroup") ++ p.AllowAttrs("span").Matching(Integer).OnElements("colgroup", "col") ++ p.AllowAttrs("valign").Matching( ++ CellVerticalAlign, ++ ).OnElements("col", "colgroup") ++ ++ // "thead" "tr" are permitted ++ p.AllowAttrs("align").Matching(CellAlign).OnElements("thead", "tr") ++ p.AllowAttrs("valign").Matching(CellVerticalAlign).OnElements("thead", "tr") ++ ++ // "td" "th" are permitted ++ p.AllowAttrs("abbr").Matching(Paragraph).OnElements("td", "th") ++ p.AllowAttrs("align").Matching(CellAlign).OnElements("td", "th") ++ p.AllowAttrs("colspan", "rowspan").Matching(Integer).OnElements("td", "th") ++ p.AllowAttrs("headers").Matching( ++ SpaceSeparatedTokens, ++ ).OnElements("td", "th") ++ p.AllowAttrs("height", "width").Matching( ++ NumberOrPercent, ++ ).OnElements("td", "th") ++ p.AllowAttrs( ++ "scope", ++ ).Matching( ++ regexp.MustCompile(`(?i)(?:row|col)(?:group)?`), ++ ).OnElements("td", "th") ++ p.AllowAttrs("valign").Matching(CellVerticalAlign).OnElements("td", "th") ++ p.AllowAttrs("nowrap").Matching( ++ regexp.MustCompile(`(?i)|nowrap`), ++ ).OnElements("td", "th") ++ ++ // "tbody" "tfoot" ++ p.AllowAttrs("align").Matching(CellAlign).OnElements("tbody", "tfoot") ++ p.AllowAttrs("valign").Matching( ++ CellVerticalAlign, ++ ).OnElements("tbody", "tfoot") ++} +diff --git a/vendor/github.com/microcosm-cc/bluemonday/policies.go b/vendor/github.com/microcosm-cc/bluemonday/policies.go +new file mode 100644 +index 00000000..570bba88 +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/policies.go +@@ -0,0 +1,253 @@ ++// Copyright (c) 2014, David Kitchen <david@buro9.com> ++// ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are met: ++// ++// * Redistributions of source code must retain the above copyright notice, this ++// list of conditions and the following disclaimer. ++// ++// * Redistributions in binary form must reproduce the above copyright notice, ++// this list of conditions and the following disclaimer in the documentation ++// and/or other materials provided with the distribution. ++// ++// * Neither the name of the organisation (Microcosm) nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE ++// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ++// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++package bluemonday ++ ++import ( ++ "regexp" ++) ++ ++// StrictPolicy returns an empty policy, which will effectively strip all HTML ++// elements and their attributes from a document. ++func StrictPolicy() *Policy { ++ return NewPolicy() ++} ++ ++// StripTagsPolicy is DEPRECATED. Use StrictPolicy instead. ++func StripTagsPolicy() *Policy { ++ return StrictPolicy() ++} ++ ++// UGCPolicy returns a policy aimed at user generated content that is a result ++// of HTML WYSIWYG tools and Markdown conversions. ++// ++// This is expected to be a fairly rich document where as much markup as ++// possible should be retained. Markdown permits raw HTML so we are basically ++// providing a policy to sanitise HTML5 documents safely but with the ++// least intrusion on the formatting expectations of the user. ++func UGCPolicy() *Policy { ++ ++ p := NewPolicy() ++ ++ /////////////////////// ++ // Global attributes // ++ /////////////////////// ++ ++ // "class" is not permitted as we are not allowing users to style their own ++ // content ++ ++ p.AllowStandardAttributes() ++ ++ ////////////////////////////// ++ // Global URL format policy // ++ ////////////////////////////// ++ ++ p.AllowStandardURLs() ++ ++ //////////////////////////////// ++ // Declarations and structure // ++ //////////////////////////////// ++ ++ // "xml" "xslt" "DOCTYPE" "html" "head" are not permitted as we are ++ // expecting user generated content to be a fragment of HTML and not a full ++ // document. ++ ++ ////////////////////////// ++ // Sectioning root tags // ++ ////////////////////////// ++ ++ // "article" and "aside" are permitted and takes no attributes ++ p.AllowElements("article", "aside") ++ ++ // "body" is not permitted as we are expecting user generated content to be a fragment ++ // of HTML and not a full document. ++ ++ // "details" is permitted, including the "open" attribute which can either ++ // be blank or the value "open". ++ p.AllowAttrs( ++ "open", ++ ).Matching(regexp.MustCompile(`(?i)^(|open)$`)).OnElements("details") ++ ++ // "fieldset" is not permitted as we are not allowing forms to be created. ++ ++ // "figure" is permitted and takes no attributes ++ p.AllowElements("figure") ++ ++ // "nav" is not permitted as it is assumed that the site (and not the user) ++ // has defined navigation elements ++ ++ // "section" is permitted and takes no attributes ++ p.AllowElements("section") ++ ++ // "summary" is permitted and takes no attributes ++ p.AllowElements("summary") ++ ++ ////////////////////////// ++ // Headings and footers // ++ ////////////////////////// ++ ++ // "footer" is not permitted as we expect user content to be a fragment and ++ // not structural to this extent ++ ++ // "h1" through "h6" are permitted and take no attributes ++ p.AllowElements("h1", "h2", "h3", "h4", "h5", "h6") ++ ++ // "header" is not permitted as we expect user content to be a fragment and ++ // not structural to this extent ++ ++ // "hgroup" is permitted and takes no attributes ++ p.AllowElements("hgroup") ++ ++ ///////////////////////////////////// ++ // Content grouping and separating // ++ ///////////////////////////////////// ++ ++ // "blockquote" is permitted, including the "cite" attribute which must be ++ // a standard URL. ++ p.AllowAttrs("cite").OnElements("blockquote") ++ ++ // "br" "div" "hr" "p" "span" "wbr" are permitted and take no attributes ++ p.AllowElements("br", "div", "hr", "p", "span", "wbr") ++ ++ /////////// ++ // Links // ++ /////////// ++ ++ // "a" is permitted ++ p.AllowAttrs("href").OnElements("a") ++ ++ // "area" is permitted along with the attributes that map image maps work ++ p.AllowAttrs("name").Matching( ++ regexp.MustCompile(`^([\p{L}\p{N}_-]+)$`), ++ ).OnElements("map") ++ p.AllowAttrs("alt").Matching(Paragraph).OnElements("area") ++ p.AllowAttrs("coords").Matching( ++ regexp.MustCompile(`^([0-9]+,)+[0-9]+$`), ++ ).OnElements("area") ++ p.AllowAttrs("href").OnElements("area") ++ p.AllowAttrs("rel").Matching(SpaceSeparatedTokens).OnElements("area") ++ p.AllowAttrs("shape").Matching( ++ regexp.MustCompile(`(?i)^(default|circle|rect|poly)$`), ++ ).OnElements("area") ++ p.AllowAttrs("usemap").Matching( ++ regexp.MustCompile(`(?i)^#[\p{L}\p{N}_-]+$`), ++ ).OnElements("img") ++ ++ // "link" is not permitted ++ ++ ///////////////////// ++ // Phrase elements // ++ ///////////////////// ++ ++ // The following are all inline phrasing elements ++ p.AllowElements("abbr", "acronym", "cite", "code", "dfn", "em", ++ "figcaption", "mark", "s", "samp", "strong", "sub", "sup", "var") ++ ++ // "q" is permitted and "cite" is a URL and handled by URL policies ++ p.AllowAttrs("cite").OnElements("q") ++ ++ // "time" is permitted ++ p.AllowAttrs("datetime").Matching(ISO8601).OnElements("time") ++ ++ //////////////////// ++ // Style elements // ++ //////////////////// ++ ++ // block and inline elements that impart no semantic meaning but style the ++ // document ++ p.AllowElements("b", "i", "pre", "small", "strike", "tt", "u") ++ ++ // "style" is not permitted as we are not yet sanitising CSS and it is an ++ // XSS attack vector ++ ++ ////////////////////// ++ // HTML5 Formatting // ++ ////////////////////// ++ ++ // "bdi" "bdo" are permitted ++ p.AllowAttrs("dir").Matching(Direction).OnElements("bdi", "bdo") ++ ++ // "rp" "rt" "ruby" are permitted ++ p.AllowElements("rp", "rt", "ruby") ++ ++ /////////////////////////// ++ // HTML5 Change tracking // ++ /////////////////////////// ++ ++ // "del" "ins" are permitted ++ p.AllowAttrs("cite").Matching(Paragraph).OnElements("del", "ins") ++ p.AllowAttrs("datetime").Matching(ISO8601).OnElements("del", "ins") ++ ++ /////////// ++ // Lists // ++ /////////// ++ ++ p.AllowLists() ++ ++ //////////// ++ // Tables // ++ //////////// ++ ++ p.AllowTables() ++ ++ /////////// ++ // Forms // ++ /////////// ++ ++ // By and large, forms are not permitted. However there are some form ++ // elements that can be used to present data, and we do permit those ++ // ++ // "button" "fieldset" "input" "keygen" "label" "output" "select" "datalist" ++ // "textarea" "optgroup" "option" are all not permitted ++ ++ // "meter" is permitted ++ p.AllowAttrs( ++ "value", ++ "min", ++ "max", ++ "low", ++ "high", ++ "optimum", ++ ).Matching(Number).OnElements("meter") ++ ++ // "progress" is permitted ++ p.AllowAttrs("value", "max").Matching(Number).OnElements("progress") ++ ++ ////////////////////// ++ // Embedded content // ++ ////////////////////// ++ ++ // Vast majority not permitted ++ // "audio" "canvas" "embed" "iframe" "object" "param" "source" "svg" "track" ++ // "video" are all not permitted ++ ++ p.AllowImages() ++ ++ return p ++} +diff --git a/vendor/github.com/microcosm-cc/bluemonday/policy.go b/vendor/github.com/microcosm-cc/bluemonday/policy.go +new file mode 100644 +index 00000000..f61d98f5 +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/policy.go +@@ -0,0 +1,552 @@ ++// Copyright (c) 2014, David Kitchen <david@buro9.com> ++// ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are met: ++// ++// * Redistributions of source code must retain the above copyright notice, this ++// list of conditions and the following disclaimer. ++// ++// * Redistributions in binary form must reproduce the above copyright notice, ++// this list of conditions and the following disclaimer in the documentation ++// and/or other materials provided with the distribution. ++// ++// * Neither the name of the organisation (Microcosm) nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE ++// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ++// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++package bluemonday ++ ++import ( ++ "net/url" ++ "regexp" ++ "strings" ++) ++ ++// Policy encapsulates the whitelist of HTML elements and attributes that will ++// be applied to the sanitised HTML. ++// ++// You should use bluemonday.NewPolicy() to create a blank policy as the ++// unexported fields contain maps that need to be initialized. ++type Policy struct { ++ ++ // Declares whether the maps have been initialized, used as a cheap check to ++ // ensure that those using Policy{} directly won't cause nil pointer ++ // exceptions ++ initialized bool ++ ++ // If true then we add spaces when stripping tags, specifically the closing ++ // tag is replaced by a space character. ++ addSpaces bool ++ ++ // When true, add rel="nofollow" to HTML anchors ++ requireNoFollow bool ++ ++ // When true, add rel="nofollow" to HTML anchors ++ // Will add for href="http://foo" ++ // Will skip for href="/foo" or href="foo" ++ requireNoFollowFullyQualifiedLinks bool ++ ++ // When true add target="_blank" to fully qualified links ++ // Will add for href="http://foo" ++ // Will skip for href="/foo" or href="foo" ++ addTargetBlankToFullyQualifiedLinks bool ++ ++ // When true, URLs must be parseable by "net/url" url.Parse() ++ requireParseableURLs bool ++ ++ // When true, u, _ := url.Parse("url"); !u.IsAbs() is permitted ++ allowRelativeURLs bool ++ ++ // When true, allow data attributes. ++ allowDataAttributes bool ++ ++ // map[htmlElementName]map[htmlAttributeName]attrPolicy ++ elsAndAttrs map[string]map[string]attrPolicy ++ ++ // map[htmlAttributeName]attrPolicy ++ globalAttrs map[string]attrPolicy ++ ++ // If urlPolicy is nil, all URLs with matching schema are allowed. ++ // Otherwise, only the URLs with matching schema and urlPolicy(url) ++ // returning true are allowed. ++ allowURLSchemes map[string]urlPolicy ++ ++ // If an element has had all attributes removed as a result of a policy ++ // being applied, then the element would be removed from the output. ++ // ++ // However some elements are valid and have strong layout meaning without ++ // any attributes, i.e. <table>. To prevent those being removed we maintain ++ // a list of elements that are allowed to have no attributes and that will ++ // be maintained in the output HTML. ++ setOfElementsAllowedWithoutAttrs map[string]struct{} ++ ++ setOfElementsToSkipContent map[string]struct{} ++} ++ ++type attrPolicy struct { ++ ++ // optional pattern to match, when not nil the regexp needs to match ++ // otherwise the attribute is removed ++ regexp *regexp.Regexp ++} ++ ++type attrPolicyBuilder struct { ++ p *Policy ++ ++ attrNames []string ++ regexp *regexp.Regexp ++ allowEmpty bool ++} ++ ++type urlPolicy func(url *url.URL) (allowUrl bool) ++ ++// init initializes the maps if this has not been done already ++func (p *Policy) init() { ++ if !p.initialized { ++ p.elsAndAttrs = make(map[string]map[string]attrPolicy) ++ p.globalAttrs = make(map[string]attrPolicy) ++ p.allowURLSchemes = make(map[string]urlPolicy) ++ p.setOfElementsAllowedWithoutAttrs = make(map[string]struct{}) ++ p.setOfElementsToSkipContent = make(map[string]struct{}) ++ p.initialized = true ++ } ++} ++ ++// NewPolicy returns a blank policy with nothing whitelisted or permitted. This ++// is the recommended way to start building a policy and you should now use ++// AllowAttrs() and/or AllowElements() to construct the whitelist of HTML ++// elements and attributes. ++func NewPolicy() *Policy { ++ ++ p := Policy{} ++ ++ p.addDefaultElementsWithoutAttrs() ++ p.addDefaultSkipElementContent() ++ ++ return &p ++} ++ ++// AllowAttrs takes a range of HTML attribute names and returns an ++// attribute policy builder that allows you to specify the pattern and scope of ++// the whitelisted attribute. ++// ++// The attribute policy is only added to the core policy when either Globally() ++// or OnElements(...) are called. ++func (p *Policy) AllowAttrs(attrNames ...string) *attrPolicyBuilder { ++ ++ p.init() ++ ++ abp := attrPolicyBuilder{ ++ p: p, ++ allowEmpty: false, ++ } ++ ++ for _, attrName := range attrNames { ++ abp.attrNames = append(abp.attrNames, strings.ToLower(attrName)) ++ } ++ ++ return &abp ++} ++ ++// AllowDataAttributes whitelists all data attributes. We can't specify the name ++// of each attribute exactly as they are customized. ++// ++// NOTE: These values are not sanitized and applications that evaluate or process ++// them without checking and verification of the input may be at risk if this option ++// is enabled. This is a 'caveat emptor' option and the person enabling this option ++// needs to fully understand the potential impact with regards to whatever application ++// will be consuming the sanitized HTML afterwards, i.e. if you know you put a link in a ++// data attribute and use that to automatically load some new window then you're giving ++// the author of a HTML fragment the means to open a malicious destination automatically. ++// Use with care! ++func (p *Policy) AllowDataAttributes() { ++ p.allowDataAttributes = true ++} ++ ++// AllowNoAttrs says that attributes on element are optional. ++// ++// The attribute policy is only added to the core policy when OnElements(...) ++// are called. ++func (p *Policy) AllowNoAttrs() *attrPolicyBuilder { ++ ++ p.init() ++ ++ abp := attrPolicyBuilder{ ++ p: p, ++ allowEmpty: true, ++ } ++ return &abp ++} ++ ++// AllowNoAttrs says that attributes on element are optional. ++// ++// The attribute policy is only added to the core policy when OnElements(...) ++// are called. ++func (abp *attrPolicyBuilder) AllowNoAttrs() *attrPolicyBuilder { ++ ++ abp.allowEmpty = true ++ ++ return abp ++} ++ ++// Matching allows a regular expression to be applied to a nascent attribute ++// policy, and returns the attribute policy. Calling this more than once will ++// replace the existing regexp. ++func (abp *attrPolicyBuilder) Matching(regex *regexp.Regexp) *attrPolicyBuilder { ++ ++ abp.regexp = regex ++ ++ return abp ++} ++ ++// OnElements will bind an attribute policy to a given range of HTML elements ++// and return the updated policy ++func (abp *attrPolicyBuilder) OnElements(elements ...string) *Policy { ++ ++ for _, element := range elements { ++ element = strings.ToLower(element) ++ ++ for _, attr := range abp.attrNames { ++ ++ if _, ok := abp.p.elsAndAttrs[element]; !ok { ++ abp.p.elsAndAttrs[element] = make(map[string]attrPolicy) ++ } ++ ++ ap := attrPolicy{} ++ if abp.regexp != nil { ++ ap.regexp = abp.regexp ++ } ++ ++ abp.p.elsAndAttrs[element][attr] = ap ++ } ++ ++ if abp.allowEmpty { ++ abp.p.setOfElementsAllowedWithoutAttrs[element] = struct{}{} ++ ++ if _, ok := abp.p.elsAndAttrs[element]; !ok { ++ abp.p.elsAndAttrs[element] = make(map[string]attrPolicy) ++ } ++ } ++ } ++ ++ return abp.p ++} ++ ++// Globally will bind an attribute policy to all HTML elements and return the ++// updated policy ++func (abp *attrPolicyBuilder) Globally() *Policy { ++ ++ for _, attr := range abp.attrNames { ++ if _, ok := abp.p.globalAttrs[attr]; !ok { ++ abp.p.globalAttrs[attr] = attrPolicy{} ++ } ++ ++ ap := attrPolicy{} ++ if abp.regexp != nil { ++ ap.regexp = abp.regexp ++ } ++ ++ abp.p.globalAttrs[attr] = ap ++ } ++ ++ return abp.p ++} ++ ++// AllowElements will append HTML elements to the whitelist without applying an ++// attribute policy to those elements (the elements are permitted ++// sans-attributes) ++func (p *Policy) AllowElements(names ...string) *Policy { ++ p.init() ++ ++ for _, element := range names { ++ element = strings.ToLower(element) ++ ++ if _, ok := p.elsAndAttrs[element]; !ok { ++ p.elsAndAttrs[element] = make(map[string]attrPolicy) ++ } ++ } ++ ++ return p ++} ++ ++// RequireNoFollowOnLinks will result in all <a> tags having a rel="nofollow" ++// added to them if one does not already exist ++// ++// Note: This requires p.RequireParseableURLs(true) and will enable it. ++func (p *Policy) RequireNoFollowOnLinks(require bool) *Policy { ++ ++ p.requireNoFollow = require ++ p.requireParseableURLs = true ++ ++ return p ++} ++ ++// RequireNoFollowOnFullyQualifiedLinks will result in all <a> tags that point ++// to a non-local destination (i.e. starts with a protocol and has a host) ++// having a rel="nofollow" added to them if one does not already exist ++// ++// Note: This requires p.RequireParseableURLs(true) and will enable it. ++func (p *Policy) RequireNoFollowOnFullyQualifiedLinks(require bool) *Policy { ++ ++ p.requireNoFollowFullyQualifiedLinks = require ++ p.requireParseableURLs = true ++ ++ return p ++} ++ ++// AddTargetBlankToFullyQualifiedLinks will result in all <a> tags that point ++// to a non-local destination (i.e. starts with a protocol and has a host) ++// having a target="_blank" added to them if one does not already exist ++// ++// Note: This requires p.RequireParseableURLs(true) and will enable it. ++func (p *Policy) AddTargetBlankToFullyQualifiedLinks(require bool) *Policy { ++ ++ p.addTargetBlankToFullyQualifiedLinks = require ++ p.requireParseableURLs = true ++ ++ return p ++} ++ ++// RequireParseableURLs will result in all URLs requiring that they be parseable ++// by "net/url" url.Parse() ++// This applies to: ++// - a.href ++// - area.href ++// - blockquote.cite ++// - img.src ++// - link.href ++// - script.src ++func (p *Policy) RequireParseableURLs(require bool) *Policy { ++ ++ p.requireParseableURLs = require ++ ++ return p ++} ++ ++// AllowRelativeURLs enables RequireParseableURLs and then permits URLs that ++// are parseable, have no schema information and url.IsAbs() returns false ++// This permits local URLs ++func (p *Policy) AllowRelativeURLs(require bool) *Policy { ++ ++ p.RequireParseableURLs(true) ++ p.allowRelativeURLs = require ++ ++ return p ++} ++ ++// AllowURLSchemes will append URL schemes to the whitelist ++// Example: p.AllowURLSchemes("mailto", "http", "https") ++func (p *Policy) AllowURLSchemes(schemes ...string) *Policy { ++ p.init() ++ ++ p.RequireParseableURLs(true) ++ ++ for _, scheme := range schemes { ++ scheme = strings.ToLower(scheme) ++ ++ // Allow all URLs with matching scheme. ++ p.allowURLSchemes[scheme] = nil ++ } ++ ++ return p ++} ++ ++// AllowURLSchemeWithCustomPolicy will append URL schemes with ++// a custom URL policy to the whitelist. ++// Only the URLs with matching schema and urlPolicy(url) ++// returning true will be allowed. ++func (p *Policy) AllowURLSchemeWithCustomPolicy( ++ scheme string, ++ urlPolicy func(url *url.URL) (allowUrl bool), ++) *Policy { ++ ++ p.init() ++ ++ p.RequireParseableURLs(true) ++ ++ scheme = strings.ToLower(scheme) ++ ++ p.allowURLSchemes[scheme] = urlPolicy ++ ++ return p ++} ++ ++// AddSpaceWhenStrippingTag states whether to add a single space " " when ++// removing tags that are not whitelisted by the policy. ++// ++// This is useful if you expect to strip tags in dense markup and may lose the ++// value of whitespace. ++// ++// For example: "<p>Hello</p><p>World</p>"" would be sanitized to "HelloWorld" ++// with the default value of false, but you may wish to sanitize this to ++// " Hello World " by setting AddSpaceWhenStrippingTag to true as this would ++// retain the intent of the text. ++func (p *Policy) AddSpaceWhenStrippingTag(allow bool) *Policy { ++ ++ p.addSpaces = allow ++ ++ return p ++} ++ ++// SkipElementsContent adds the HTML elements whose tags is needed to be removed ++// with its content. ++func (p *Policy) SkipElementsContent(names ...string) *Policy { ++ ++ p.init() ++ ++ for _, element := range names { ++ element = strings.ToLower(element) ++ ++ if _, ok := p.setOfElementsToSkipContent[element]; !ok { ++ p.setOfElementsToSkipContent[element] = struct{}{} ++ } ++ } ++ ++ return p ++} ++ ++// AllowElementsContent marks the HTML elements whose content should be ++// retained after removing the tag. ++func (p *Policy) AllowElementsContent(names ...string) *Policy { ++ ++ p.init() ++ ++ for _, element := range names { ++ delete(p.setOfElementsToSkipContent, strings.ToLower(element)) ++ } ++ ++ return p ++} ++ ++// addDefaultElementsWithoutAttrs adds the HTML elements that we know are valid ++// without any attributes to an internal map. ++// i.e. we know that <table> is valid, but <bdo> isn't valid as the "dir" attr ++// is mandatory ++func (p *Policy) addDefaultElementsWithoutAttrs() { ++ p.init() ++ ++ p.setOfElementsAllowedWithoutAttrs["abbr"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["acronym"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["address"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["article"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["aside"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["audio"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["b"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["bdi"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["blockquote"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["body"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["br"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["button"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["canvas"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["caption"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["center"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["cite"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["code"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["col"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["colgroup"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["datalist"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["dd"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["del"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["details"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["dfn"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["div"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["dl"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["dt"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["em"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["fieldset"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["figcaption"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["figure"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["footer"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["h1"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["h2"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["h3"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["h4"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["h5"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["h6"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["head"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["header"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["hgroup"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["hr"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["html"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["i"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["ins"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["kbd"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["li"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["mark"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["marquee"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["nav"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["ol"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["optgroup"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["option"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["p"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["pre"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["q"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["rp"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["rt"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["ruby"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["s"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["samp"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["script"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["section"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["select"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["small"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["span"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["strike"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["strong"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["style"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["sub"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["summary"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["sup"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["svg"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["table"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["tbody"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["td"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["textarea"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["tfoot"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["th"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["thead"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["title"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["time"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["tr"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["tt"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["u"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["ul"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["var"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["video"] = struct{}{} ++ p.setOfElementsAllowedWithoutAttrs["wbr"] = struct{}{} ++ ++} ++ ++// addDefaultSkipElementContent adds the HTML elements that we should skip ++// rendering the character content of, if the element itself is not allowed. ++// This is all character data that the end user would not normally see. ++// i.e. if we exclude a <script> tag then we shouldn't render the JavaScript or ++// anything else until we encounter the closing </script> tag. ++func (p *Policy) addDefaultSkipElementContent() { ++ p.init() ++ ++ p.setOfElementsToSkipContent["frame"] = struct{}{} ++ p.setOfElementsToSkipContent["frameset"] = struct{}{} ++ p.setOfElementsToSkipContent["iframe"] = struct{}{} ++ p.setOfElementsToSkipContent["noembed"] = struct{}{} ++ p.setOfElementsToSkipContent["noframes"] = struct{}{} ++ p.setOfElementsToSkipContent["noscript"] = struct{}{} ++ p.setOfElementsToSkipContent["nostyle"] = struct{}{} ++ p.setOfElementsToSkipContent["object"] = struct{}{} ++ p.setOfElementsToSkipContent["script"] = struct{}{} ++ p.setOfElementsToSkipContent["style"] = struct{}{} ++ p.setOfElementsToSkipContent["title"] = struct{}{} ++} +diff --git a/vendor/github.com/microcosm-cc/bluemonday/sanitize.go b/vendor/github.com/microcosm-cc/bluemonday/sanitize.go +new file mode 100644 +index 00000000..65ed89b7 +--- /dev/null ++++ b/vendor/github.com/microcosm-cc/bluemonday/sanitize.go +@@ -0,0 +1,581 @@ ++// Copyright (c) 2014, David Kitchen <david@buro9.com> ++// ++// All rights reserved. ++// ++// Redistribution and use in source and binary forms, with or without ++// modification, are permitted provided that the following conditions are met: ++// ++// * Redistributions of source code must retain the above copyright notice, this ++// list of conditions and the following disclaimer. ++// ++// * Redistributions in binary form must reproduce the above copyright notice, ++// this list of conditions and the following disclaimer in the documentation ++// and/or other materials provided with the distribution. ++// ++// * Neither the name of the organisation (Microcosm) nor the names of its ++// contributors may be used to endorse or promote products derived from ++// this software without specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ++// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE ++// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ++// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ ++package bluemonday ++ ++import ( ++ "bytes" ++ "io" ++ "net/url" ++ "regexp" ++ "strings" ++ ++ "golang.org/x/net/html" ++) ++ ++var ( ++ dataAttribute = regexp.MustCompile("^data-.+") ++ dataAttributeXMLPrefix = regexp.MustCompile("^xml.+") ++ dataAttributeInvalidChars = regexp.MustCompile("[A-Z;]+") ++) ++ ++// Sanitize takes a string that contains a HTML fragment or document and applies ++// the given policy whitelist. ++// ++// It returns a HTML string that has been sanitized by the policy or an empty ++// string if an error has occurred (most likely as a consequence of extremely ++// malformed input) ++func (p *Policy) Sanitize(s string) string { ++ if strings.TrimSpace(s) == "" { ++ return s ++ } ++ ++ return p.sanitize(strings.NewReader(s)).String() ++} ++ ++// SanitizeBytes takes a []byte that contains a HTML fragment or document and applies ++// the given policy whitelist. ++// ++// It returns a []byte containing the HTML that has been sanitized by the policy ++// or an empty []byte if an error has occurred (most likely as a consequence of ++// extremely malformed input) ++func (p *Policy) SanitizeBytes(b []byte) []byte { ++ if len(bytes.TrimSpace(b)) == 0 { ++ return b ++ } ++ ++ return p.sanitize(bytes.NewReader(b)).Bytes() ++} ++ ++// SanitizeReader takes an io.Reader that contains a HTML fragment or document ++// and applies the given policy whitelist. ++// ++// It returns a bytes.Buffer containing the HTML that has been sanitized by the ++// policy. Errors during sanitization will merely return an empty result. ++func (p *Policy) SanitizeReader(r io.Reader) *bytes.Buffer { ++ return p.sanitize(r) ++} ++ ++// Performs the actual sanitization process. ++func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { ++ ++ // It is possible that the developer has created the policy via: ++ // p := bluemonday.Policy{} ++ // rather than: ++ // p := bluemonday.NewPolicy() ++ // If this is the case, and if they haven't yet triggered an action that ++ // would initiliaze the maps, then we need to do that. ++ p.init() ++ ++ var ( ++ buff bytes.Buffer ++ skipElementContent bool ++ skippingElementsCount int64 ++ skipClosingTag bool ++ closingTagToSkipStack []string ++ mostRecentlyStartedToken string ++ ) ++ ++ tokenizer := html.NewTokenizer(r) ++ for { ++ if tokenizer.Next() == html.ErrorToken { ++ err := tokenizer.Err() ++ if err == io.EOF { ++ // End of input means end of processing ++ return &buff ++ } ++ ++ // Raw tokenizer error ++ return &bytes.Buffer{} ++ } ++ ++ token := tokenizer.Token() ++ switch token.Type { ++ case html.DoctypeToken: ++ ++ // DocType is not handled as there is no safe parsing mechanism ++ // provided by golang.org/x/net/html for the content, and this can ++ // be misused to insert HTML tags that are not then sanitized ++ // ++ // One might wish to recursively sanitize here using the same policy ++ // but I will need to do some further testing before considering ++ // this. ++ ++ case html.CommentToken: ++ ++ // Comments are ignored by default ++ ++ case html.StartTagToken: ++ ++ mostRecentlyStartedToken = token.Data ++ ++ aps, ok := p.elsAndAttrs[token.Data] ++ if !ok { ++ if _, ok := p.setOfElementsToSkipContent[token.Data]; ok { ++ skipElementContent = true ++ skippingElementsCount++ ++ } ++ if p.addSpaces { ++ buff.WriteString(" ") ++ } ++ break ++ } ++ ++ if len(token.Attr) != 0 { ++ token.Attr = p.sanitizeAttrs(token.Data, token.Attr, aps) ++ } ++ ++ if len(token.Attr) == 0 { ++ if !p.allowNoAttrs(token.Data) { ++ skipClosingTag = true ++ closingTagToSkipStack = append(closingTagToSkipStack, token.Data) ++ if p.addSpaces { ++ buff.WriteString(" ") ++ } ++ break ++ } ++ } ++ ++ if !skipElementContent { ++ buff.WriteString(token.String()) ++ } ++ ++ case html.EndTagToken: ++ ++ if mostRecentlyStartedToken == token.Data { ++ mostRecentlyStartedToken = "" ++ } ++ ++ if skipClosingTag && closingTagToSkipStack[len(closingTagToSkipStack)-1] == token.Data { ++ closingTagToSkipStack = closingTagToSkipStack[:len(closingTagToSkipStack)-1] ++ if len(closingTagToSkipStack) == 0 { ++ skipClosingTag = false ++ } ++ if p.addSpaces { ++ buff.WriteString(" ") ++ } ++ break ++ } ++ ++ if _, ok := p.elsAndAttrs[token.Data]; !ok { ++ if _, ok := p.setOfElementsToSkipContent[token.Data]; ok { ++ skippingElementsCount-- ++ if skippingElementsCount == 0 { ++ skipElementContent = false ++ } ++ } ++ if p.addSpaces { ++ buff.WriteString(" ") ++ } ++ break ++ } ++ ++ if !skipElementContent { ++ buff.WriteString(token.String()) ++ } ++ ++ case html.SelfClosingTagToken: ++ ++ aps, ok := p.elsAndAttrs[token.Data] ++ if !ok { ++ if p.addSpaces { ++ buff.WriteString(" ") ++ } ++ break ++ } ++ ++ if len(token.Attr) != 0 { ++ token.Attr = p.sanitizeAttrs(token.Data, token.Attr, aps) ++ } ++ ++ if len(token.Attr) == 0 && !p.allowNoAttrs(token.Data) { ++ if p.addSpaces { ++ buff.WriteString(" ") ++ } ++ break ++ } ++ ++ if !skipElementContent { ++ buff.WriteString(token.String()) ++ } ++ ++ case html.TextToken: ++ ++ if !skipElementContent { ++ switch mostRecentlyStartedToken { ++ case "script": ++ // not encouraged, but if a policy allows JavaScript we ++ // should not HTML escape it as that would break the output ++ buff.WriteString(token.Data) ++ case "style": ++ // not encouraged, but if a policy allows CSS styles we ++ // should not HTML escape it as that would break the output ++ buff.WriteString(token.Data) ++ default: ++ // HTML escape the text ++ buff.WriteString(token.String()) ++ } ++ } ++ default: ++ // A token that didn't exist in the html package when we wrote this ++ return &bytes.Buffer{} ++ } ++ } ++} ++ ++// sanitizeAttrs takes a set of element attribute policies and the global ++// attribute policies and applies them to the []html.Attribute returning a set ++// of html.Attributes that match the policies ++func (p *Policy) sanitizeAttrs( ++ elementName string, ++ attrs []html.Attribute, ++ aps map[string]attrPolicy, ++) []html.Attribute { ++ ++ if len(attrs) == 0 { ++ return attrs ++ } ++ ++ // Builds a new attribute slice based on the whether the attribute has been ++ // whitelisted explicitly or globally. ++ cleanAttrs := []html.Attribute{} ++ for _, htmlAttr := range attrs { ++ if p.allowDataAttributes { ++ // If we see a data attribute, let it through. ++ if isDataAttribute(htmlAttr.Key) { ++ cleanAttrs = append(cleanAttrs, htmlAttr) ++ continue ++ } ++ } ++ // Is there an element specific attribute policy that applies? ++ if ap, ok := aps[htmlAttr.Key]; ok { ++ if ap.regexp != nil { ++ if ap.regexp.MatchString(htmlAttr.Val) { ++ cleanAttrs = append(cleanAttrs, htmlAttr) ++ continue ++ } ++ } else { ++ cleanAttrs = append(cleanAttrs, htmlAttr) ++ continue ++ } ++ } ++ ++ // Is there a global attribute policy that applies? ++ if ap, ok := p.globalAttrs[htmlAttr.Key]; ok { ++ ++ if ap.regexp != nil { ++ if ap.regexp.MatchString(htmlAttr.Val) { ++ cleanAttrs = append(cleanAttrs, htmlAttr) ++ } ++ } else { ++ cleanAttrs = append(cleanAttrs, htmlAttr) ++ } ++ } ++ } ++ ++ if len(cleanAttrs) == 0 { ++ // If nothing was allowed, let's get out of here ++ return cleanAttrs ++ } ++ // cleanAttrs now contains the attributes that are permitted ++ ++ if linkable(elementName) { ++ if p.requireParseableURLs { ++ // Ensure URLs are parseable: ++ // - a.href ++ // - area.href ++ // - link.href ++ // - blockquote.cite ++ // - q.cite ++ // - img.src ++ // - script.src ++ tmpAttrs := []html.Attribute{} ++ for _, htmlAttr := range cleanAttrs { ++ switch elementName { ++ case "a", "area", "link": ++ if htmlAttr.Key == "href" { ++ if u, ok := p.validURL(htmlAttr.Val); ok { ++ htmlAttr.Val = u ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ } ++ break ++ } ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ case "blockquote", "q": ++ if htmlAttr.Key == "cite" { ++ if u, ok := p.validURL(htmlAttr.Val); ok { ++ htmlAttr.Val = u ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ } ++ break ++ } ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ case "img", "script": ++ if htmlAttr.Key == "src" { ++ if u, ok := p.validURL(htmlAttr.Val); ok { ++ htmlAttr.Val = u ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ } ++ break ++ } ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ default: ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ } ++ } ++ cleanAttrs = tmpAttrs ++ } ++ ++ if (p.requireNoFollow || ++ p.requireNoFollowFullyQualifiedLinks || ++ p.addTargetBlankToFullyQualifiedLinks) && ++ len(cleanAttrs) > 0 { ++ ++ // Add rel="nofollow" if a "href" exists ++ switch elementName { ++ case "a", "area", "link": ++ var hrefFound bool ++ var externalLink bool ++ for _, htmlAttr := range cleanAttrs { ++ if htmlAttr.Key == "href" { ++ hrefFound = true ++ ++ u, err := url.Parse(htmlAttr.Val) ++ if err != nil { ++ continue ++ } ++ if u.Host != "" { ++ externalLink = true ++ } ++ ++ continue ++ } ++ } ++ ++ if hrefFound { ++ var ( ++ noFollowFound bool ++ targetBlankFound bool ++ ) ++ ++ addNoFollow := (p.requireNoFollow || ++ externalLink && p.requireNoFollowFullyQualifiedLinks) ++ ++ addTargetBlank := (externalLink && ++ p.addTargetBlankToFullyQualifiedLinks) ++ ++ tmpAttrs := []html.Attribute{} ++ for _, htmlAttr := range cleanAttrs { ++ ++ var appended bool ++ if htmlAttr.Key == "rel" && addNoFollow { ++ ++ if strings.Contains(htmlAttr.Val, "nofollow") { ++ noFollowFound = true ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ appended = true ++ } else { ++ htmlAttr.Val += " nofollow" ++ noFollowFound = true ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ appended = true ++ } ++ } ++ ++ if elementName == "a" && htmlAttr.Key == "target" { ++ if htmlAttr.Val == "_blank" { ++ targetBlankFound = true ++ } ++ if addTargetBlank && !targetBlankFound { ++ htmlAttr.Val = "_blank" ++ targetBlankFound = true ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ appended = true ++ } ++ } ++ ++ if !appended { ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ } ++ } ++ if noFollowFound || targetBlankFound { ++ cleanAttrs = tmpAttrs ++ } ++ ++ if addNoFollow && !noFollowFound { ++ rel := html.Attribute{} ++ rel.Key = "rel" ++ rel.Val = "nofollow" ++ cleanAttrs = append(cleanAttrs, rel) ++ } ++ ++ if elementName == "a" && addTargetBlank && !targetBlankFound { ++ rel := html.Attribute{} ++ rel.Key = "target" ++ rel.Val = "_blank" ++ targetBlankFound = true ++ cleanAttrs = append(cleanAttrs, rel) ++ } ++ ++ if targetBlankFound { ++ // target="_blank" has a security risk that allows the ++ // opened window/tab to issue JavaScript calls against ++ // window.opener, which in effect allow the destination ++ // of the link to control the source: ++ // https://dev.to/ben/the-targetblank-vulnerability-by-example ++ // ++ // To mitigate this risk, we need to add a specific rel ++ // attribute if it is not already present. ++ // rel="noopener" ++ // ++ // Unfortunately this is processing the rel twice (we ++ // already looked at it earlier ^^) as we cannot be sure ++ // of the ordering of the href and rel, and whether we ++ // have fully satisfied that we need to do this. This ++ // double processing only happens *if* target="_blank" ++ // is true. ++ var noOpenerAdded bool ++ tmpAttrs := []html.Attribute{} ++ for _, htmlAttr := range cleanAttrs { ++ var appended bool ++ if htmlAttr.Key == "rel" { ++ if strings.Contains(htmlAttr.Val, "noopener") { ++ noOpenerAdded = true ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ } else { ++ htmlAttr.Val += " noopener" ++ noOpenerAdded = true ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ } ++ ++ appended = true ++ } ++ if !appended { ++ tmpAttrs = append(tmpAttrs, htmlAttr) ++ } ++ } ++ if noOpenerAdded { ++ cleanAttrs = tmpAttrs ++ } else { ++ // rel attr was not found, or else noopener would ++ // have been added already ++ rel := html.Attribute{} ++ rel.Key = "rel" ++ rel.Val = "noopener" ++ cleanAttrs = append(cleanAttrs, rel) ++ } ++ ++ } ++ } ++ default: ++ } ++ } ++ } ++ ++ return cleanAttrs ++} ++ ++func (p *Policy) allowNoAttrs(elementName string) bool { ++ _, ok := p.setOfElementsAllowedWithoutAttrs[elementName] ++ return ok ++} ++ ++func (p *Policy) validURL(rawurl string) (string, bool) { ++ if p.requireParseableURLs { ++ // URLs are valid if when space is trimmed the URL is valid ++ rawurl = strings.TrimSpace(rawurl) ++ ++ // URLs cannot contain whitespace, unless it is a data-uri ++ if (strings.Contains(rawurl, " ") || ++ strings.Contains(rawurl, "\t") || ++ strings.Contains(rawurl, "\n")) && ++ !strings.HasPrefix(rawurl, `data:`) { ++ return "", false ++ } ++ ++ // URLs are valid if they parse ++ u, err := url.Parse(rawurl) ++ if err != nil { ++ return "", false ++ } ++ ++ if u.Scheme != "" { ++ ++ urlPolicy, ok := p.allowURLSchemes[u.Scheme] ++ if !ok { ++ return "", false ++ ++ } ++ ++ if urlPolicy == nil || urlPolicy(u) == true { ++ return u.String(), true ++ } ++ ++ return "", false ++ } ++ ++ if p.allowRelativeURLs { ++ if u.String() != "" { ++ return u.String(), true ++ } ++ } ++ ++ return "", false ++ } ++ ++ return rawurl, true ++} ++ ++func linkable(elementName string) bool { ++ switch elementName { ++ case "a", "area", "blockquote", "img", "link", "script": ++ return true ++ default: ++ return false ++ } ++} ++ ++func isDataAttribute(val string) bool { ++ if !dataAttribute.MatchString(val) { ++ return false ++ } ++ rest := strings.Split(val, "data-") ++ if len(rest) == 1 { ++ return false ++ } ++ // data-xml* is invalid. ++ if dataAttributeXMLPrefix.MatchString(rest[1]) { ++ return false ++ } ++ // no uppercase or semi-colons allowed. ++ if dataAttributeInvalidChars.MatchString(rest[1]) { ++ return false ++ } ++ return true ++} +diff --git a/vendor/modules.txt b/vendor/modules.txt +index 0bae0d5d..ff6a5d78 100644 +--- a/vendor/modules.txt ++++ b/vendor/modules.txt +@@ -49,6 +49,8 @@ github.com/lib/pq/oid + github.com/lib/pq/scram + # github.com/mb0/diff v0.0.0-20131118162322-d8d9a906c24d + github.com/mb0/diff ++# github.com/microcosm-cc/bluemonday v1.0.2 ++github.com/microcosm-cc/bluemonday + # github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d + github.com/nu7hatch/gouuid + # github.com/pkg/errors v0.8.0 diff --git a/pkgs/servers/echoip/default.nix b/pkgs/servers/echoip/default.nix index a8f9ad8a91261..18952d01c91db 100644 --- a/pkgs/servers/echoip/default.nix +++ b/pkgs/servers/echoip/default.nix @@ -11,7 +11,7 @@ buildGoModule { sha256 = "17gkh1qfxasvxy25lmjdwk5fsjkcp7lmw9si3xzf01m7qnj5zi4b"; }; - modSha256 = "025p891klwpid5fw4z39fimgfkwgkcwqpn5276hflzdp1hfv35ly"; + vendorSha256 = "0vvs717pl5gzggxpbn2vkyxmpiw5zjdfnpbh8i81xidbqvlnm22h"; outputs = [ "out" "index" ]; @@ -25,4 +25,4 @@ buildGoModule { license = licenses.bsd3; maintainers = with maintainers; [ rvolosatovs ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/gobetween/default.nix b/pkgs/servers/gobetween/default.nix index ff59ad53ed1ce..2b474d818ad2a 100644 --- a/pkgs/servers/gobetween/default.nix +++ b/pkgs/servers/gobetween/default.nix @@ -1,4 +1,4 @@ -{ buildGoModule, fetchFromGitHub, lib, enableStatic ? false }: +{ rsync, buildGoModule, fetchFromGitHub, lib, runCommand, enableStatic ? false }: buildGoModule rec { pname = "gobetween"; @@ -10,14 +10,30 @@ buildGoModule rec { rev = version; sha256 = "f01593509ccece063acd47002c4fc52261fbbbcdbf14b088d813b7d8e38fcca8"; }; + patches = [ ./gomod.patch ]; - modSha256 = - "dd91838d20c99c73447590e43edd13c87755276f17ef3e53f24c5df3d0908f78"; + deleteVendor = true; buildPhase = '' - make build${lib.optionalString enableStatic "-static"} + make -e build${lib.optionalString enableStatic "-static"} ''; + lxd = fetchFromGitHub { + owner = "lxc"; + repo = "lxd"; + rev = "41efd98813f3b42f1752ff6c2c7569a054924623"; + sha256 = "02vnvjjkzl7b0i2cn03f1lb3jgj5rd3wdkii4pqi9bvmhzszg0l2"; + }; + + overrideModAttrs = (_: { + postBuild = '' + rm -r vendor/github.com/lxc/lxd + cp -r --reflink=auto ${lxd} vendor/github.com/lxc/lxd + ''; + }); + + vendorSha256 = "1pd0zrjwpw6yv2s86a818yy2ma2fkazd3sb2h6zfp9mvyixgxgri"; + installPhase = '' mkdir -p $out/bin cp bin/gobetween $out/bin diff --git a/pkgs/servers/gobetween/gomod.patch b/pkgs/servers/gobetween/gomod.patch new file mode 100644 index 0000000000000..98181e3fe794b --- /dev/null +++ b/pkgs/servers/gobetween/gomod.patch @@ -0,0 +1,21 @@ +diff --git a/go.mod b/go.mod +index 536631a..f91e862 100644 +--- a/go.mod ++++ b/go.mod +@@ -7,7 +7,7 @@ require ( + github.com/burntsushi/toml v0.3.1 + github.com/elgs/gojq v0.0.0-20160421194050-81fa9a608a13 + github.com/elgs/gosplitargs v0.0.0-20161028071935-a491c5eeb3c8 // indirect +- github.com/flosch/pongo2 v0.0.0-20181225140029-79872a7b2769 // indirect ++ github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4 // indirect + github.com/fsouza/go-dockerclient v1.3.6 + github.com/gin-contrib/cors v0.0.0-20190301062745-f9e10995c85a + github.com/gin-gonic/gin v1.3.0 +@@ -20,7 +20,6 @@ require ( + github.com/juju/go4 v0.0.0-20160222163258-40d72ab9641a // indirect + github.com/juju/persistent-cookiejar v0.0.0-20171026135701-d5e5a8405ef9 // indirect + github.com/juju/schema v0.0.0-20181210140654-64a6158e9071 // indirect +- github.com/juju/utils v0.0.0-20180820210520-bf9cc5bdd62d // indirect + github.com/juju/webbrowser v0.0.0-20180907093207-efb9432b2bcb // indirect + github.com/julienschmidt/httprouter v1.2.0 // indirect + github.com/lxc/lxd v0.0.0-20190314233831-41efd98813f3 diff --git a/pkgs/servers/gortr/default.nix b/pkgs/servers/gortr/default.nix index 35c6e1452437a..3b9ed15a849c5 100644 --- a/pkgs/servers/gortr/default.nix +++ b/pkgs/servers/gortr/default.nix @@ -10,7 +10,7 @@ buildGoModule rec { rev = "v${version}"; sha256 = "03wxlras2akk2ig8sxzs89nvbc6zr2kbcmjlqldjdfhs1rcg82ra"; }; - modSha256 = "157dpalfz3z1s3mxq63xy6lrkwzyy9xzmvn7wsxkwznjq4djv1a1"; + vendorSha256 = "1nwrzbpqycr4ixk8a90pgaxcwakv5nlfnql6hmcc518qrva198wp"; meta = with lib; { description = "The RPKI-to-Router server used at Cloudflare"; @@ -19,4 +19,4 @@ buildGoModule rec { maintainers = with maintainers; [ petabyteboy ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/gotify/default.nix b/pkgs/servers/gotify/default.nix index 8c358154e8c93..47f5925edfcd7 100644 --- a/pkgs/servers/gotify/default.nix +++ b/pkgs/servers/gotify/default.nix @@ -21,7 +21,7 @@ buildGoModule rec { sha256 = import ./source-sha.nix; }; - modSha256 = import ./mod-sha.nix; + vendorSha256 = "1ha0zgz1n07sd3if6823fi83j7yajysjdzfbwqk9rpsi6zv3cfh3"; postPatch = '' substituteInPlace app.go \ diff --git a/pkgs/servers/gotify/mod-sha.nix b/pkgs/servers/gotify/mod-sha.nix deleted file mode 100644 index f115be8e1a735..0000000000000 --- a/pkgs/servers/gotify/mod-sha.nix +++ /dev/null @@ -1 +0,0 @@ -"0zpdbj8a0akhzi1ian8zs6y7ymhlpcfy13q64xdlwc5w0286554r" \ No newline at end of file diff --git a/pkgs/servers/hasura/cli.nix b/pkgs/servers/hasura/cli.nix index f19ffe12f5d9f..a4d8d147fda63 100644 --- a/pkgs/servers/hasura/cli.nix +++ b/pkgs/servers/hasura/cli.nix @@ -10,7 +10,7 @@ buildGoModule rec { goPackagePath = "github.com/hasura/graphql-engine/cli"; subPackages = [ "cmd/hasura" ]; - modSha256 = "0bpb9r0n8n8c1p8sas3qanhvqw45rq8kygb4dmkfhj3d9vlgn6d2"; + vendorSha256 = "0a3mlkl00r680v8x3hy24ykggq5qm7k3101krlyfrb5y4karp75a"; buildFlagsArray = [''-ldflags= -X github.com/hasura/graphql-engine/cli/version.BuildVersion=${version} @@ -30,4 +30,4 @@ buildGoModule rec { inherit (hasura-graphql-engine.meta) license homepage maintainers; description = "Hasura GraphQL Engine CLI"; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/imgproxy/default.nix b/pkgs/servers/imgproxy/default.nix index 21caebec0f37e..9203f405a7538 100644 --- a/pkgs/servers/imgproxy/default.nix +++ b/pkgs/servers/imgproxy/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { rev = "v${version}"; }; - modSha256 = "02pj8ryis89dl4wjp2mvx6h5d0xdvskxdxiwarg7q0x23m9r7kpg"; + vendorSha256 = "069if1ifsmdn5hrwybiifhnq6xzmdccq85mzi9v98iii18pzfwqx"; nativeBuildInputs = [ pkg-config ]; @@ -27,4 +27,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ paluh ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/matterbridge/default.nix b/pkgs/servers/matterbridge/default.nix index 1f39278de6256..7f1868af4c357 100644 --- a/pkgs/servers/matterbridge/default.nix +++ b/pkgs/servers/matterbridge/default.nix @@ -5,7 +5,7 @@ buildGoModule rec { version = "1.17.1"; goPackagePath = "github.com/42wim/matterbridge"; - modSha256 = "1mqp8dlwa4p70iv9ksq3pxx5zbxdh56xyksvd98zk0vkrz4f1rij"; + vendorSha256 = null; src = fetchurl { url = "https://github.com/42wim/matterbridge/archive/v${version}.tar.gz"; @@ -19,4 +19,4 @@ buildGoModule rec { maintainers = with maintainers; [ ryantm ]; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/mautrix-whatsapp/default.nix b/pkgs/servers/mautrix-whatsapp/default.nix index c0d01855be012..dea3d7b1b238d 100644 --- a/pkgs/servers/mautrix-whatsapp/default.nix +++ b/pkgs/servers/mautrix-whatsapp/default.nix @@ -1,5 +1,13 @@ { stdenv, buildGoModule, fetchFromGitHub }: +let +webp = fetchFromGitHub { + owner = "chai2010"; + repo = "webp"; + rev = "19c584e49a98c31e2138c82fd0108435cd80d182"; + sha256 = "1bqf1ifsfw5dwvnc9vl3dhp775qv5hgl34219lvnja0bj6pq5zks"; +}; +in buildGoModule { pname = "mautrix-whatsapp-unstable"; version = "2020-04-21-1"; @@ -11,7 +19,14 @@ buildGoModule { sha256 = "1gayjyh0x0axc1xak38zkdhvx6fy8pwlniqsirqy2mwcgkkll9i5"; }; - modSha256 = "1pddabyyz6q1snx9j7yv7dchasqa1y8nbpb5zrwmrpnwpns8kxl7"; + vendorSha256 = "0j397zyjs7v5q2jjd3l0wz4lh1fh45whgxjp7cwgc332ch9j2010"; + + overrideModAttrs = (_: { + postBuild = '' + rm -r vendor/github.com/chai2010/webp + cp -r --reflink=auto ${webp} vendor/github.com/chai2010/webp + ''; + }); meta = with stdenv.lib; { homepage = "https://github.com/tulir/mautrix-whatsapp"; @@ -19,4 +34,4 @@ buildGoModule { license = licenses.agpl3; maintainers = with maintainers; [ vskilet ma27 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/minio/default.nix b/pkgs/servers/minio/default.nix index 8b30d7dbbc88e..9f9796b3a5e6a 100644 --- a/pkgs/servers/minio/default.nix +++ b/pkgs/servers/minio/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0yyq5j82rcl8yhn2jg8sjfxii6kzbrbmxvb05yiwv7p0q42ag5rn"; }; - modSha256 = "1g5vwllxpiy4qlfhn3v5k6sn4g4qpbv0hpg32y1vi2q342lag116"; + vendorSha256 = "15yx5nkyf424v42glg3cx0gkqckdfv1xn25570s9cwf8zid0zlxd"; subPackages = [ "." ]; @@ -28,4 +28,4 @@ buildGoModule rec { platforms = platforms.unix; license = licenses.asl20; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/monitoring/do-agent/default.nix b/pkgs/servers/monitoring/do-agent/default.nix index b738e36cf89a1..1d6bb7198e5b4 100644 --- a/pkgs/servers/monitoring/do-agent/default.nix +++ b/pkgs/servers/monitoring/do-agent/default.nix @@ -16,7 +16,7 @@ buildGoModule rec { -X main.version=${version} ''; - modSha256 = "164bwqg996097db399j7lar6gj9xpshjdmyapvzg7zh655xlkf3d"; + vendorSha256 = null; meta = with lib; { description = "DigitalOcean droplet system metrics agent"; @@ -30,4 +30,4 @@ buildGoModule rec { maintainers = with maintainers; [ yvt ]; platforms = platforms.linux; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/monitoring/mtail/default.nix b/pkgs/servers/monitoring/mtail/default.nix index 64966e183feaf..d701a7ca001e5 100644 --- a/pkgs/servers/monitoring/mtail/default.nix +++ b/pkgs/servers/monitoring/mtail/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "04hzr0cw0dq7hmqvp1lhm5wl239yrxmcpsl25sqk74wy06cgrrqd"; }; - modSha256 = "0h3q1qd9a01wlfkk0yv74a4bk5nilpsppq522cv7kl8ysnrjh5yi"; + vendorSha256 = "1km3ldqz35lpkglp9n332vxr38xxfqyij1fi2qq0agyyydbvakj5"; subPackages = [ "cmd/mtail" ]; preBuild = '' @@ -27,4 +27,4 @@ buildGoModule rec { homepage = "https://github.com/google/mtail"; description = "Tool for extracting metrics from application logs"; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix b/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix index c8013e6bc15c7..43c63e24dfcb4 100644 --- a/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix @@ -11,7 +11,7 @@ buildGoModule rec { rev = "v${version}"; }; - modSha256 = "1ag1k0z35zkazaxj8hh2wxfj73xg63xdybfm1565il2vxs5986dh"; + vendorSha256 = "1dqpa180pbdi2gcmp991d4cry560mx5rm5l9x065s9n9gnd38hvl"; meta = with stdenv.lib; { inherit (src.meta) homepage; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ willibutz globin ma27 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix b/pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix index 12341eee911ed..0c357a768b554 100644 --- a/pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/mikrotik-exporter.nix @@ -11,7 +11,7 @@ buildGoModule rec { rev = "3b33400d24abcfdc07dc31c15ca5ba7b82de444f"; }; - modSha256 = "1cqjn6j3dfq51ssjx0qrajprlac1h0lb1r4af44lfpigzmrfyi07"; + vendorSha256 = "0i5x4d3ra0s41knmybbg8gnjxgraxkid6y3gfkjwa65xcbp7hr7q"; meta = with stdenv.lib; { inherit (src.meta) homepage; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.bsd3; maintainers = with maintainers; [ mmilata ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/monitoring/prometheus/varnish-exporter.nix b/pkgs/servers/monitoring/prometheus/varnish-exporter.nix index 03656470b92e6..640730e3ca00d 100644 --- a/pkgs/servers/monitoring/prometheus/varnish-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/varnish-exporter.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1viiiyvhpr7cnf8ykaaq4fzgg9xvn4hnlhv7cagy3jkjlmz60947"; }; - modSha256 = "1vb720axjziiqcba4bdi528r6mc97ci0pfsk0ny50isrkh0s3jzz"; + vendorSha256 = "1h9iz3sbz02hb8827hcssqlfg2ag3ymq38siffw9wzajslzhp9sx"; nativeBuildInputs = [ makeWrapper ]; @@ -28,4 +28,4 @@ buildGoModule rec { license = lib.licenses.mit; maintainers = with lib.maintainers; [ MostAwesomeDude willibutz ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/monitoring/sensu-go/default.nix b/pkgs/servers/monitoring/sensu-go/default.nix index cef5367159e17..d7a1296a7daae 100644 --- a/pkgs/servers/monitoring/sensu-go/default.nix +++ b/pkgs/servers/monitoring/sensu-go/default.nix @@ -18,7 +18,7 @@ let inherit subPackages postInstall; - modSha256 = "02h4cav6ivzs3z0qakwxzf5lfy6hzax5c0i2icp0qymqc2789npw"; + vendorSha256 = "03lkra5vf07zicd2aipvmkrda56ys5swwj6lq5hnp324ndajfcya"; buildFlagsArray = let versionPkg = "github.com/sensu/sensu-go/version"; @@ -66,4 +66,4 @@ in pname = "sensu-go-agent"; subPackages = [ "cmd/sensu-agent" ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/monitoring/telegraf/default.nix b/pkgs/servers/monitoring/telegraf/default.nix index ab94971aa3cb4..b12ad4dd46715 100644 --- a/pkgs/servers/monitoring/telegraf/default.nix +++ b/pkgs/servers/monitoring/telegraf/default.nix @@ -17,7 +17,7 @@ buildGoModule rec { sha256 = "17lzz0f9vzyfwr3kgwg6i6361hqzq54jnaaw9rdc132xppdx03nr"; }; - modSha256 = "1q7il1x1pfyz15z23cs0kk7zyacn6b3y28b1q52bqi30l1x8bdbp"; + vendorSha256 = "05nj99hl5f5l0a2aswy19wmbm94hd1h03r227gmn419dkzc5hpah"; buildFlagsArray = [ ''-ldflags= -w -s -X main.version=${version} @@ -31,4 +31,4 @@ buildGoModule rec { homepage = "https://www.influxdata.com/time-series-platform/telegraf/"; maintainers = with maintainers; [ mic92 roblabla foxit64 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/monitoring/thanos/default.nix b/pkgs/servers/monitoring/thanos/default.nix index a6122b3175351..227085184298c 100644 --- a/pkgs/servers/monitoring/thanos/default.nix +++ b/pkgs/servers/monitoring/thanos/default.nix @@ -10,7 +10,7 @@ buildGoModule rec { sha256 = "10xscm9h2krha66v96v2q85fynnxfizjcc47h7yz4xhjwvb5dgz2"; }; - modSha256 = "0c8gc4qzdazxxnabfms63df8vlf2iy6iy0jrm710x76m4vm6mrbj"; + vendorSha256 = "126rghnyjpykvjg9sr4kwpskc13qqafxgfn9ffykwc4jjz8vc07q"; subPackages = "cmd/thanos"; @@ -30,4 +30,4 @@ buildGoModule rec { maintainers = with maintainers; [ basvandijk ]; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/nosql/influxdb/default.nix b/pkgs/servers/nosql/influxdb/default.nix index aa04bcaed9f82..4bddd77248a6d 100644 --- a/pkgs/servers/nosql/influxdb/default.nix +++ b/pkgs/servers/nosql/influxdb/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "111n36xifmd644xp80imqxx61nlap6fdwx1di2qphlqb43z99jrq"; }; - modSha256 = "07v4ijblvl2zq049fdz5vdfhk6d3phrsajhnhwl46x02dbdzgj13"; + vendorSha256 = "097x3z1fhdl5s3ni2qzbqxqr60l6lqcrbikq20fs052dp287q0sp"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; @@ -23,4 +23,4 @@ buildGoModule rec { homepage = "https://influxdata.com/"; maintainers = with maintainers; [ offline zimbatm ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/sql/dolt/default.nix b/pkgs/servers/sql/dolt/default.nix index 4015e2097ee0c..2af0f149e7d8d 100644 --- a/pkgs/servers/sql/dolt/default.nix +++ b/pkgs/servers/sql/dolt/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { modRoot = "./go"; subPackages = [ "cmd/dolt" "cmd/git-dolt" "cmd/git-dolt-smudge" ]; - modSha256 = "1fx830dif9cq2rvigdbqbc3vmmq01ywj9b095adbrwddvay8m8si"; + vendorSha256 = "1kjh252p91yxq5mi0igamkwlsr50lij24wsp2ilgz6ksv3ijzfr1"; meta = with lib; { description = "Relational database with version control and CLI a-la Git."; @@ -22,4 +22,4 @@ buildGoModule rec { maintainers = with maintainers; [ danbst ]; platforms = platforms.linux ++ platforms.darwin; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/tailscale/default.nix b/pkgs/servers/tailscale/default.nix index 24a8aa66151a8..9f0a8de4ef680 100644 --- a/pkgs/servers/tailscale/default.nix +++ b/pkgs/servers/tailscale/default.nix @@ -18,7 +18,14 @@ buildGoModule rec { CGO_ENABLED = 0; goPackagePath = "tailscale.com"; - modSha256 = "1xgdhbck3pkix10lfshzdszrv6d3p0hbx8jdjvswz7jjd0vzm4x1"; + overrideModAttrs = (_: { + preBuild = '' + rm ipn/e2e_test.go + rm control/controlclient/auto_test.go + rm control/controlclient/direct_test.go + ''; + }); + vendorSha256 = "1v90lbwgrc2m4kvpglf2jykrm8rry3pbhqqbc3mcysrzmqlw84yl"; subPackages = [ "cmd/tailscale" "cmd/tailscaled" ]; postInstall = '' @@ -34,4 +41,4 @@ buildGoModule rec { license = licenses.bsd3; maintainers = with maintainers; [ danderson mbaillie ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/traefik/default.nix b/pkgs/servers/traefik/default.nix index 40b85fc949e1f..db31006192743 100644 --- a/pkgs/servers/traefik/default.nix +++ b/pkgs/servers/traefik/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0byi2h1lma95l77sdj8jkidmwb12ryjqwxa0zz6vwjg07p5ps3k4"; }; - modSha256 = "17imp24abfgh75g8161daknzqzk2m19q9d1mij6487046lk75hqz"; + vendorSha256 = "0rbwp0cxqfv4v5sii6kavdj73a0q0l4fnvxincvyy698qzx716kf"; subPackages = [ "cmd/traefik" ]; nativeBuildInputs = [ go-bindata ]; @@ -34,4 +34,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ vdemeester ]; }; -} +} \ No newline at end of file diff --git a/pkgs/servers/web-apps/shiori/default.nix b/pkgs/servers/web-apps/shiori/default.nix index dd4cdc08287b6..dbea567b7e1e5 100644 --- a/pkgs/servers/web-apps/shiori/default.nix +++ b/pkgs/servers/web-apps/shiori/default.nix @@ -4,7 +4,7 @@ buildGoModule rec { pname = "shiori"; version = "1.5.0"; - modSha256 = "1z6q5lv0j433p8lc3nxlw1rds5x1kvs1vzl63jf3disxw7ppyai3"; + vendorSha256 = "1ik5faysc880kz7nymvbmjj006l1fsqfy76036szwzg314v78643"; src = fetchFromGitHub { owner = "go-shiori"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ minijackson ]; }; -} +} \ No newline at end of file diff --git a/pkgs/shells/elvish/default.nix b/pkgs/shells/elvish/default.nix index 4b9e4817ee8d8..2aa23cd063e87 100644 --- a/pkgs/shells/elvish/default.nix +++ b/pkgs/shells/elvish/default.nix @@ -18,7 +18,7 @@ buildGoModule rec { sha256 = "0lz9lf1swrn67kymcp2wh67lh3c0ifqm9035gpkd3zynlq3wzqfm"; }; - modSha256 = "13x4wbfj8049ygm3zbgzyr2bm4sq4x6xddrxx6shr8fydlcf1g8v"; + vendorSha256 = null; meta = with stdenv.lib; { description = "A friendly and expressive command shell"; @@ -36,4 +36,4 @@ buildGoModule rec { passthru = { shellPath = "/bin/elvish"; }; -} +} \ No newline at end of file diff --git a/pkgs/shells/zsh/antibody/default.nix b/pkgs/shells/zsh/antibody/default.nix index cc4726a3cb419..385fb97b9137d 100644 --- a/pkgs/shells/zsh/antibody/default.nix +++ b/pkgs/shells/zsh/antibody/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0m7c879b3f402av20jsybq2dhhckbknlvn2n1csp7xmcz4zcyn1n"; }; - modSha256 = "0yny1p8vll1wdqdlwyxf9m4kd5njdm7nq527blqqa680zf2k4h8b"; + vendorSha256 = "072kxr68p9f58w2q98fjcn4wzd5szy5l5sz8sh4ssapljvic2lam"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; @@ -21,4 +21,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ filalex77 worldofpeace ]; }; -} +} \ No newline at end of file diff --git a/pkgs/shells/zsh/zsh-history/default.nix b/pkgs/shells/zsh/zsh-history/default.nix index f839cf7cf2ed1..47f590a78f286 100644 --- a/pkgs/shells/zsh/zsh-history/default.nix +++ b/pkgs/shells/zsh/zsh-history/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; - modSha256 = "0f10b86gyn7m7lw43c8y1m30mdg0i092a319v3cb2qj05jb9vn42"; + vendorSha256 = "13rc1afds5xg30faqz35haha4kxg73b5nvjirbrkc6kna0vhb54z"; goPackagePath = "github.com/b4b4r07/history"; postInstall = '' @@ -33,4 +33,4 @@ buildGoModule rec { passthru.tests = { zsh-history-shell-integration = nixosTests.zsh-history; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/admin/aws-vault/default.nix b/pkgs/tools/admin/aws-vault/default.nix index 48a1de61cd80e..3163ab4dfcd4c 100644 --- a/pkgs/tools/admin/aws-vault/default.nix +++ b/pkgs/tools/admin/aws-vault/default.nix @@ -10,7 +10,7 @@ buildGoModule rec { sha256 = "04dyibcaijv5011laycf39m4gvprvvsn5zkxslyih1kqd170w3wg"; }; - modSha256 = "1d3hjfmfmlpw2scfyn597zkzz864w97p0wrsxjp49m9mi0pgmhq9"; + vendorSha256 = "0jlraq480llamns6yw8yjkzxsndyqiyzy120djni8sw5h0bz65j7"; subPackages = [ "." ]; # set the version. see: aws-vault's Makefile @@ -26,4 +26,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ zimbatm ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/admin/awsweeper/default.nix b/pkgs/tools/admin/awsweeper/default.nix index fda773b48cd7c..372d287cbd2f5 100644 --- a/pkgs/tools/admin/awsweeper/default.nix +++ b/pkgs/tools/admin/awsweeper/default.nix @@ -1,9 +1,15 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchurl, fetchFromGitHub }: buildGoModule rec { pname = "awsweeper"; version = "0.7.0"; + # Requires go generate to be run with mockgen, but doesn't check in the results. + patches = fetchurl { + url = "https://raw.githubusercontent.com/c00w/patches/master/awskeeper.patch"; + sha256 = "0dz553ffxc37m2iwygrbhxf7pm91hxdriic8a1gjf8q3nyn13npl"; + }; + src = fetchFromGitHub { owner = "cloudetc"; repo = pname; @@ -11,7 +17,7 @@ buildGoModule rec { sha256 = "1ybrrpnp6rh7rcwihww43cvhfhzzyy51rdk1hwy9ljpkg37k4y28"; }; - modSha256 = "07zz6wf9cq3wylihi9fx0rd85iybnq5z5c9gqw1lhpvqcrad4491"; + vendorSha256 = "0hnpb1xp135z2qpn1b6xad59739hffhs8dfpr3n5drmrvajpn4xp"; meta = with lib; { description = "A tool to clean out your AWS account"; diff --git a/pkgs/tools/admin/berglas/default.nix b/pkgs/tools/admin/berglas/default.nix index c1c46da41b75c..ecafb13978237 100644 --- a/pkgs/tools/admin/berglas/default.nix +++ b/pkgs/tools/admin/berglas/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0y393g36h35zzqyf5b10j6qq2jhvz83j17cmasnv6wbyrb3vnn0n"; }; - modSha256 = "0m2bqx102lf6nihdjbl8a08xcwi80rawvh91j1cav0njm9w5vmmm"; + vendorSha256 = null; meta = with stdenv.lib; { description = "A tool for managing secrets on Google Cloud"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.asl20; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/admin/certigo/default.nix b/pkgs/tools/admin/certigo/default.nix index 5474cb254298f..86873d9051490 100644 --- a/pkgs/tools/admin/certigo/default.nix +++ b/pkgs/tools/admin/certigo/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0siwbxxzknmbsjy23d0lvh591ngabqhr2g8mip0siwa7c1y7ivv4"; }; - modSha256 = "1i5n5yh6nvv2i2nm60vqy1gngj8p5w6ma5fcwmp7bl4jxjrzbi83"; + vendorSha256 = "1l6ajfl04rfbssvijgd5jrppmqc5svfrswdx01x007lr8rvdfd94"; meta = with stdenv.lib; { description = "A utility to examine and validate certificates in a variety of formats"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = [ maintainers.marsam ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/admin/clair/default.nix b/pkgs/tools/admin/clair/default.nix index 3f4d00736ad94..2562dc45fa8f0 100644 --- a/pkgs/tools/admin/clair/default.nix +++ b/pkgs/tools/admin/clair/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "14dh9iv2g138rivvfk135m3l90kk6c1ln1iqxhbi7s99h1jixbqw"; }; - modSha256 = "0rgkrid58kji39nlmiii95r8shbzr6dwalj5m7qwxy5w1rcaljr5"; + vendorSha256 = "0x31n50vd8660z816as6kms5dkv87b0mhblccpkvd9cbvcv2n37a"; nativeBuildInputs = [ makeWrapper ]; @@ -26,4 +26,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ marsam ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/admin/eksctl/default.nix b/pkgs/tools/admin/eksctl/default.nix index 233538083e948..18fb37aa41c05 100644 --- a/pkgs/tools/admin/eksctl/default.nix +++ b/pkgs/tools/admin/eksctl/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0xlr7hsncih4nzydi6sphp7j7k82cbhmi7jb0sd954i8kzl3sc1q"; }; - modSha256 = "0iw5za1fc9hsbc3fhhj3l276064vfdjqsad9c3c54y7b9rjgcqrv"; + vendorSha256 = "14d9hl01z7ixp1wa8kp1zs0z1p3pvz6hkp49z582nqllpb2xjmkx"; subPackages = [ "cmd/eksctl" ]; diff --git a/pkgs/tools/admin/iamy/default.nix b/pkgs/tools/admin/iamy/default.nix index 96c49b58d0b04..8e79959ba3737 100644 --- a/pkgs/tools/admin/iamy/default.nix +++ b/pkgs/tools/admin/iamy/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { sha256 = "1fypc6yjnhlpk7zhb2lvah2ikh2zji9sll55rqjbr3i4j02h484z"; }; - modSha256 = "0akak573zvz3xg5d7vf0ch2mrmj1jkzcdc29v3kn43f7944c2wcl"; + vendorSha256 = "0c4g1zr0wl118g41hqri0vwvfin39yvgs214w3spw8ggjcj6bzph"; buildFlagsArray = [''-ldflags= -X main.Version=v${version} -s -w @@ -25,4 +25,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ suvash ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/admin/lego/default.nix b/pkgs/tools/admin/lego/default.nix index 05cab814ecfb3..025afe25e87a1 100644 --- a/pkgs/tools/admin/lego/default.nix +++ b/pkgs/tools/admin/lego/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { hash = "sha256-hjH1TBw6GHYNI9JSBOzdyEtJmp8NhlwNYydGZwsjAg0="; }; - modSha256 = "sha256-+PJRaDdZqVO6D9SXojlr8JXn++pL18HOHFdaiUEalw8="; + vendorSha256 = "14453iiya6algkympyvwm03qgjcwk79z8bbrij7qhnp52qfrbmrp"; subPackages = [ "cmd/lego" ]; buildFlagsArray = [ diff --git a/pkgs/tools/audio/mpd-mpris/default.nix b/pkgs/tools/audio/mpd-mpris/default.nix index 37766a9072194..3c736258cbb6e 100644 --- a/pkgs/tools/audio/mpd-mpris/default.nix +++ b/pkgs/tools/audio/mpd-mpris/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1cr5j2z2ynj1hwkjzi5amcg59vmgazsci41v6vpsj119g7psjmzm"; }; - modSha256 = "1a95kfy8w952269x4llbl0afyxr5fjkg30mxsn81zdh5wr8gabwh"; + vendorSha256 = "108yjymp64iqx1b2wqjbkmbm2w199wq46g7hrmqhcziv6f4aqljp"; subPackages = [ "cmd/${pname}" ]; @@ -29,5 +29,4 @@ buildGoModule rec { maintainers = with maintainers; [ doronbehar ]; platforms = platforms.linux; }; -} - +} \ No newline at end of file diff --git a/pkgs/tools/backup/wal-g/default.nix b/pkgs/tools/backup/wal-g/default.nix index ad67f7ce880d1..2f2541c41cbd0 100644 --- a/pkgs/tools/backup/wal-g/default.nix +++ b/pkgs/tools/backup/wal-g/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1hslhs9i4wib6c74gdq9yail958ff1y11pymjww2xr84wkwd9v7i"; }; - modSha256 = "0kwl5gwc5gc0cq2gldg13nvswp9wd90xiv1qb3g8yxcczywkpmrm"; + vendorSha256 = "0jjr33k27k6h27sa01ipz0aydch3i9klknqb3yq8f048zkb54gv8"; buildInputs = [ brotli ]; @@ -31,4 +31,4 @@ buildGoModule rec { description = "An archival restoration tool for PostgreSQL"; maintainers = [ stdenv.lib.maintainers.ocharles ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/3mux/default.nix b/pkgs/tools/misc/3mux/default.nix index 3371b79562374..81ca4d9462859 100644 --- a/pkgs/tools/misc/3mux/default.nix +++ b/pkgs/tools/misc/3mux/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "02ry066psvlqdyhimci7nskw4sfb70dw5z7ag7s7rz36gmx1vnmr"; }; - modSha256 = "1ag9lx8xcp2z9lrg404914zin45n8f4s08365yk71q5vyiwxjj3i"; + vendorSha256 = "1hjzpg3q4znvgzk0wbl8rq6cq877xxdsf950bcsks92cs8386847"; meta = with stdenv.lib; { description = "Terminal multiplexer inspired by i3"; @@ -21,4 +21,4 @@ buildGoModule rec { # TODO: fix modules build on darwin broken = stdenv.isDarwin; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/chezmoi/default.nix b/pkgs/tools/misc/chezmoi/default.nix index 96e33e0de2441..75b10bc32ca74 100644 --- a/pkgs/tools/misc/chezmoi/default.nix +++ b/pkgs/tools/misc/chezmoi/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1b8y0wq3myhvjdnwl0i4x85iil7i7kmsjajvbw1a47afm83jkbaw"; }; - modSha256 = "147bbhbcf81i6vyiv9q8abx5qw44fx3qw5v5f6zjnkfajdqlvbsx"; + vendorSha256 = "1za47n08iamhfl4ky928rixgadflmz86vnmnwbczd167bdndh5rq"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version} -X main.builtBy=nixpkgs" @@ -34,4 +34,4 @@ buildGoModule rec { maintainers = with maintainers; [ jhillyerd ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/clipman/default.nix b/pkgs/tools/misc/clipman/default.nix index 8d84adbddada0..5146e25da5011 100644 --- a/pkgs/tools/misc/clipman/default.nix +++ b/pkgs/tools/misc/clipman/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1lf5fbzplyc1mpdqgfwbrn8m5568vhjf48580fvvfgbhz6zcil8n"; }; - modSha256 = "1sim3x794kj3wdw0g432zbgh1cimdmmg1hjgynh9jgm3y8w9q7ij"; + vendorSha256 = "18jw4z0lcrh00yjr3qdkgvlrpfwqbsm0ncz7fp1h72pzkh41byv7"; nativeBuildInputs = [ makeWrapper ]; @@ -27,4 +27,4 @@ buildGoModule rec { description = "A simple clipboard manager for Wayland"; platforms = platforms.linux; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/docui/default.nix b/pkgs/tools/misc/docui/default.nix index 0329c1bc4a691..f3f89d0a667aa 100644 --- a/pkgs/tools/misc/docui/default.nix +++ b/pkgs/tools/misc/docui/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0jya0wdp8scjmsr44krdbbb8q4gplf44gsng1nyn12a6ldqzayxl"; }; - modSha256 = "1wyx05kk4f41mgvwnvfc9xk7vd3x96cbn5xb5ph7p443f70ydnak"; + vendorSha256 = "1ggdczvv03lj0g6cq26vrk1rba6pk0805n85w9hkbjx9c4r3j577"; meta = with stdenv.lib; { description = "TUI Client for Docker"; @@ -20,4 +20,4 @@ buildGoModule rec { platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ aethelz ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/fzf/default.nix b/pkgs/tools/misc/fzf/default.nix index d5c75a1e8a7a6..e875dd77b02b3 100644 --- a/pkgs/tools/misc/fzf/default.nix +++ b/pkgs/tools/misc/fzf/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0piz1dzczcw1nsff775zicvpm6iy0iw0v0ba7rj7i0xqv9ni1prw"; }; - modSha256 = "16bb0a9z49jqhh9lmq8rvl7x9vh79mi4ygkb9sm04g41g5z6ag1s"; + vendorSha256 = "1c2iz28hjrw9rig9a6r27wd8clycdhi8fgs3da91c63w4qi140zm"; outputs = [ "out" "man" ]; @@ -63,4 +63,4 @@ buildGoModule rec { maintainers = with maintainers; [ filalex77 ma27 ]; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/gotify-cli/default.nix b/pkgs/tools/misc/gotify-cli/default.nix index d4daa64facb3c..cd50271a2e60e 100644 --- a/pkgs/tools/misc/gotify-cli/default.nix +++ b/pkgs/tools/misc/gotify-cli/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "131gs6xzfggnrzq5jgyky23zvcmhx3q3hd17xvqxd02s2i9x1mg4"; }; - modSha256 = "1lrsg33zd7m24za2gv407hz02n3lmz9qljfk82whlj44hx7kim1z"; + vendorSha256 = "1lhhsf944gm1p6qxn05g2s3hdnra5dggj7pdrdq6qr6r2xg7f5qh"; postInstall = '' mv $out/bin/cli $out/bin/gotify @@ -23,4 +23,4 @@ buildGoModule rec { description = "A command line interface for pushing messages to gotify/server."; maintainers = with maintainers; [ ma27 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/kepubify/default.nix b/pkgs/tools/misc/kepubify/default.nix index 0a8f10fa85d5d..46d75e5086e8e 100644 --- a/pkgs/tools/misc/kepubify/default.nix +++ b/pkgs/tools/misc/kepubify/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "13d3fl53v9pqlm555ly1dm9vc58xwkyik0qmsg173q78ysy2p4q5"; }; - modSha256 = "0jz8v4rnwm5zbxxp49kv96wm4lack6prwyhcrqwsrm79dr9yjcxf"; + vendorSha256 = "04qpxl4j6v6w25i7r6wghd9xi7jzpy7dynhs9ni35wflq0rlczax"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; @@ -23,4 +23,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ zowoq ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/lf/default.nix b/pkgs/tools/misc/lf/default.nix index b1edabad6849d..8627003db5f9e 100644 --- a/pkgs/tools/misc/lf/default.nix +++ b/pkgs/tools/misc/lf/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0kl9yrgph1i0jbxhlg3k0411436w80xw1s8dzd7v7h2raygkb4is"; }; - modSha256 = "1c6c6qg8yrhdhqsnqj3jw3x2hi8vrhfm47cp9xlkfnjfrz3nk6jp"; + vendorSha256 = "1zb2z3c2w4gnq9cjczg1y7r7jg4mlrm2hsb12dqd9w8mh44rvr37"; nativeBuildInputs = [ installShellFiles ]; @@ -47,4 +47,4 @@ buildGoModule rec { platforms = platforms.unix; maintainers = with maintainers; [ primeos ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/libgen-cli/default.nix b/pkgs/tools/misc/libgen-cli/default.nix index c34e934fba48e..c92b4ad42e1b6 100644 --- a/pkgs/tools/misc/libgen-cli/default.nix +++ b/pkgs/tools/misc/libgen-cli/default.nix @@ -10,7 +10,7 @@ buildGoModule rec { sha256 = "1lfsnyzin2dqhwhz6phms6yipli88sqiw55ls18dfv7bvx30sqlp"; }; - modSha256 = "1k16zjb7p65g72hr9vsk38jhpsy1yclm7fjgq47qy6jwjd44w1bi"; + vendorSha256 = "1j45h8p13xfz0qy1nrddlx1xzbr5vqxd3q76hbb0v60636izfk0r"; subPackages = [ "." ]; @@ -27,4 +27,4 @@ buildGoModule rec { platforms = platforms.all; maintainers = with maintainers; [ zaninime ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/mutagen/default.nix b/pkgs/tools/misc/mutagen/default.nix index 8940fef2a0dd1..d1716d95caf21 100644 --- a/pkgs/tools/misc/mutagen/default.nix +++ b/pkgs/tools/misc/mutagen/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0ykzrxlllip4wvhd9rja5bcr2m72695fjj2q1scwn8ri6jcgfa19"; }; - modSha256 = "1r6b4y6civk75if6nljl66pgv5qm7x05qqby1anf7s7cz7d1rc3g"; + vendorSha256 = "0szs9yc49fyh55ra1wf8zj76kdah0x49d45cgivk3gqh2hl17j6l"; subPackages = [ "cmd/mutagen" "cmd/mutagen-agent" ]; @@ -22,4 +22,4 @@ buildGoModule rec { maintainers = [ maintainers.marsam ]; license = licenses.mit; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/neo-cowsay/default.nix b/pkgs/tools/misc/neo-cowsay/default.nix index a4fe58fb10755..e50960d063cf0 100644 --- a/pkgs/tools/misc/neo-cowsay/default.nix +++ b/pkgs/tools/misc/neo-cowsay/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0c6lygdqi26mczij41sn8ckc3g6qaakkkh3iasf10a4d07amxci1"; }; - modSha256 = "063ds35dzv8m4bjk7v1q3f6jwyp7j5jrkrhrl41z1c1mbzzkagkq"; + vendorSha256 = "1clar59x2dvn7yj4fbylby9nrzy8kdixi48hkbmrv8g5l8n0wdl2"; subPackages = [ "cmd/cowsay" "cmd/cowthink" ]; @@ -21,4 +21,4 @@ buildGoModule rec { license = with licenses; [artistic1 /* or */ gpl3]; maintainers = with maintainers; [ filalex77 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/pg_flame/default.nix b/pkgs/tools/misc/pg_flame/default.nix index fbeba0ff1bdcc..6fe2e814fa4d6 100644 --- a/pkgs/tools/misc/pg_flame/default.nix +++ b/pkgs/tools/misc/pg_flame/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1a03vxqnga83mhjp7pkl0klhkyfaby7ncbwm45xbl8c7s6zwhnw2"; }; - modSha256 = "0j7qpvji546z0cfjijdd66l0vsl0jmny6i1n9fsjqjgjpwg26naq"; + vendorSha256 = "1rkx20winh66y2m7i7q13jpr83044i2d1pfd5p5l5kkpsix5mra5"; meta = with lib; { description = "Flamegraph generator for Postgres EXPLAIN ANALYZE output"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ filalex77 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/pgcenter/default.nix b/pkgs/tools/misc/pgcenter/default.nix index fbd32cf876da9..edcc2cfc2bf26 100644 --- a/pkgs/tools/misc/pgcenter/default.nix +++ b/pkgs/tools/misc/pgcenter/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0p8ck4s5jj53nc638darhwbylcsslfmfz72bwy6wxby9iqi9kq6b"; }; - modSha256 = "0kassq52v07zmffs6l066g0d3kfv6wmrh9g5cgk79bmyq13clqjj"; + vendorSha256 = "1mzvpr12qh9668iz97p62zl4zhlrcyfgwr4a9zg9irj585pkb5x2"; meta = with stdenv.lib; { homepage = "https://pgcenter.org/"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.bsd3; maintainers = [ maintainers.marsam ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/pgmetrics/default.nix b/pkgs/tools/misc/pgmetrics/default.nix index 632ba452ff975..c78aa6a531567 100644 --- a/pkgs/tools/misc/pgmetrics/default.nix +++ b/pkgs/tools/misc/pgmetrics/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0f7pjagr3zcqmbhmk446j6n7nanyhvyq4rn68f5wljl9g68ni7sj"; }; - modSha256 = "13a969yki47gw4b3mwhsgl0x53xylmflsykcs63f8pmigckw7jac"; + vendorSha256 = "16x33fmh4q993rw0jr65337yimska4fwgyyw3kmq84q0x28a3zg5"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; @@ -21,4 +21,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = [ maintainers.marsam ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/pistol/default.nix b/pkgs/tools/misc/pistol/default.nix index 1a244cd410393..eeb392606edd5 100644 --- a/pkgs/tools/misc/pistol/default.nix +++ b/pkgs/tools/misc/pistol/default.nix @@ -15,8 +15,7 @@ buildGoModule rec { sha256 = "1d9c1bhidh781dis4427wramfrla4avqw9y2bmpjp81cqq3nc27d"; }; - modSha256 = "0r062nka72ah2nb2gf8dfrrj4sxadkykcqjzkp4c9vwk93mhw41k"; - buildFlagsArray = [ "-ldflags=-s -w -X main.Version=${version}" ]; + vendorSha256 = "1f780vhxw0brvnr8hhah4sf6ms8spar29rqmy1kcqf9m75n94g56"; subPackages = [ "cmd/pistol" ]; @@ -30,4 +29,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ doronbehar ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/powerline-go/default.nix b/pkgs/tools/misc/powerline-go/default.nix index 077116767c3b5..33ab2bbc7297a 100644 --- a/pkgs/tools/misc/powerline-go/default.nix +++ b/pkgs/tools/misc/powerline-go/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "135j18d53nhg6adjd2hax067c5f1py9fyprzfcr3plsxnaki2hrx"; }; - modSha256 = "0mz1qrwar9cgrhrgw4z3gwhjj62bnfnn59ji31zkyvwlc1mqh9an"; + vendorSha256 = "0dkgp9vlb76la0j439w0rb548qg5v8648zryk3rqgfhd4qywlk11"; meta = with stdenv.lib; { description = "A Powerline like prompt for Bash, ZSH and Fish"; @@ -19,4 +19,4 @@ buildGoModule rec { platforms = platforms.unix; maintainers = with maintainers; [ sifmelcara ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/up/default.nix b/pkgs/tools/misc/up/default.nix index 1e3378305d996..f0f9cf4cee85c 100644 --- a/pkgs/tools/misc/up/default.nix +++ b/pkgs/tools/misc/up/default.nix @@ -4,6 +4,8 @@ buildGoModule rec { pname = "up"; version = "0.3.2"; + patches = [ ./gomod.patch ]; + src = fetchFromGitHub { owner = "akavel"; repo = "up"; @@ -11,7 +13,7 @@ buildGoModule rec { sha256 = "1psixyymk98z52yy92lwb75yfins45dw6rif9cxwd7yiascwg2if"; }; - modSha256 = "0nfs190rzabphhhyacypz3ic5c4ajlqpx9jiiincs0vxfkmfwnjd"; + vendorSha256 = "1h3w4i7dyh6yagqmdclvflfq6fx0z880jdnpf28assv7fxd9rjsx"; meta = with lib; { description = "Ultimate Plumber is a tool for writing Linux pipes with instant live preview"; @@ -19,4 +21,4 @@ buildGoModule rec { maintainers = with maintainers; [ ma27 ]; license = licenses.asl20; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/misc/up/gomod.patch b/pkgs/tools/misc/up/gomod.patch new file mode 100644 index 0000000000000..f894f14d21f13 --- /dev/null +++ b/pkgs/tools/misc/up/gomod.patch @@ -0,0 +1,23 @@ +diff --git a/go.mod b/go.mod +index ecbfe90..56a1409 100644 +--- a/go.mod ++++ b/go.mod +@@ -1,11 +1,14 @@ + module github.com/akavel/up + ++go 1.14 ++ + require ( +- github.com/gdamore/encoding v0.0.0-20151215212835-b23993cbb635 ++ github.com/gdamore/encoding v0.0.0-20151215212835-b23993cbb635 // indirect + github.com/gdamore/tcell v0.0.0-20180924055237-493f3b46b3c2 +- github.com/lucasb-eyer/go-colorful v0.0.0-20170903184257-231272389856 ++ github.com/lucasb-eyer/go-colorful v0.0.0-20170903184257-231272389856 // indirect + github.com/mattn/go-isatty v0.0.3 +- github.com/mattn/go-runewidth v0.0.2 ++ github.com/mattn/go-runewidth v0.0.2 // indirect + github.com/spf13/pflag v1.0.3 +- golang.org/x/text v0.0.0-20171214130843-f21a4dfb5e38 ++ golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 // indirect ++ golang.org/x/text v0.0.0-20171214130843-f21a4dfb5e38 // indirect + ) diff --git a/pkgs/tools/networking/amass/default.nix b/pkgs/tools/networking/amass/default.nix index 116b0b2530625..1a2cf50265154 100644 --- a/pkgs/tools/networking/amass/default.nix +++ b/pkgs/tools/networking/amass/default.nix @@ -14,7 +14,7 @@ buildGoModule rec { sha256 = "05rh61dx4f9kv5p8sahhwwiyivwq438fl30j9d97i4sagvb5jvvm"; }; - modSha256 = "1k7yd2lh6hwz3qm6ywrlr1qw0asqwdgrpj594v1gvav426yqyr6s"; + vendorSha256 = "1f8za3z5pv1pznbd91fk5j4y8qg93qk5zvnchjl7inyirciawdf6"; outputs = [ "out" "wordlists" ]; diff --git a/pkgs/tools/networking/cassowary/default.nix b/pkgs/tools/networking/cassowary/default.nix index 6156f43b04b8d..be1df3394396f 100644 --- a/pkgs/tools/networking/cassowary/default.nix +++ b/pkgs/tools/networking/cassowary/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0p5vcs25h5nj36dm9yjmdjymcq0zldm3zlqfppxcjx862h48k8zj"; }; - modSha256 = "1iylnnmj5slji89pkb3shp4xqar1zbpl7bzwddbzpp8y52fmsv1c"; + vendorSha256 = "1m5jaqf5jrib415k0i7w6rf5bjjwfn572wk94jwfpwjcbbvh8fck"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; @@ -22,4 +22,4 @@ buildGoModule rec { maintainers = with maintainers; [ hugoreeves ]; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/clash/default.nix b/pkgs/tools/networking/clash/default.nix index f9c1ee4bc3157..af21e9d4fef59 100644 --- a/pkgs/tools/networking/clash/default.nix +++ b/pkgs/tools/networking/clash/default.nix @@ -12,7 +12,7 @@ buildGoModule rec { }; goPackagePath = "github.com/Dreamacro/clash"; - modSha256 = "113ynl1f01ihmbc376rb421rrjlxxbc8p9fhxrvpxcsm10rjky8w"; + vendorSha256 = "0nh3cn31p7yhnhjzqp84dnhzy3hag253bjp70w8q03lw7mkhdgz3"; buildFlagsArray = [ "-ldflags=" @@ -26,4 +26,4 @@ buildGoModule rec { maintainers = with maintainers; [ contrun filalex77 ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/corerad/default.nix b/pkgs/tools/networking/corerad/default.nix index 2fb2cb79ff48d..eef345c8db656 100644 --- a/pkgs/tools/networking/corerad/default.nix +++ b/pkgs/tools/networking/corerad/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1r9kvz1ylrnfc7y5c4knqhx6xngh1p8j1axb8bd7h7p51c4i7jz2"; }; - modSha256 = "00xisa4l90f0digb1jfd2w616r080m7yp01y1rb83r8k147z5d2v"; + vendorSha256 = "0ncwf197dx6mqzg69mnyp0iyad585izmydm0yj8ikd0y8ngpx7a3"; buildFlagsArray = '' -ldflags= @@ -19,6 +19,8 @@ buildGoModule rec { -X github.com/mdlayher/corerad/internal/build.linkVersion=v${version} ''; + deleteVendor = true; + meta = with stdenv.lib; { homepage = "https://github.com/mdlayher/corerad"; description = "CoreRAD extensible and observable IPv6 NDP RA daemon"; diff --git a/pkgs/tools/networking/croc/default.nix b/pkgs/tools/networking/croc/default.nix index a0ee380313901..ba31e13c89267 100644 --- a/pkgs/tools/networking/croc/default.nix +++ b/pkgs/tools/networking/croc/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0kwpn1nv93f8swzc70j8srddqz7qb33pxc9nhqrd92jhcl4cc7iv"; }; - modSha256 = "1wcnf3sd4hkfm38q2z03ixys1hbscay5rsac49ng4kabqjh7rxhg"; + vendorSha256 = "1vl5yz3z5z30rxnnxy74g2m5025vbisqyv31nc21kxdfrdqrwp6c"; subPackages = [ "." ]; @@ -34,4 +34,4 @@ buildGoModule rec { - Does not require a server or port-forwarding ''; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/curlie/default.nix b/pkgs/tools/networking/curlie/default.nix index 179181fc49c1c..cb1cf8d97faf7 100644 --- a/pkgs/tools/networking/curlie/default.nix +++ b/pkgs/tools/networking/curlie/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "09v8alrbw6qva3q3bcqxnyjm7svagfxqvhdff7cqf5pbmkxnhln9"; }; - modSha256 = "18nwq99vv3nbdwfilfn8v64mn58jviwybi93li0lcg7779nxab3d"; + vendorSha256 = "1mxgf004czf65a2mv99gfp27g98xhllmfcz4ynfv66nfkbfz6a8n"; meta = with lib; { 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 { maintainers = with maintainers; [ ma27 ]; license = licenses.mit; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/dnsproxy/default.nix b/pkgs/tools/networking/dnsproxy/default.nix index 3877e6f0e1acf..a2b4f40f5a27b 100644 --- a/pkgs/tools/networking/dnsproxy/default.nix +++ b/pkgs/tools/networking/dnsproxy/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0nsj75aw5dym1pzn18p6fzh17vcryz1xs4xly6ga79dkpyijr9j8"; }; - modSha256 = "1m8565hkn981b6xld8jyrbxay48ww8lzr94kgakx0rg5548kd7v5"; + vendorSha256 = null; meta = with stdenv.lib; { description = "Simple DNS proxy with DoH, DoT, and DNSCrypt support"; @@ -20,4 +20,4 @@ buildGoModule rec { maintainers = with maintainers; [ contrun ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/frp/default.nix b/pkgs/tools/networking/frp/default.nix index 438740600c7b5..588f8a8c1cbfc 100644 --- a/pkgs/tools/networking/frp/default.nix +++ b/pkgs/tools/networking/frp/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1z914p20n3i1bf4hx5iq2fylx1s49knb70cbg53ji2n7nrm1q33r"; }; - modSha256 = "1v90w5grc0vjpcp0m56d73zi0qnbswgz1rcvcwrjfa3rwqhigbal"; + vendorSha256 = "0pi661mb5vwj16wwxnyx9b0ic7gzby6qfs3y4w00agn6sn5nahx2"; subPackages = [ "cmd/frpc" "cmd/frps" ]; @@ -28,4 +28,4 @@ buildGoModule rec { maintainers = with maintainers; [ filalex77 ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/grpcui/default.nix b/pkgs/tools/networking/grpcui/default.nix index 58e698ed70811..6bae95298fe2e 100644 --- a/pkgs/tools/networking/grpcui/default.nix +++ b/pkgs/tools/networking/grpcui/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0dcah6bamjqyp9354qrd1cykdr5k5l93hh7qcy5b4nkag9531gl0"; }; - modSha256 = "1yq8484cjxad72nqsrim3zppr8hmn7dc6f8rgkw8fg952lqy5jjb"; + vendorSha256 = "0m9nn8x0ji0n9v3d5w5z3grwv0zh8ijvh92jqjpcfv4bcjr5vsjr"; meta = with lib; { description = "An interactive web UI for gRPC, along the lines of postman"; @@ -20,4 +20,4 @@ buildGoModule rec { maintainers = with maintainers; [ pradyuman ]; platforms = platforms.linux ++ platforms.darwin; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/hey/default.nix b/pkgs/tools/networking/hey/default.nix index d65d5c9e32355..8ed6ecbbf26d7 100644 --- a/pkgs/tools/networking/hey/default.nix +++ b/pkgs/tools/networking/hey/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "06w5hf0np0ayvjnfy8zgy605yrs5j326nk2gm0fy7amhwx1fzkwv"; }; - modSha256 = "0a00kcyagqczw0vhl8qs2xs1y8myw080y9kjs4qrcmj6kibdy55q"; + vendorSha256 = null; meta = with lib; { description = "HTTP load generator, ApacheBench (ab) replacement"; @@ -19,4 +19,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ filalex77 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/minio-client/default.nix b/pkgs/tools/networking/minio-client/default.nix index 0649eb021720c..4e81321dc627f 100644 --- a/pkgs/tools/networking/minio-client/default.nix +++ b/pkgs/tools/networking/minio-client/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0ff2fyr3787zp0lpgbph064am33py2wzjikzmxd3zwp3y0dic770"; }; - modSha256 = "1bcz7jchfnglypr2md9hhqbvcbghic2yp6njdrx3m5nqhylypzfx"; + vendorSha256 = "0nfcxz47v5gl0wih59xarhz82nd8wy61c3ijvg2v08ipk29zivcc"; subPackages = [ "." ]; @@ -24,4 +24,4 @@ buildGoModule rec { platforms = platforms.unix; license = licenses.asl20; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/nebula/default.nix b/pkgs/tools/networking/nebula/default.nix index ec94fc97997a5..69fc3e7a8b001 100644 --- a/pkgs/tools/networking/nebula/default.nix +++ b/pkgs/tools/networking/nebula/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0xrki9w83b4b3l5adq1rxz374f124wf388sdyvy7ngc3b04k7qlb"; }; - modSha256 = "0v45ikw0bl00412krg4v6sr9bggvsrvl0h6clihkh4mdfz6kwa47"; + vendorSha256 = "094mn1r69c40w7k3lsggjh0dpws9l0j7mgiyjy1lpblkvkyk2azm"; subPackages = [ "cmd/nebula" "cmd/nebula-cert" ]; @@ -40,4 +40,4 @@ buildGoModule rec { platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/obfs4/default.nix b/pkgs/tools/networking/obfs4/default.nix index 02820c0a74fd7..784c6d5c638ed 100644 --- a/pkgs/tools/networking/obfs4/default.nix +++ b/pkgs/tools/networking/obfs4/default.nix @@ -10,7 +10,7 @@ buildGoModule rec { sha256 = "05aqmw8x8s0yqyqmdj5zcsq06gsbcmrlcd52gaqm20m1pg9503ad"; }; - modSha256 = "150kg22kznrdj5icjxk3qd70g7wpq8zd2zklw1y2fgvrggw8zvyv"; + vendorSha256 = "0h3gjxv26pc6cysvy1hny2f4abw6i847dk8fx0m113ixx9qghk87"; meta = with lib; { description = "A pluggable transport proxy"; @@ -18,4 +18,4 @@ buildGoModule rec { repositories.git = "https://git.torproject.org/pluggable-transports/obfs4.git"; maintainers = with maintainers; [ phreedom thoughtpolice ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/pixiecore/default.nix b/pkgs/tools/networking/pixiecore/default.nix index bc8ec7da16987..60d2a0986b164 100644 --- a/pkgs/tools/networking/pixiecore/default.nix +++ b/pkgs/tools/networking/pixiecore/default.nix @@ -12,7 +12,7 @@ buildGoModule rec { sha256 = "14dslmx3gk08h9gqfjw5y27x7d2c6r8ir7mjd7l9ybysagpzr02a"; }; - modSha256 = "1waqaglm6f9zy5296z309ppkck2vmydhk9gjnxrgzmhqld5lcq4f"; + vendorSha256 = "08n3m6fkwh8jmmzky3ygij4gxlcqidqk5ywi8ki8bkyzzs2lqaw7"; subPackages = [ "cmd/pixiecore" ]; meta = { @@ -22,4 +22,4 @@ buildGoModule rec { maintainers = with stdenv.lib.maintainers; [ bbigras danderson ]; platforms = stdenv.lib.platforms.linux; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/shadowfox/default.nix b/pkgs/tools/networking/shadowfox/default.nix index f2ae143e1b9e9..f4cc57c9c8b2f 100644 --- a/pkgs/tools/networking/shadowfox/default.nix +++ b/pkgs/tools/networking/shadowfox/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { goPackagePath = "github.com/SrKomodo/shadowfox-updater"; - modSha256 = "0hcc87mzacqwbw10l49kx0sxl4mivdr88c40wh6hdfvrbam2w86r"; + vendorSha256 = "06ar9ivry9b01609izjbl6hqgg0cy7aqd8n2cqpyq0g7my0l0lbj"; buildFlags = [ "--tags" "release" ]; @@ -27,4 +27,4 @@ buildGoModule rec { platforms = platforms.all; maintainers = with maintainers; [ infinisil ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/tendermint/default.nix b/pkgs/tools/networking/tendermint/default.nix index 90b16e37ed784..97f9b141767b3 100644 --- a/pkgs/tools/networking/tendermint/default.nix +++ b/pkgs/tools/networking/tendermint/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "17p7khfiv5aflpl4imbqp8v7gignd6v6a7g80xlnzgix5ismh84l"; }; - modSha256 = "1sdjzj52gkqk51ml29hijzv64clmi38km5z7j7paf28dla2brfxq"; + vendorSha256 = "1vhd3s6yxfhirgipxcy0rh8sk55cdzirr8n8r31sijgyak92mq0l"; meta = with stdenv.lib; { description = "Byzantine-Fault Tolerant State Machines. Or Blockchain, for short."; @@ -20,4 +20,4 @@ buildGoModule rec { maintainers = with maintainers; [ alexfmpe ]; platforms = platforms.linux ++ platforms.darwin; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/termshark/default.nix b/pkgs/tools/networking/termshark/default.nix index ea1ef86f979b4..7933cad687a27 100644 --- a/pkgs/tools/networking/termshark/default.nix +++ b/pkgs/tools/networking/termshark/default.nix @@ -14,7 +14,7 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = [ wireshark-cli ]; - modSha256 = "0lp4gky76di7as78421p3lsirfr7mic3z204ildvj6gf6d15svpr"; + vendorSha256 = "14apff3vcbndr30765lzi4qswakavb4396bjixxvpxv6i5c04dq7"; postFixup = '' wrapProgram $out/bin/termshark --prefix PATH : ${stdenv.lib.makeBinPath [ wireshark-cli ]} @@ -31,4 +31,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ winpat elseym ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/networking/v2ray/generic.nix b/pkgs/tools/networking/v2ray/generic.nix index bf6e6cd55ae23..e4831f5dced72 100644 --- a/pkgs/tools/networking/v2ray/generic.nix +++ b/pkgs/tools/networking/v2ray/generic.nix @@ -13,7 +13,7 @@ let pname = "v2ray-core"; inherit version src; - modSha256 = "11gsncy3449a7y6w6pr7acqabyj2q2a1q52f8fcl5cdz1vjbmmxi"; + vendorSha256 = "1lh8382gyss01frq4gxyx9p26p5m8f158qfw55sy5wb7ddrafcc2"; buildPhase = '' runHook preBuild @@ -47,4 +47,4 @@ in runCommand "v2ray-${version}" { makeWrapper "$file" "$out/bin/$(basename "$file")" \ --set-default V2RAY_LOCATION_ASSET ${assetsDrv} done -'' +'' \ No newline at end of file diff --git a/pkgs/tools/networking/yggdrasil/default.nix b/pkgs/tools/networking/yggdrasil/default.nix index d8c8c429ef982..438d620d2b586 100644 --- a/pkgs/tools/networking/yggdrasil/default.nix +++ b/pkgs/tools/networking/yggdrasil/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "147kl2kvv1rn3yk0mlvd998a2yayjl07csxxkjvs6264j6csb860"; }; - modSha256 = "1ffp7q7kbkm1312sz6xnpc7342iczy9vj3m76lflirr1ljmw0dnb"; + vendorSha256 = "09xv2p9rydnsb185x61fxhyjqx41wz285c1gdd47ad3s08ay1qc7"; # Change the default location of the management socket on Linux # systems so that the yggdrasil system service unit does not have to @@ -37,4 +37,4 @@ buildGoModule rec { platforms = platforms.all; maintainers = with maintainers; [ ehmry gazally lassulus ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/package-management/mynewt-newt/default.nix b/pkgs/tools/package-management/mynewt-newt/default.nix index 54435b76947a1..ce155b72fc39a 100644 --- a/pkgs/tools/package-management/mynewt-newt/default.nix +++ b/pkgs/tools/package-management/mynewt-newt/default.nix @@ -22,7 +22,7 @@ buildGoModule rec { }) ]; - modSha256 = "068r8wa2pgd68jv50x0l1w8n96f97b3mgv7z6f85280ahgywaasq"; + vendorSha256 = "1sh9mx3lc28fzvc1yrhz58rlbaac7aq1dqyvxwj98vld3kigpv1z"; meta = with stdenv.lib; { homepage = "https://mynewt.apache.org/"; @@ -36,4 +36,4 @@ buildGoModule rec { maintainers = with maintainers; [ pjones ]; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/package-management/nfpm/default.nix b/pkgs/tools/package-management/nfpm/default.nix index 0b5f5edf39927..b1a44d7458b0b 100644 --- a/pkgs/tools/package-management/nfpm/default.nix +++ b/pkgs/tools/package-management/nfpm/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0zl8xf74k5is8rxbirrqb5cnfgrlppr1gchfqm31305mnpicr92s"; }; - modSha256 = "14izjwadl4ify0wrz0yinqvayar79h0pxxqj5n69a5dgbx09fp0l"; + vendorSha256 = "07xg8cm7pqpnb96drcmzk7rj2dhfn4pd8vr2a7nxqizd3qk6d5bf"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; @@ -21,4 +21,4 @@ buildGoModule rec { maintainers = [ maintainers.marsam ]; license = licenses.mit; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/security/age/default.nix b/pkgs/tools/security/age/default.nix index c8b4f069f7955..c3756b545e3ee 100644 --- a/pkgs/tools/security/age/default.nix +++ b/pkgs/tools/security/age/default.nix @@ -4,7 +4,7 @@ buildGoModule rec { pname = "age"; version = "unstable-2020-03-25"; goPackagePath = "github.com/FiloSottile/age"; - modSha256 = "00yhn1894ni8bvkqm1vr0rqkky52pkhvdzbi2sqx3czlgb5ibw3h"; + vendorSha256 = "0km7a2826j3fk2nrkmgc990chrkcfz006wfw14yilsa4p2hmfl7m"; subPackages = [ "cmd/age" @@ -24,4 +24,4 @@ buildGoModule rec { license = licenses.bsd3; maintainers = with maintainers; [ tazjin ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/security/bettercap/default.nix b/pkgs/tools/security/bettercap/default.nix index 0560f91b22b7a..8acb5fb9f83b2 100644 --- a/pkgs/tools/security/bettercap/default.nix +++ b/pkgs/tools/security/bettercap/default.nix @@ -19,7 +19,7 @@ buildGoModule rec { sha256 = "18hwz9m16pxlb7wp78iqmdi0kimrx3h05fs0zhzm8qhzancq8alf"; }; - modSha256 = "1qhmrjb3fvw6maxrl7hb3bizrw6szhwx6s2g59p5pj3dz4x8jajn"; + vendorSha256 = "1j272w0zdndcz4fmh9fzbk2q8wmyfi70vn0p6d8cg0r0l231sbyx"; nativeBuildInputs = [ pkg-config ]; buildInputs = [ libpcap libnfnetlink libnetfilter_queue libusb1 ]; @@ -34,4 +34,4 @@ buildGoModule rec { maintainers = with maintainers; [ y0no ]; platforms = platforms.all; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/security/browserpass/default.nix b/pkgs/tools/security/browserpass/default.nix index a02d04e1333e8..2dd03bc465d9c 100644 --- a/pkgs/tools/security/browserpass/default.nix +++ b/pkgs/tools/security/browserpass/default.nix @@ -12,7 +12,7 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper ]; - modSha256 = "13yw7idgw8l48yvm4jjha0kbx6q22m2zp13y006mikavynqsr5kj"; + vendorSha256 = "1wcbn0ip596f2dp68y6jmxgv20l0dgrcxg5cwclkawigj05416zj"; postPatch = '' # Because this Makefile will be installed to be used by the user, patch @@ -51,4 +51,4 @@ buildGoModule rec { platforms = platforms.all; maintainers = with maintainers; [ rvolosatovs infinisil ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/security/gobuster/default.nix b/pkgs/tools/security/gobuster/default.nix index c3426bee965ba..8b80855114950 100644 --- a/pkgs/tools/security/gobuster/default.nix +++ b/pkgs/tools/security/gobuster/default.nix @@ -14,7 +14,7 @@ buildGoModule rec { sha256 = "0q8ighqykh8qyvidnm6az6dc9mp32bbmhkmkqzl1ybbw6paa8pym"; }; - modSha256 = "0jq0z5s05vqdvq7v1gdjwlqqwbl1j2rv9f16k52idl50vdiqviql"; + vendorSha256 = "0kr9i2nm5csf3070hwaiss137pfa3088xbw2zigp7aqb2naky036"; meta = with lib; { description = "Tool used to brute-force URIs, DNS subdomains, Virtual Host names on target web servers"; @@ -22,4 +22,4 @@ buildGoModule rec { license = licenses.asl20; maintainers = with maintainers; [ pamplemousse ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index a16701f48ea81..7eec1b5e4bca6 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -20,7 +20,7 @@ buildGoModule rec { sha256 = "19xhyyd76r17rwn6s8xgfjnyi7kywagy0i4anqws40w79j3qb1p0"; }; - modSha256 = "0zr4ihpcclw5pfhcdrd4n4qb3i3djcwyvwr4m2kpn99icp55bml8"; + vendorSha256 = "1wn20bh7ma4pblsf6qnlbz5bx4p9apig3d1yz7cpsqv4z3w07baw"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version} -X main.commit=${src.rev}" ]; @@ -61,4 +61,4 @@ buildGoModule rec { well, providing a stellar user experience and a sane, simple interface. ''; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/security/saml2aws/default.nix b/pkgs/tools/security/saml2aws/default.nix index 4373abdb9a4b1..42845705ff6b5 100644 --- a/pkgs/tools/security/saml2aws/default.nix +++ b/pkgs/tools/security/saml2aws/default.nix @@ -11,7 +11,20 @@ buildGoModule rec { sha256 = "12aidylamrq4rvy2cfdz669lr1p20yqrshigcc5x1hrlhh9y64xc"; }; - modSha256 = "1kcj5065yy52p1jy4fad5lsz3y4spqc40k1qsirm53qqixhrhvag"; + hid = fetchFromGitHub { + owner = "karalabe"; + repo = "hid"; + rev = "9c14560f9ee858c43f40b5cd01392b167aacf4e8"; + sha256 = "0xc7b8mwha64j7l2fr2g5zy8pz7cqi0vrxx60gii52b6ii31xncx"; + }; + + vendorSha256 = "0mns5clykvj33krf29yjh8lkf05nih42ka5ji7miq0iaikqyyc78"; + overrideModAttrs = (_: { + postBuild = '' + cp -r --reflink=auto ${hid}/libusb vendor/github.com/karalabe/hid + cp -r --reflink=auto ${hid}/hidapi vendor/github.com/karalabe/hid + ''; + }); subPackages = [ "." "cmd/saml2aws" ]; @@ -26,4 +39,4 @@ buildGoModule rec { platforms = stdenv.lib.platforms.unix; maintainers = [ stdenv.lib.maintainers.pmyjavec ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/security/sops/default.nix b/pkgs/tools/security/sops/default.nix index 8aa2e219e7df4..55dde8438c8ae 100644 --- a/pkgs/tools/security/sops/default.nix +++ b/pkgs/tools/security/sops/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "1515bk0fl0pvdkp402l51gdg63bmqlh89sglss6prc1qqvv5v2xy"; }; - modSha256 = "0vhxd3dschj5i9sig6vpxzbl59cas1qa843akzmjnfjrrafb916y"; + vendorSha256 = "0yryc799k4563wy53z7amraj89cyprklj0lfv207530hwv5i5gm6"; meta = with stdenv.lib; { homepage = "https://github.com/mozilla/sops"; @@ -19,4 +19,4 @@ buildGoModule rec { maintainers = [ maintainers.marsam ]; license = licenses.mpl20; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/system/ctop/default.nix b/pkgs/tools/system/ctop/default.nix index 4f492def16246..1c46caaf93247 100644 --- a/pkgs/tools/system/ctop/default.nix +++ b/pkgs/tools/system/ctop/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0y72l65xgfqrgghzbm1zcy776l5m31z0gn6vfr689zyi3k3f4kh8"; }; - modSha256 = "0wxv6yzlgki7047qszx9p9xpph95bg097jkgaa0b3wbpx8vg7qml"; + vendorSha256 = "1x4li44vg0l1x205v9a971cgphplxhsrn59q97gmj9cfy4m7jdfw"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version} -X main.build=v${version}" ]; @@ -21,4 +21,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ apeyroux marsam ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/system/gotop/default.nix b/pkgs/tools/system/gotop/default.nix index 44ef60c70f384..2964efd067d95 100644 --- a/pkgs/tools/system/gotop/default.nix +++ b/pkgs/tools/system/gotop/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "01a2y2604dh2zfy5f2fxr306id0fbq0df91fpz2m8w7rpaszd6xr"; }; - modSha256 = "1gbpxq2vyshln97gij5y9qsjyf3mkwfqwwhikc0cck3mnwiv87dd"; + vendorSha256 = "1ais548gii4q7xzysnw2ykjxyzb7azszsqdlp9hgiwp0bax9nj2n"; meta = with stdenv.lib; { description = "A terminal based graphical activity monitor inspired by gtop and vtop"; @@ -20,4 +20,4 @@ buildGoModule rec { maintainers = [ maintainers.magnetophon ]; platforms = platforms.unix; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/system/jump/default.nix b/pkgs/tools/system/jump/default.nix index bc2adb22c4fad..fe0138783d3b1 100644 --- a/pkgs/tools/system/jump/default.nix +++ b/pkgs/tools/system/jump/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0mph3bqfjnw3yf0a6ml3ccmkr1shviwvvq4d04ky4gppfy6z51jy"; }; - modSha256 = "1fzsm85c31vkdw80kijxmjhk8jyhjz8b21npgks2qrnizhm6iaf8"; + vendorSha256 = "1500vim2lmkkls758pwhlx3piqbw6ap0nnhdwz9pcxih4s4as2nk"; outputs = [ "out" "man"]; postInstall = '' @@ -37,4 +37,4 @@ buildGoModule rec { platforms = platforms.all; maintainers = with maintainers; [ sondr3 ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/system/netdata/go.d.plugin.nix b/pkgs/tools/system/netdata/go.d.plugin.nix index cada1eb65c3c6..2e397da8a817c 100644 --- a/pkgs/tools/system/netdata/go.d.plugin.nix +++ b/pkgs/tools/system/netdata/go.d.plugin.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "15h4075lwqh58ssdgyq34jj8r4dga0sz7h18dzy4nir75p8a0s7b"; }; - modSha256 = "1386qhk1yr47h7qv15k0abc8mfif96pqapw0v4wrf3pl1z9mzl2n"; + vendorSha256 = "1pw9pb3rdjzf2dx1p1jiqxs7qhlpjki7fy74nyxza5wzrv4317sj"; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; @@ -26,4 +26,4 @@ buildGoModule rec { license = licenses.gpl3; maintainers = [ maintainers.lethalman ]; }; -} +} \ No newline at end of file diff --git a/pkgs/tools/text/gjo/default.nix b/pkgs/tools/text/gjo/default.nix index fd06129acfae7..74a5c87a760eb 100644 --- a/pkgs/tools/text/gjo/default.nix +++ b/pkgs/tools/text/gjo/default.nix @@ -16,7 +16,7 @@ buildGoModule rec { doCheck = true; - modSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"; + vendorSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"; meta = with stdenv.lib; { description = "Small utility to create JSON objects"; @@ -24,5 +24,4 @@ buildGoModule rec { license = licenses.mit; maintainers = with maintainers; [ doronbehar ]; }; -} - +} \ No newline at end of file diff --git a/pkgs/tools/text/shfmt/default.nix b/pkgs/tools/text/shfmt/default.nix index cad595079037b..ab96392a95d0e 100644 --- a/pkgs/tools/text/shfmt/default.nix +++ b/pkgs/tools/text/shfmt/default.nix @@ -11,7 +11,7 @@ buildGoModule rec { sha256 = "0zlk1jjk65jwd9cx0xarz4yg2r2h86kd5g00gcnsav6dp6rx3aw8"; }; - modSha256 = "080k8d5rp8kyg0x7vjxm758b9ya9z336yd4rcqws7yhqawxiv55z"; + vendorSha256 = "1jq2x4yxshsy4ahp7nrry8dc9cyjj46mljs447rq57sgix4ndpq8"; subPackages = ["cmd/shfmt"]; buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; @@ -25,4 +25,4 @@ buildGoModule rec { ''; license = licenses.bsd3; }; -} +} \ No newline at end of file |