summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/networking/mullvad/libwg.nix
diff options
context:
space:
mode:
authorReed Riley <reed@riley.engineer>2023-12-28 05:58:51 +0000
committerCole Helbling <cole.e.helbling@outlook.com>2024-01-02 07:53:55 -0800
commit590ec5b4129a82f4ccc3bc941375e621b00e309a (patch)
tree57d16bb5d64df86f4dde015fe93acf1c4621a9b0 /pkgs/applications/networking/mullvad/libwg.nix
parent1a08a38091be2947070bbf5b06f906e4b4397789 (diff)
mullvad: 2023.5 -> 2023.6
Diffstat (limited to 'pkgs/applications/networking/mullvad/libwg.nix')
-rw-r--r--pkgs/applications/networking/mullvad/libwg.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/applications/networking/mullvad/libwg.nix b/pkgs/applications/networking/mullvad/libwg.nix
index 2f852e3a25bd..6ca08c2e2768 100644
--- a/pkgs/applications/networking/mullvad/libwg.nix
+++ b/pkgs/applications/networking/mullvad/libwg.nix
@@ -1,6 +1,7 @@
{ lib
, buildGoModule
, mullvad
+, fetchpatch
}:
buildGoModule {
pname = "libwg";
@@ -12,7 +13,7 @@ buildGoModule {
sourceRoot = "${mullvad.src.name}/wireguard/libwg";
- vendorHash = "sha256-QNde5BqkSuqp3VJQOhn7aG6XknRDZQ62PE3WGhEJ5LU=";
+ vendorHash = "sha256-MQ5tVbcwMee6lmPyKSsNBh9jrz4zwx7INf1Cb0GxjHo=";
# XXX: hack to make the ar archive go to the correct place
# This is necessary because passing `-o ...` to `ldflags` does not work
@@ -21,13 +22,23 @@ buildGoModule {
GOBIN = "${placeholder "out"}/lib";
ldflags = [ "-s" "-w" "-buildmode=c-archive" ];
+ patches = [
+ # build broken without wintun reference
+ # https://github.com/mullvad/mullvadvpn-app/pull/5621
+ (fetchpatch {
+ url = "https://github.com/mullvad/mullvadvpn-app/commit/5dff68ac9c8ec26f1a39a7f44e3b684bb0833bf1.patch";
+ sha256 = "sha256-bUcDVmrrDblK7OJvHqf627vzVwmmvO2EL+sioAnZGbk=";
+ relative = "wireguard/libwg";
+ })
+ ];
+
postInstall = ''
mv $out/lib/libwg{,.a}
'';
meta = with lib; {
description = "A tiny wrapper around wireguard-go";
- homepage = "https://github.com/mullvad/mullvadvpn-app/tree/master/wireguard/libwg";
+ homepage = "https://github.com/mullvad/mullvadvpn-app/tree/main/wireguard/libwg";
license = licenses.gpl3Only;
maintainers = with maintainers; [ cole-h ];
};