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 /pkgs/servers/gobetween | |
parent | a0ddea1d6a9f07b0631e0dbcd3b7240d2eb82ef7 (diff) |
go-modules: Update files to use vendorSha256
Diffstat (limited to 'pkgs/servers/gobetween')
-rw-r--r-- | pkgs/servers/gobetween/default.nix | 24 | ||||
-rw-r--r-- | pkgs/servers/gobetween/gomod.patch | 21 |
2 files changed, 41 insertions, 4 deletions
diff --git a/pkgs/servers/gobetween/default.nix b/pkgs/servers/gobetween/default.nix index ff59ad53ed1c..2b474d818ad2 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 000000000000..98181e3fe794 --- /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 |