Skip to content

Commit

Permalink
openvpn*: use matching openssl version for each release
Browse files Browse the repository at this point in the history
  • Loading branch information
ajs124 committed Apr 8, 2022
1 parent 750f86e commit 8e4bd16
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkgs/tools/networking/openvpn/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
, iproute2
, lzo
, openssl
, openssl_1_1
, pam
, useSystemd ? stdenv.isLinux
, systemd
Expand All @@ -22,7 +23,7 @@ let
sha256 = "021qzv1k0zxgv1rmyfpqj3zlzqr28xa7zff1n7vrbjk36ijylpsc";
};

generic = { version, sha256 }:
generic = { version, sha256, extraBuildInputs ? [] }:
let
withIpRoute = stdenv.isLinux && (versionOlder version "2.5.4");
in
Expand All @@ -38,11 +39,12 @@ let

nativeBuildInputs = [ makeWrapper pkg-config ];

buildInputs = [ lzo openssl ]
buildInputs = [ lzo ]
++ optional stdenv.isLinux pam
++ optional withIpRoute iproute2
++ optional useSystemd systemd
++ optional pkcs11Support pkcs11helper;
++ optional pkcs11Support pkcs11helper
++ extraBuildInputs;

configureFlags = optionals withIpRoute [
"--enable-iproute2"
Expand Down Expand Up @@ -80,10 +82,12 @@ in
openvpn_24 = generic {
version = "2.4.12";
sha256 = "1vjx82nlkxrgzfiwvmmlnz8ids5m2fiqz7scy1smh3j9jnf2v5b6";
extraBuildInputs = [ openssl_1_1 ];
};

openvpn = generic {
version = "2.5.6";
sha256 = "0gdd88rcan9vfiwkzsqn6fxxdim7kb1bsxrcra59c5xksprpwfik";
extraBuildInputs = [ openssl ];
};
}

0 comments on commit 8e4bd16

Please sign in to comment.