From 975db4fb866ab8cd4976dc95fa310cadbc4a9735 Mon Sep 17 00:00:00 2001 From: Ingo Blechschmidt Date: Sat, 24 Oct 2020 13:22:19 +0200 Subject: [PATCH 1/2] libreswan: Unbreak the package On current unstable, libreswan compiles but then doesn't run because of an ABI change in NSS. There is an easy fix which is to land in the next version of libreswan, see https://github.com/libreswan/libreswan/issues/334; in the meantime, we can copy this fix so that libreswan works again on unstable. --- pkgs/tools/networking/libreswan/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/networking/libreswan/default.nix b/pkgs/tools/networking/libreswan/default.nix index 3e7719c40d4..630459f93a9 100644 --- a/pkgs/tools/networking/libreswan/default.nix +++ b/pkgs/tools/networking/libreswan/default.nix @@ -29,6 +29,10 @@ stdenv.mkDerivation rec { "-Wno-error=format-truncation" "-Wno-error=pointer-compare" "-Wno-error=stringop-truncation" + # The following flag allows libreswan v3.32 to work with NSS 3.22, see + # https://github.com/libreswan/libreswan/issues/334. + # This flag should not be needed for libreswan v3.33 (which is not yet released). + "-DNSS_PKCS11_2_0_COMPAT=1" ]; nativeBuildInputs = [ makeWrapper pkgconfig ]; From eff847932aada7fcf6d4dd374a6ceaf09b9659dc Mon Sep 17 00:00:00 2001 From: Ingo Blechschmidt Date: Sat, 24 Oct 2020 14:52:18 +0200 Subject: [PATCH 2/2] libreswan: remove darwin from list of supported platforms See discussion at https://github.com/NixOS/nixpkgs/pull/101543. Currently, this build depends on iproute2 which is not available on darwin. This might be fixed in the future by employing iproute2mac. --- pkgs/tools/networking/libreswan/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/networking/libreswan/default.nix b/pkgs/tools/networking/libreswan/default.nix index 630459f93a9..7e6f2c475ca 100644 --- a/pkgs/tools/networking/libreswan/default.nix +++ b/pkgs/tools/networking/libreswan/default.nix @@ -86,7 +86,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { homepage = "https://libreswan.org"; description = "A free software implementation of the VPN protocol based on IPSec and the Internet Key Exchange"; - platforms = platforms.linux ++ platforms.darwin ++ platforms.freebsd; + platforms = platforms.linux ++ platforms.freebsd; license = licenses.gpl2; maintainers = [ maintainers.afranchuk ]; };