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