From 069188467c574055011d68a43efc4f0ede70472b Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 5 Jan 2020 16:38:24 +0100 Subject: [PATCH] wireguard-go: fix darwin build https://hydra.nixos.org/build/109407984 --- .../wireguard-go/0001-Fix-darwin-build.patch | 26 +++++++++++++++++++ .../tools/networking/wireguard-go/default.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/tools/networking/wireguard-go/0001-Fix-darwin-build.patch diff --git a/pkgs/tools/networking/wireguard-go/0001-Fix-darwin-build.patch b/pkgs/tools/networking/wireguard-go/0001-Fix-darwin-build.patch new file mode 100644 index 00000000000..d79d9e3531f --- /dev/null +++ b/pkgs/tools/networking/wireguard-go/0001-Fix-darwin-build.patch @@ -0,0 +1,26 @@ +From 63360467da4ae6d7fc8c0e05619bdf8813c7e417 Mon Sep 17 00:00:00 2001 +From: Maximilian Bosch +Date: Sun, 5 Jan 2020 15:35:15 +0100 +Subject: [PATCH] Fix darwin build + +--- + rwcancel/select_default.go | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/rwcancel/select_default.go b/rwcancel/select_default.go +index dd23cda..03f3452 100644 +--- a/rwcancel/select_default.go ++++ b/rwcancel/select_default.go +@@ -9,6 +9,7 @@ package rwcancel + + import "golang.org/x/sys/unix" + +-func unixSelect(nfd int, r *unix.FdSet, w *unix.FdSet, e *unix.FdSet, timeout *unix.Timeval) error { +- return unix.Select(nfd, r, w, e, timeout) ++func unixSelect(nfd int, r *unix.FdSet, w *unix.FdSet, e *unix.FdSet, timeout *unix.Timeval) (err error) { ++ _, err = unix.Select(nfd, r, w, e, timeout) ++ return + } +-- +2.23.1 + diff --git a/pkgs/tools/networking/wireguard-go/default.nix b/pkgs/tools/networking/wireguard-go/default.nix index 08ef1d3499c..8832560b3b1 100644 --- a/pkgs/tools/networking/wireguard-go/default.nix +++ b/pkgs/tools/networking/wireguard-go/default.nix @@ -11,6 +11,8 @@ buildGoPackage rec { sha256 = "0s3hvqpz13n630yvi0476hfzrp3xcj8x61zc2hl5z70f8kvbay4i"; }; + patches = [ ./0001-Fix-darwin-build.patch ]; + goDeps = ./deps.nix; passthru.updateScript = ./update.sh;