mullvad.openvpn-mullvad: Update configureFlags to match the flags from mullvadvpn-app-binaries on Linux too

authored by TarCV and committed by helbling.dev 369fbaae f362d21d

+15 -8
+15 -8
pkgs/applications/networking/mullvad/openvpn.nix
··· 1 1 { lib 2 + , stdenv 2 3 , openvpn 3 4 , fetchpatch 4 5 , fetchurl 5 6 , iproute2 7 + , libnl 6 8 , autoreconfHook 9 + , pkg-config 7 10 }: 8 11 9 12 openvpn.overrideAttrs (oldAttrs: 10 13 let 14 + inherit (lib) optional; 11 15 fetchMullvadPatch = { commit, sha256 }: fetchpatch { 12 16 url = "https://github.com/mullvad/openvpn/commit/${commit}.patch"; 13 17 inherit sha256; ··· 24 28 25 29 nativeBuildInputs = oldAttrs.nativeBuildInputs or [ ] ++ [ 26 30 autoreconfHook 31 + pkg-config 27 32 ]; 28 33 29 - buildInputs = oldAttrs.buildInputs or [ ] ++ [ 30 - iproute2 31 - ]; 34 + buildInputs = oldAttrs.buildInputs or [ ] 35 + ++ optional stdenv.isLinux [ libnl.dev ]; 36 + 37 + configureFlags = [ 38 + # Assignement instead of appending to make sure to use exactly the flags required by mullvad 32 39 33 - configureFlags = oldAttrs.configureFlags or [ ] ++ [ 34 40 # Flags are based on https://github.com/mullvad/mullvadvpn-app-binaries/blob/main/Makefile#L17 35 41 "--enable-static" 36 42 "--disable-shared" ··· 46 52 "--disable-lzo" 47 53 "--disable-lz4" 48 54 "--enable-comp-stub" 49 - 50 - # TODO: Use '--enable-dco --disable-iproute2' on Linux, see https://github.com/mullvad/mullvadvpn-app-binaries/blob/main/Makefile#L35 51 - "--enable-iproute2" 52 - "IPROUTE=${iproute2}/sbin/ip" 55 + ] 56 + ++ optional stdenv.isLinux [ 57 + # Flags are based on https://github.com/mullvad/mullvadvpn-app-binaries/blob/main/Makefile#L35 58 + "--enable-dco" # requires libnl 59 + "--disable-iproute2" 53 60 ]; 54 61 55 62 patches = oldAttrs.patches or [ ] ++ [