2017-10-24 23:55:05 +02:00
|
|
|
{ stdenv, fetchurl, intltool, pkgconfig, networkmanager, strongswanNM, procps
|
2016-08-25 21:58:56 +02:00
|
|
|
, gnome3, libgnome_keyring, libsecret }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "NetworkManager-strongswan";
|
2017-02-07 16:11:37 +01:00
|
|
|
version = "1.4.1";
|
2016-08-25 21:58:56 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.strongswan.org/NetworkManager/${name}.tar.bz2";
|
2017-02-07 16:11:37 +01:00
|
|
|
sha256 = "0r5j8cr4x01d2cdy970990292n7p9v617cw103kdczw646xwcxs8";
|
2016-08-25 21:58:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s,nm_plugindir=.*,nm_plugindir=$out/lib/NetworkManager," "configure"
|
|
|
|
sed -i "s,nm_libexecdir=.*,nm_libexecdir=$out/libexec," "configure"
|
|
|
|
'';
|
|
|
|
|
2017-10-24 23:55:05 +02:00
|
|
|
buildInputs = [ networkmanager strongswanNM libsecret ]
|
2016-08-25 21:58:56 +02:00
|
|
|
++ (with gnome3; [ gtk libgnome_keyring networkmanagerapplet ]);
|
|
|
|
|
|
|
|
nativeBuildInputs = [ intltool pkgconfig ];
|
|
|
|
|
2018-01-27 13:03:09 +01:00
|
|
|
# Fixes deprecation errors with networkmanager 1.10.2
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
|
|
|
|
|
2016-08-25 21:58:56 +02:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace "configure" \
|
|
|
|
--replace "/sbin/sysctl" "${procps}/bin/sysctl"
|
|
|
|
'';
|
|
|
|
|
2017-10-24 23:55:05 +02:00
|
|
|
configureFlags = [ "--with-charon=${strongswanNM}/libexec/ipsec/charon-nm" ];
|
|
|
|
|
2016-08-25 21:58:56 +02:00
|
|
|
meta = {
|
|
|
|
description = "NetworkManager's strongswan plugin";
|
|
|
|
inherit (networkmanager.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|