2018-08-09 15:41:01 +01:00
|
|
|
{ stdenv, substituteAll, fetchFromGitHub, autoreconfHook, libtool, intltool, pkgconfig
|
2019-02-13 21:47:50 +00:00
|
|
|
, gtk3, networkmanager, ppp, xl2tpd, strongswan, libsecret
|
2016-08-03 23:47:42 +01:00
|
|
|
, withGnome ? true, gnome3, networkmanagerapplet }:
|
2015-03-24 11:07:27 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-08-09 15:41:01 +01:00
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
|
|
|
pname = "NetworkManager-l2tp";
|
|
|
|
version = "1.2.10";
|
2015-03-24 11:07:27 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-08-09 15:41:01 +01:00
|
|
|
owner = "nm-l2tp";
|
|
|
|
repo = "network-manager-l2tp";
|
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "1vm004nj2n5abpywr7ji6r28scf7xs45zw4rqrm8jn7mysf96h0x";
|
2015-03-24 11:07:27 +00:00
|
|
|
};
|
|
|
|
|
2018-08-09 15:41:01 +01:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit strongswan xl2tpd;
|
|
|
|
})
|
|
|
|
];
|
2016-06-21 03:14:02 +01:00
|
|
|
|
2018-08-09 15:41:01 +01:00
|
|
|
buildInputs = [ networkmanager ppp ]
|
2019-02-13 21:47:50 +00:00
|
|
|
++ stdenv.lib.optionals withGnome [ gtk3 libsecret networkmanagerapplet ];
|
2017-10-31 11:08:05 +00:00
|
|
|
|
2018-08-09 15:41:01 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook libtool intltool pkgconfig ];
|
2016-06-21 03:14:02 +01:00
|
|
|
|
2017-07-21 17:18:54 +01:00
|
|
|
preConfigure = ''
|
|
|
|
intltoolize -f
|
|
|
|
'';
|
2015-03-24 11:07:27 +00:00
|
|
|
|
2017-11-10 23:31:23 +00:00
|
|
|
configureFlags = [
|
2018-08-28 14:02:15 +01:00
|
|
|
"--without-libnm-glib"
|
2017-11-10 23:31:23 +00:00
|
|
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--sysconfdir=$(out)/etc"
|
2018-09-23 11:53:46 +01:00
|
|
|
"--enable-absolute-paths"
|
2017-11-10 23:31:23 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2015-03-24 11:07:27 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "L2TP plugin for NetworkManager";
|
|
|
|
inherit (networkmanager.meta) platforms;
|
2017-11-10 23:31:23 +00:00
|
|
|
homepage = https://github.com/nm-l2tp/network-manager-l2tp;
|
2015-03-24 11:07:27 +00:00
|
|
|
license = licenses.gpl2;
|
2016-06-21 03:14:02 +01:00
|
|
|
maintainers = with maintainers; [ abbradar obadz ];
|
2015-03-24 11:07:27 +00:00
|
|
|
};
|
|
|
|
}
|