nixpkgs/pkgs/tools/networking/network-manager/l2tp.nix
Matthieu Coudron 11a9e1c3c0 l2tp: 1.2.4 -> 1.2.8
the new version brings a new panel in IPsec settings which allows to
reenable old algorithms for IPsec phases 1/2 (dropped in recent libreswan/strongswan etc).

Also updates the homepage with the new one.
2018-02-07 13:21:49 +09:00

57 lines
1.7 KiB
Nix

{ stdenv, fetchFromGitHub, autoreconfHook, libtool, intltool, pkgconfig
, networkmanager, ppp, xl2tpd, strongswan, libsecret
, withGnome ? true, gnome3, networkmanagerapplet }:
stdenv.mkDerivation rec {
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
pname = "NetworkManager-l2tp";
version = "1.2.8";
src = fetchFromGitHub {
owner = "nm-l2tp";
repo = "network-manager-l2tp";
rev = "${version}";
sha256 = "110157dpamgr7r5kb8aidi0a2ap9z2m52bff94fb4nhxacz69yv8";
};
buildInputs = [ networkmanager ppp libsecret ]
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome_keyring networkmanagerapplet ];
nativeBuildInputs = [ autoreconfHook libtool intltool pkgconfig ];
postPatch = ''
sed -i -e 's%"\(/usr/sbin\|/usr/pkg/sbin\|/usr/local/sbin\)/[^"]*",%%g' ./src/nm-l2tp-service.c
substituteInPlace ./Makefile.am \
--replace '$(sysconfdir)/dbus-1/system.d' "$out/etc/dbus-1/system.d"
substituteInPlace ./src/nm-l2tp-service.c \
--replace /sbin/ipsec ${strongswan}/bin/ipsec \
--replace /sbin/xl2tpd ${xl2tpd}/bin/xl2tpd
'';
preConfigure = ''
intltoolize -f
'';
configureFlags = [
"--with-gnome=${if withGnome then "yes" else "no"}"
"--localstatedir=/var"
"--sysconfdir=$(out)/etc"
];
enableParallelBuilding = true;
configureFlags = [
"--with-gnome=${if withGnome then "yes" else "no"}"
"--localstatedir=/var"
] ;
meta = with stdenv.lib; {
description = "L2TP plugin for NetworkManager";
inherit (networkmanager.meta) platforms;
homepage = http://github.com/nm-l2tp/network-manager-l2tp;
license = licenses.gpl2;
maintainers = with maintainers; [ abbradar obadz ];
};
}