nixpkgs/pkgs/tools/networking/network-manager/strongswan.nix
Bas van Dijk 460a4b0832 networkmanager_strongswan: fix package
Added the boolean option:

  networking.networkmanager.enableStrongSwan

which enables the networkmanager_strongswan plugin and adds
strongswanNM to the dbus packages.

This was contributed by @wucke13, @eqyiel and @globin.

Fixes: #29873
2017-11-30 23:03:32 +01:00

36 lines
1.1 KiB
Nix

{ stdenv, fetchurl, intltool, pkgconfig, networkmanager, strongswanNM, procps
, gnome3, libgnome_keyring, libsecret }:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "NetworkManager-strongswan";
version = "1.4.1";
src = fetchurl {
url = "https://download.strongswan.org/NetworkManager/${name}.tar.bz2";
sha256 = "0r5j8cr4x01d2cdy970990292n7p9v617cw103kdczw646xwcxs8";
};
postPatch = ''
sed -i "s,nm_plugindir=.*,nm_plugindir=$out/lib/NetworkManager," "configure"
sed -i "s,nm_libexecdir=.*,nm_libexecdir=$out/libexec," "configure"
'';
buildInputs = [ networkmanager strongswanNM libsecret ]
++ (with gnome3; [ gtk libgnome_keyring networkmanagerapplet ]);
nativeBuildInputs = [ intltool pkgconfig ];
preConfigure = ''
substituteInPlace "configure" \
--replace "/sbin/sysctl" "${procps}/bin/sysctl"
'';
configureFlags = [ "--with-charon=${strongswanNM}/libexec/ipsec/charon-nm" ];
meta = {
description = "NetworkManager's strongswan plugin";
inherit (networkmanager.meta) platforms;
};
}