Skip to content

Commit

Permalink
gobetween: update vendored lxd
Browse files Browse the repository at this point in the history
This allows us to drop the overrideModAttrs workaround, vendoring has been fixed in the newer lxd version.
  • Loading branch information
zowoq committed Jul 28, 2020
1 parent 4ca432d commit 59fd477
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
20 changes: 5 additions & 15 deletions pkgs/servers/gobetween/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions pkgs/servers/gobetween/gomod.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 59fd477

Please sign in to comment.