ci: fix GHA's rebuild-xxx: 5001+ labels (#360754)
[NixPkgs.git] / pkgs / by-name / ne / networkmanager-l2tp / package.nix
blob4389b2b62099149966308a6acedb3182593d6ddd
1 { stdenv
2 , lib
3 , substituteAll
4 , fetchFromGitHub
5 , autoreconfHook
6 , pkg-config
7 , gtk3
8 , gtk4
9 , networkmanager
10 , ppp
11 , xl2tpd
12 , strongswan
13 , libsecret
14 , withGnome ? true
15 , libnma
16 , libnma-gtk4
17 , glib
18 , openssl
19 , nss
22 stdenv.mkDerivation rec {
23   name = "${pname}${lib.optionalString withGnome "-gnome"}-${version}";
24   pname = "NetworkManager-l2tp";
25   version = "1.20.16";
27   src = fetchFromGitHub {
28     owner = "nm-l2tp";
29     repo = "network-manager-l2tp";
30     rev = version;
31     hash = "sha256-78TOx3UnAF02UfZ7cWhPKv9bhJCq5UmAMrwd5xUnVrg=";
32   };
34   patches = [
35     (substituteAll {
36       src = ./fix-paths.patch;
37       inherit strongswan xl2tpd;
38     })
39   ];
41   nativeBuildInputs = [
42     autoreconfHook
43     pkg-config
44   ];
46   buildInputs = [
47     networkmanager
48     ppp
49     glib
50     openssl
51     nss
52   ] ++ lib.optionals withGnome [
53     gtk3
54     gtk4
55     libsecret
56     libnma
57     libnma-gtk4
58   ];
60   configureFlags = [
61     "--with-gnome=${if withGnome then "yes" else "no"}"
62     "--with-gtk4=${if withGnome then "yes" else "no"}"
63     "--localstatedir=/var"
64     "--enable-absolute-paths"
65   ];
67   enableParallelBuilding = true;
69   passthru = {
70     networkManagerPlugin = "VPN/nm-l2tp-service.name";
71   };
73   meta = with lib; {
74     description = "L2TP plugin for NetworkManager";
75     inherit (networkmanager.meta) platforms;
76     homepage = "https://github.com/nm-l2tp/network-manager-l2tp";
77     license = licenses.gpl2Plus;
78     maintainers = with maintainers; [ abbradar obadz ];
79   };