nixpkgs/pkgs/tools/networking/networkmanager/l2tp/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

81 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, substituteAll
, fetchFromGitHub
, autoreconfHook
, pkg-config
, gtk3
, gtk4
, networkmanager
, ppp
, xl2tpd
, strongswan
, libsecret
, withGnome ? true
, libnma
, libnma-gtk4
, glib
, openssl
, nss
}:
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";
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;
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;
})
];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
networkmanager
ppp
glib
openssl
nss
] ++ lib.optionals withGnome [
gtk3
gtk4
libsecret
libnma
libnma-gtk4
];
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"}"
"--with-gtk4=${if withGnome then "yes" else "no"}"
2017-11-10 23:31:23 +00:00
"--localstatedir=/var"
"--enable-absolute-paths"
2017-11-10 23:31:23 +00:00
];
enableParallelBuilding = true;
2015-03-24 11:07:27 +00:00
passthru = {
networkManagerPlugin = "VPN/nm-l2tp-service.name";
};
meta = with lib; {
2015-03-24 11:07:27 +00:00
description = "L2TP plugin for NetworkManager";
inherit (networkmanager.meta) platforms;
homepage = "https://github.com/nm-l2tp/network-manager-l2tp";
2022-05-15 08:15:49 +00:00
license = licenses.gpl2Plus;
maintainers = with maintainers; [ abbradar obadz ];
2015-03-24 11:07:27 +00:00
};
}