2018-03-27 00:42:46 +01:00
|
|
|
{ stdenv, fetchurl, intltool, pkgconfig, networkmanager, strongswanNM, sysctl
|
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";
|
2018-03-21 02:39:18 +00:00
|
|
|
version = "1.4.3";
|
2016-08-25 20:58:56 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.strongswan.org/NetworkManager/${name}.tar.bz2";
|
2018-03-21 02:39:18 +00:00
|
|
|
sha256 = "0jzl52wmh2q2djb1s546kxliy7s6akhi5bx6rp2ppjfk3wbi2a2l";
|
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" \
|
2018-03-27 00:42:46 +01:00
|
|
|
--replace "/sbin/sysctl" "${sysctl}/bin/sysctl"
|
2016-08-25 20:58:56 +01:00
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|