2021-01-17 04:51:22 +01:00
|
|
|
{ lib, stdenv, substituteAll, fetchFromGitHub, autoreconfHook, libtool, intltool, pkg-config
|
2019-04-01 21:38:04 +02:00
|
|
|
, file, findutils
|
2019-02-13 22:47:50 +01:00
|
|
|
, gtk3, networkmanager, ppp, xl2tpd, strongswan, libsecret
|
2020-03-16 01:22:55 +01:00
|
|
|
, withGnome ? true, libnma }:
|
2015-03-24 12:07:27 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-08-09 16:41:01 +02:00
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
|
|
|
pname = "NetworkManager-l2tp";
|
2019-04-01 21:38:04 +02:00
|
|
|
version = "1.2.12";
|
2015-03-24 12:07:27 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-08-09 16:41:01 +02:00
|
|
|
owner = "nm-l2tp";
|
|
|
|
repo = "network-manager-l2tp";
|
2019-09-09 01:38:31 +02:00
|
|
|
rev = version;
|
2019-04-01 21:38:04 +02:00
|
|
|
sha256 = "0cq07kvlm98s8a7l4a3zmqnif8x3307kv7n645zx3f1r7x72b8m4";
|
2015-03-24 12:07:27 +01:00
|
|
|
};
|
|
|
|
|
2018-08-09 16:41:01 +02:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit strongswan xl2tpd;
|
|
|
|
})
|
|
|
|
];
|
2016-06-21 04:14:02 +02:00
|
|
|
|
2018-08-09 16:41:01 +02:00
|
|
|
buildInputs = [ networkmanager ppp ]
|
2021-01-15 10:19:50 +01:00
|
|
|
++ lib.optionals withGnome [ gtk3 libsecret libnma ];
|
2017-10-31 12:08:05 +01:00
|
|
|
|
2021-01-17 04:51:22 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook libtool intltool pkg-config file findutils ];
|
2016-06-21 04:14:02 +02:00
|
|
|
|
2017-07-21 18:18:54 +02:00
|
|
|
preConfigure = ''
|
|
|
|
intltoolize -f
|
|
|
|
'';
|
2015-03-24 12:07:27 +01:00
|
|
|
|
2017-11-11 00:31:23 +01:00
|
|
|
configureFlags = [
|
2018-08-28 15:02:15 +02:00
|
|
|
"--without-libnm-glib"
|
2017-11-11 00:31:23 +01:00
|
|
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--sysconfdir=$(out)/etc"
|
2018-09-23 12:53:46 +02:00
|
|
|
"--enable-absolute-paths"
|
2017-11-11 00:31:23 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2015-03-24 12:07:27 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2015-03-24 12:07:27 +01:00
|
|
|
description = "L2TP plugin for NetworkManager";
|
|
|
|
inherit (networkmanager.meta) platforms;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/nm-l2tp/network-manager-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
|
|
|
};
|
|
|
|
}
|