From 59fd4775b61239c346599f81d26cf43705b78da1 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Mon, 27 Jul 2020 20:46:35 +1000 Subject: [PATCH] gobetween: update vendored lxd This allows us to drop the overrideModAttrs workaround, vendoring has been fixed in the newer lxd version. --- pkgs/servers/gobetween/default.nix | 20 +++++--------------- pkgs/servers/gobetween/gomod.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 pkgs/servers/gobetween/gomod.patch diff --git a/pkgs/servers/gobetween/default.nix b/pkgs/servers/gobetween/default.nix index 09af704db2be..e8e03a3779fa 100644 --- a/pkgs/servers/gobetween/default.nix +++ b/pkgs/servers/gobetween/default.nix @@ -13,25 +13,15 @@ buildGoModule rec { deleteVendor = true; + patches = [ + ./gomod.patch + ]; + buildPhase = '' make -e build${lib.optionalString enableStatic "-static"} ''; - lxd = fetchFromGitHub { - owner = "lxc"; - repo = "lxd"; - rev = "814c96fcec7478c9cac9582fead011b2dee0af5b"; - sha256 = "03k2mwkfzgqmgzgxw46mymgkidbjlfv70pzw8hlyi18ag8jj4g5j"; - }; - - overrideModAttrs = (_: { - postBuild = '' - rm -r vendor/github.com/lxc/lxd - cp -r --reflink=auto ${lxd} vendor/github.com/lxc/lxd - ''; - }); - - vendorSha256 = "1nnz75mv27iwl5z7wa986gs8mhyn10452vini5x90yfx523bg589"; + vendorSha256 = "1nkni9ikpc0wngh5v0qmlpn5s9v85lb2ih22f3h3lih7nc29yv87"; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/servers/gobetween/gomod.patch b/pkgs/servers/gobetween/gomod.patch new file mode 100644 index 000000000000..2f0fb408061f --- /dev/null +++ b/pkgs/servers/gobetween/gomod.patch @@ -0,0 +1,13 @@ +diff --git a/src/go.mod b/src/go.mod +index 3242342..795c306 100644 +--- a/src/go.mod ++++ b/src/go.mod +@@ -28,7 +28,7 @@ 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/webbrowser v1.0.0 // indirect +- github.com/lxc/lxd v0.0.0-20200706202337-814c96fcec74 ++ github.com/lxc/lxd v0.0.0-20200727014606-0d408e8e8ebb + github.com/mattn/go-colorable v0.1.7 // indirect + github.com/miekg/dns v1.1.30 + github.com/mitchellh/go-testing-interface v1.14.0 // indirect