2016-06-21 04:14:02 +02:00
|
|
|
{ stdenv, fetchFromGitHub, automake, autoconf, libtool, intltool, pkgconfig
|
2016-08-04 00:47:42 +02:00
|
|
|
, networkmanager, ppp, xl2tpd, strongswan, libsecret
|
|
|
|
, withGnome ? true, gnome3, networkmanagerapplet }:
|
2015-03-24 12:07:27 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-06-22 02:53:23 +02:00
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
|
|
|
pname = "NetworkManager-l2tp";
|
|
|
|
version = networkmanager.version;
|
2015-03-24 12:07:27 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2016-06-22 02:53:23 +02:00
|
|
|
owner = "nm-l2tp";
|
|
|
|
repo = "network-manager-l2tp";
|
2016-06-24 00:35:19 +02:00
|
|
|
rev = "c0cedda5e2a0ded695b497c361eaf577068520cb";
|
|
|
|
sha256 = "01f39ghc37vw4n4i7whyikgqz8vzxf41q9fsv2gfw1g501cny1j2";
|
2015-03-24 12:07:27 +01:00
|
|
|
};
|
|
|
|
|
2016-08-04 00:47:42 +02:00
|
|
|
buildInputs = [ networkmanager ppp libsecret ]
|
|
|
|
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome_keyring networkmanagerapplet ];
|
2015-03-24 12:07:27 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ automake autoconf libtool intltool pkgconfig ];
|
|
|
|
|
2016-06-21 04:14:02 +02:00
|
|
|
postPatch = ''
|
|
|
|
sed -i -e 's%"\(/usr/sbin\|/usr/pkg/sbin\|/usr/local/sbin\)/[^"]*",%%g' ./src/nm-l2tp-service.c
|
|
|
|
|
|
|
|
substituteInPlace ./src/nm-l2tp-service.c \
|
|
|
|
--replace /sbin/ipsec ${strongswan}/bin/ipsec \
|
|
|
|
--replace /sbin/xl2tpd ${xl2tpd}/bin/xl2tpd
|
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = "./autogen.sh";
|
2015-03-24 12:07:27 +01:00
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
if withGnome then "--with-gnome" else "--without-gnome";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "L2TP plugin for NetworkManager";
|
|
|
|
inherit (networkmanager.meta) platforms;
|
2016-11-23 15:49:18 +01:00
|
|
|
homepage = "https://github.com/seriyps/NetworkManager-l2tp";
|
2015-03-24 12:07:27 +01:00
|
|
|
license = licenses.gpl2;
|
2016-06-21 04:14:02 +02:00
|
|
|
maintainers = with maintainers; [ abbradar obadz ];
|
2015-03-24 12:07:27 +01:00
|
|
|
};
|
|
|
|
}
|