mullvad.openvpn-wireguard: init at 2.5.3

authored by

Sandro Jäckel and committed by helbling.dev a9c901da 2d53cad9

+91
+1
pkgs/applications/networking/mullvad/default.nix
··· 4 4 lib.makeScope newScope (self: { 5 5 libwg = self.callPackage ./libwg.nix { }; 6 6 mullvad = self.callPackage ./mullvad.nix { }; 7 + openvpn-mullvad = self.callPackage ./openvpn.nix { }; 7 8 })
+3
pkgs/applications/networking/mullvad/mullvad.nix
··· 10 10 , libnftnl 11 11 , libmnl 12 12 , libwg 13 + , openvpn-mullvad 13 14 }: 14 15 let 15 16 # result of running address_cache as of 02 Mar 2022 ··· 87 88 wrapProgram $out/bin/mullvad-daemon \ 88 89 --set-default MULLVAD_RESOURCE_DIR "$out/share/mullvad" 89 90 ''; 91 + 92 + passthru = { inherit openvpn-mullvad; }; 90 93 91 94 meta = with lib; { 92 95 description = "Mullvad VPN command-line client tools";
+87
pkgs/applications/networking/mullvad/openvpn.nix
··· 1 + { lib 2 + , openvpn 3 + , fetchpatch 4 + , fetchurl 5 + , iproute2 6 + , autoconf 7 + , automake 8 + }: 9 + 10 + openvpn.overrideAttrs (oldAttrs: 11 + let 12 + fetchMullvadPatch = { commit, sha256 }: fetchpatch { 13 + url = "https://github.com/mullvad/openvpn/commit/${commit}.patch"; 14 + inherit sha256; 15 + }; 16 + in 17 + rec { 18 + pname = "openvpn-mullvad"; 19 + version = "2.5.3"; 20 + 21 + src = fetchurl { 22 + url = "https://swupdate.openvpn.net/community/releases/openvpn-${version}.tar.gz"; 23 + sha256 = "sha256-dfAETfRJQwVVynuZWit3qyTylG/cNmgwG47cI5hqX34="; 24 + }; 25 + 26 + buildInputs = oldAttrs.buildInputs or [ ] ++ [ 27 + iproute2 28 + ]; 29 + 30 + configureFlags = oldAttrs.configureFlags or [ ] ++ [ 31 + "--enable-iproute2" 32 + "IPROUTE=${iproute2}/sbin/ip" 33 + ]; 34 + 35 + nativeBuildInputs = oldAttrs.nativeBuildInputs or [ ] ++ [ 36 + autoconf 37 + automake 38 + ]; 39 + 40 + patches = oldAttrs.patches or [ ] ++ [ 41 + # look at compare to find the relevant commits 42 + # https://github.com/OpenVPN/openvpn/compare/release/2.5...mullvad:mullvad-patches 43 + # used openvpn version is the latest tag ending with -mullvad 44 + # https://github.com/mullvad/openvpn/tags 45 + (fetchMullvadPatch { 46 + # "Reduce PUSH_REQUEST_INTERVAL to one second" 47 + commit = "41e44158fc71bb6cc8cc6edb6ada3307765a12e8"; 48 + sha256 = "sha256-UoH0V6gTPdEuybFkWxdaB4zomt7rZeEUyXs9hVPbLb4="; 49 + }) 50 + (fetchMullvadPatch { 51 + # "Allow auth plugins to set a failure reason" 52 + commit = "f51781c601e8c72ae107deaf25bf66f7c193e9cd"; 53 + sha256 = "sha256-+kwG0YElL16T0e+avHlI8gNQdAxneRS6fylv7QXvC1s="; 54 + }) 55 + (fetchMullvadPatch { 56 + # "Send an event to any plugins when authentication fails" 57 + commit = "c2f810f966f2ffd68564d940b5b8946ea6007d5a"; 58 + sha256 = "sha256-PsKIxYwpLD66YaIpntXJM8OGcObyWBSAJsQ60ojvj30="; 59 + }) 60 + (fetchMullvadPatch { 61 + # "Shutdown when STDIN is closed" 62 + commit = "879d6a3c0288b5443bbe1b94261655c329fc2e0e"; 63 + sha256 = "sha256-pRFY4r+b91/xAKXx6u5GLzouQySXuO5gH0kMGm77a3c="; 64 + }) 65 + (fetchMullvadPatch { 66 + # "Update TAP hardware ID" 67 + commit = "7f71b37a3b25bec0b33a0e29780c222aef869e9d"; 68 + sha256 = "sha256-RF/GvD/ZvhLdt34wDdUT/yxa+IVWx0eY6WRdNWXxXeQ="; 69 + }) 70 + (fetchMullvadPatch { 71 + # "Undo dependency on Python docutils" 72 + commit = "abd3c6214529d9f4143cc92dd874d8743abea17c"; 73 + sha256 = "sha256-SC2RlpWHUDMAEKap1t60dC4hmalk3vok6xY+/xhC2U0="; 74 + }) 75 + (fetchMullvadPatch { 76 + # "Prevent signal when stdin is closed from being cleared (#10)" 77 + commit = "b45b090c81e7b4f2dc938642af7a1e12f699f5c5"; 78 + sha256 = "sha256-KPTFmbuJhMI+AvaRuu30CPPLQAXiE/VApxlUCqbZFls="; 79 + }) 80 + ]; 81 + 82 + meta = oldAttrs.meta or { } // { 83 + description = "OpenVPN with Mullvad-specific patches applied"; 84 + homepage = "https://github.com/mullvad/openvpn"; 85 + maintainers = with lib; [ maintainers.cole-h ]; 86 + }; 87 + })