networkmanager-l2tp: add package

This commit is contained in:
Nikolay Amiantov 2015-03-24 14:07:27 +03:00
parent fe263f4c7e
commit 0e8b27ea6d
3 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,26 @@
diff --git a/src/nm-l2tp-service.c b/src/nm-l2tp-service.c
index d2c9dc4..e61d3d2 100644
--- a/src/nm-l2tp-service.c
+++ b/src/nm-l2tp-service.c
@@ -655,9 +655,7 @@ nm_find_ipsec (void)
{
static const char *ipsec_binary_paths[] =
{
- "/sbin/ipsec",
- "/usr/sbin/ipsec",
- "/usr/local/sbin/ipsec",
+ "@strongswan@/bin/ipsec",
NULL
};
@@ -677,9 +675,7 @@ nm_find_l2tpd (void)
{
static const char *l2tp_binary_paths[] =
{
- "/sbin/xl2tpd",
- "/usr/sbin/xl2tpd",
- "/usr/local/sbin/xl2tpd",
+ "@xl2tpd@/bin/xl2tpd",
NULL
};

View file

@ -0,0 +1,42 @@
{ stdenv, fetchFromGitHub, substituteAll, automake, autoconf, libtool, intltool, pkgconfig
, networkmanager, ppp, xl2tpd, strongswan
, withGnome ? true, gnome3 }:
stdenv.mkDerivation rec {
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
pname = "NetworkManager-l2tp";
version = "0.9.8.7";
src = fetchFromGitHub {
owner = "seriyps";
repo = "NetworkManager-l2tp";
rev = version;
sha256 = "07gl562p3f6l2wn64f3vvz1ygp3hsfhiwh4sn04c3fahfdys69zx";
};
buildInputs = [ networkmanager ppp ]
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome_keyring ];
nativeBuildInputs = [ automake autoconf libtool intltool pkgconfig ];
configureScript = "./autogen.sh";
configureFlags =
if withGnome then "--with-gnome" else "--without-gnome";
postConfigure = "sed 's/-Werror//g' -i Makefile */Makefile";
patches =
[ ( substituteAll {
src = ./l2tp-purity.patch;
inherit xl2tpd strongswan;
})
];
meta = with stdenv.lib; {
description = "L2TP plugin for NetworkManager";
inherit (networkmanager.meta) platforms;
license = licenses.gpl2;
maintainers = with maintainers; [ abbradar ];
};
}

View file

@ -2077,6 +2077,8 @@ let
networkmanager_pptp = callPackage ../tools/networking/network-manager/pptp.nix { };
networkmanager_l2tp = callPackage ../tools/networking/network-manager/l2tp.nix { };
networkmanager_vpnc = callPackage ../tools/networking/network-manager/vpnc.nix { };
networkmanager_openconnect = callPackage ../tools/networking/network-manager/openconnect.nix { };