diff options
| author | TarCV <tarcv@users.noreply.github.com> | 2023-07-11 08:21:38 +0300 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2023-07-21 09:38:54 +0000 |
| commit | 0fb2855387c3dc623d2fd258fc5017c75116c468 (patch) | |
| tree | c9ef1096184a3a5d044f92a6048eb8e19e9328e4 | |
| parent | mullvad.openvpn-mullvad: Move hooks to nativeBuildInputs (diff) | |
| download | nixpkgs-origin/backport-242385-to-release-23.05.tar.gz | |
mullvad.openvpn-mullvad: Update configureFlags to match the flags from mullvadvpn-app-binaries on Linux tooorigin/backport-242385-to-release-23.05
(cherry picked from commit 6957eb64cd01ac8524efc07beb2e11526b0403c1)
| -rw-r--r-- | pkgs/applications/networking/mullvad/openvpn.nix | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/pkgs/applications/networking/mullvad/openvpn.nix b/pkgs/applications/networking/mullvad/openvpn.nix index 3d290d49ec8c..ad3317280169 100644 --- a/pkgs/applications/networking/mullvad/openvpn.nix +++ b/pkgs/applications/networking/mullvad/openvpn.nix @@ -1,13 +1,17 @@ { lib +, stdenv , openvpn , fetchpatch , fetchurl , iproute2 +, libnl , autoreconfHook +, pkg-config }: openvpn.overrideAttrs (oldAttrs: let + inherit (lib) optional; fetchMullvadPatch = { commit, sha256 }: fetchpatch { url = "https://github.com/mullvad/openvpn/commit/${commit}.patch"; inherit sha256; @@ -24,13 +28,15 @@ openvpn.overrideAttrs (oldAttrs: nativeBuildInputs = oldAttrs.nativeBuildInputs or [ ] ++ [ autoreconfHook + pkg-config ]; - buildInputs = oldAttrs.buildInputs or [ ] ++ [ - iproute2 - ]; + buildInputs = oldAttrs.buildInputs or [ ] + ++ optional stdenv.isLinux [ libnl.dev ]; + + configureFlags = [ + # Assignement instead of appending to make sure to use exactly the flags required by mullvad - configureFlags = oldAttrs.configureFlags or [ ] ++ [ # Flags are based on https://github.com/mullvad/mullvadvpn-app-binaries/blob/main/Makefile#L17 "--enable-static" "--disable-shared" @@ -46,10 +52,11 @@ openvpn.overrideAttrs (oldAttrs: "--disable-lzo" "--disable-lz4" "--enable-comp-stub" - - # TODO: Use '--enable-dco --disable-iproute2' on Linux, see https://github.com/mullvad/mullvadvpn-app-binaries/blob/main/Makefile#L35 - "--enable-iproute2" - "IPROUTE=${iproute2}/sbin/ip" + ] + ++ optional stdenv.isLinux [ + # Flags are based on https://github.com/mullvad/mullvadvpn-app-binaries/blob/main/Makefile#L35 + "--enable-dco" # requires libnl + "--disable-iproute2" ]; patches = oldAttrs.patches or [ ] ++ [ |
