networkmanager-openvpn: move to finalAttrs, add homepage

and changelog, format with nixfmt-rfc-style
This commit is contained in:
John Titor 2024-06-25 19:58:27 +05:30
parent 426e9b0461
commit 5e80a8b3db
No known key found for this signature in database
GPG Key ID: 29B0514F4E3C1CC0

View File

@ -1,30 +1,31 @@
{ stdenv
, lib
, fetchurl
, substituteAll
, openvpn
, gettext
, libxml2
, pkg-config
, file
, networkmanager
, libsecret
, glib
, gtk3
, gtk4
, withGnome ? true
, gnome
, kmod
, libnma
, libnma-gtk4
{
stdenv,
lib,
fetchurl,
substituteAll,
openvpn,
gettext,
libxml2,
pkg-config,
file,
networkmanager,
libsecret,
glib,
gtk3,
gtk4,
withGnome ? true,
gnome,
kmod,
libnma,
libnma-gtk4,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "NetworkManager-openvpn";
version = "1.12.0";
src = fetchurl {
url = "mirror://gnome/sources/NetworkManager-openvpn/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
url = "mirror://gnome/sources/NetworkManager-openvpn/${lib.versions.majorMinor finalAttrs.version}/NetworkManager-openvpn-${finalAttrs.version}.tar.xz";
sha256 = "kD/UwK69KqescMnYwr7Y35ImVdItdkUUQDVmrom36IY=";
};
@ -42,17 +43,19 @@ stdenv.mkDerivation rec {
libxml2
];
buildInputs = [
openvpn
networkmanager
glib
] ++ lib.optionals withGnome [
gtk3
gtk4
libsecret
libnma
libnma-gtk4
];
buildInputs =
[
openvpn
networkmanager
glib
]
++ lib.optionals withGnome [
gtk3
gtk4
libsecret
libnma
libnma-gtk4
];
configureFlags = [
"--with-gnome=${if withGnome then "yes" else "no"}"
@ -63,16 +66,18 @@ stdenv.mkDerivation rec {
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
packageName = "NetworkManager-openvpn";
attrPath = "networkmanager-openvpn";
versionPolicy = "odd-unstable";
};
networkManagerPlugin = "VPN/nm-openvpn-service.name";
};
meta = with lib; {
meta = {
description = "NetworkManager's OpenVPN plugin";
homepage = "https://gitlab.gnome.org/GNOME/NetworkManager-openvpn";
changelog = "https://gitlab.gnome.org/GNOME/NetworkManager-openvpn/-/blob/main/NEWS";
inherit (networkmanager.meta) maintainers platforms;
license = licenses.gpl2Plus;
license = lib.licenses.gpl2Plus;
};
}
})