2022-05-15 08:13:47 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, substituteAll
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
, gtk3
|
2022-05-15 08:14:33 +00:00
|
|
|
, gtk4
|
2022-05-15 08:13:47 +00:00
|
|
|
, networkmanager
|
|
|
|
, ppp
|
|
|
|
, xl2tpd
|
|
|
|
, strongswan
|
|
|
|
, libsecret
|
|
|
|
, withGnome ? true
|
|
|
|
, libnma
|
2022-05-15 08:14:33 +00:00
|
|
|
, libnma-gtk4
|
2022-05-15 08:13:47 +00:00
|
|
|
, glib
|
2022-05-15 08:14:33 +00:00
|
|
|
, openssl
|
|
|
|
, nss
|
2022-05-15 08:13:47 +00:00
|
|
|
}:
|
2015-03-24 11:07:27 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-02-06 20:49:02 +00:00
|
|
|
name = "${pname}${lib.optionalString withGnome "-gnome"}-${version}";
|
2018-08-09 14:41:01 +00:00
|
|
|
pname = "NetworkManager-l2tp";
|
2022-05-15 08:14:33 +00:00
|
|
|
version = "1.20.4";
|
2015-03-24 11:07:27 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-08-09 14:41:01 +00:00
|
|
|
owner = "nm-l2tp";
|
|
|
|
repo = "network-manager-l2tp";
|
2019-09-08 23:38:31 +00:00
|
|
|
rev = version;
|
2022-05-15 08:14:33 +00:00
|
|
|
sha256 = "VoqPjMQILBYemRE5VD/XwhWi9zL9QxxHZJ2JKtGglFo=";
|
2015-03-24 11:07:27 +00:00
|
|
|
};
|
|
|
|
|
2018-08-09 14:41:01 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit strongswan xl2tpd;
|
|
|
|
})
|
|
|
|
];
|
2016-06-21 02:14:02 +00:00
|
|
|
|
2022-05-15 08:13:47 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
pkg-config
|
|
|
|
];
|
2016-06-21 02:14:02 +00:00
|
|
|
|
2022-05-15 08:13:47 +00:00
|
|
|
buildInputs = [
|
|
|
|
networkmanager
|
|
|
|
ppp
|
|
|
|
glib
|
2022-05-15 08:14:33 +00:00
|
|
|
openssl
|
|
|
|
nss
|
2022-05-15 08:13:47 +00:00
|
|
|
] ++ lib.optionals withGnome [
|
|
|
|
gtk3
|
2022-05-15 08:14:33 +00:00
|
|
|
gtk4
|
2022-05-15 08:13:47 +00:00
|
|
|
libsecret
|
|
|
|
libnma
|
2022-05-15 08:14:33 +00:00
|
|
|
libnma-gtk4
|
2022-05-15 08:13:47 +00:00
|
|
|
];
|
2015-03-24 11:07:27 +00:00
|
|
|
|
2017-11-10 23:31:23 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
2022-05-15 08:14:33 +00:00
|
|
|
"--with-gtk4=${if withGnome then "yes" else "no"}"
|
2017-11-10 23:31:23 +00:00
|
|
|
"--localstatedir=/var"
|
2018-09-23 10:53:46 +00:00
|
|
|
"--enable-absolute-paths"
|
2017-11-10 23:31:23 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2015-03-24 11:07:27 +00:00
|
|
|
|
2022-03-17 03:04:10 +00:00
|
|
|
passthru = {
|
|
|
|
networkManagerPlugin = "VPN/nm-l2tp-service.name";
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-03-24 11:07:27 +00:00
|
|
|
description = "L2TP plugin for NetworkManager";
|
|
|
|
inherit (networkmanager.meta) platforms;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/nm-l2tp/network-manager-l2tp";
|
2022-05-15 08:15:49 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2016-06-21 02:14:02 +00:00
|
|
|
maintainers = with maintainers; [ abbradar obadz ];
|
2015-03-24 11:07:27 +00:00
|
|
|
};
|
|
|
|
}
|