ivpn-service: vendor liboqs 0.10.0

This commit is contained in:
kilyanni
2026-05-23 23:52:27 +02:00
parent d633cae73b
commit a557cbe75f
+30 -1
View File
@@ -21,7 +21,7 @@ buildGoModule (finalAttrs: {
buildInputs = [
wirelesstools
liboqs
(finalAttrs.passthru.liboqs)
];
nativeBuildInputs = [ makeWrapper ];
@@ -108,6 +108,35 @@ buildGoModule (finalAttrs: {
}
'';
# IVPN pins this to an older incompatible version, so we vendor it at that
# Lives in passthru so end-users can override it
passthru.liboqs = liboqs.overrideAttrs (
final: prev: {
version = "0.10.0";
src = fetchFromGitHub {
owner = "open-quantum-safe";
repo = "liboqs";
tag = "${final.version}";
hash = "sha256-BFDa5NUr02lFPcT4Hnb2rjGAi+2cXvh1SHLfqX/zLlI=";
};
# the main derivations patches don't apply onto the older version
patches = [ ];
# manually do what the main derivations pkg-config patch does (unbreak invalid path)
postPatch = ''
substituteInPlace src/liboqs.pc.in \
--replace-fail 'libdir=''${prefix}/@CMAKE_INSTALL_LIBDIR@' \
'libdir=@CMAKE_INSTALL_FULL_LIBDIR@' \
--replace-fail 'includedir=''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@' \
'includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@'
'';
# This matches IVPNs build script at $src/daemon/References/common/kem-helper/build.sh
cmakeFlags = (prev.cmakeFlags or [ ]) ++ [
"-DOQS_USE_OPENSSL=OFF"
"-DOQS_MINIMAL_BUILD=KEM_kyber_1024;KEM_classic_mceliece_348864"
];
}
);
meta = {
description = "Official IVPN Desktop app service daemon";
homepage = "https://www.ivpn.net/apps";