2018-03-27 01:42:46 +02:00
|
|
|
{ stdenv, fetchurl, intltool, pkgconfig, networkmanager, strongswanNM, sysctl
|
2018-02-25 03:23:58 +01:00
|
|
|
, gnome3, libgnome-keyring, libsecret }:
|
2016-08-25 21:58:56 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "NetworkManager-strongswan";
|
2018-03-21 03:39:18 +01:00
|
|
|
version = "1.4.3";
|
2016-08-25 21:58:56 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.strongswan.org/NetworkManager/${name}.tar.bz2";
|
2018-03-21 03:39:18 +01:00
|
|
|
sha256 = "0jzl52wmh2q2djb1s546kxliy7s6akhi5bx6rp2ppjfk3wbi2a2l";
|
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 ]
|
2018-02-25 03:23:58 +01:00
|
|
|
++ (with gnome3; [ gtk libgnome-keyring networkmanagerapplet ]);
|
2016-08-25 21:58:56 +02:00
|
|
|
|
|
|
|
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" \
|
2018-03-27 01:42:46 +02:00
|
|
|
--replace "/sbin/sysctl" "${sysctl}/bin/sysctl"
|
2016-08-25 21:58:56 +02:00
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|