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

92 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv
, fetchurl
, meson
, ninja
, gettext
, gtk-doc
, pkg-config
, vala
, networkmanager
, gnome
, isocodes
, libxml2
, docbook_xsl
, docbook_xml_dtd_43
, mobile-broadband-provider-info
, gobject-introspection
, gtk3
, withGnome ? true
, gcr
, glib
, substituteAll
, lib
}:
stdenv.mkDerivation rec {
pname = "libnma";
2022-01-21 11:21:10 +01:00
version = "1.8.34";
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
2021-01-15 10:19:50 +01:00
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
2022-01-21 11:21:10 +01:00
sha256 = "9eLnOOD8p/KlSQeSkLLYAXUR1IWoMiDDbfOAo7R1MwQ=";
};
patches = [
# Needed for wingpanel-indicator-network and switchboard-plug-network
./hardcode-gsettings.patch
];
nativeBuildInputs = [
meson
ninja
gettext
pkg-config
gobject-introspection
gtk-doc
docbook_xsl
docbook_xml_dtd_43
libxml2
vala
];
buildInputs = [
gtk3
networkmanager
isocodes
mobile-broadband-provider-info
2021-01-15 10:19:50 +01:00
] ++ lib.optionals withGnome [
# advanced certificate chooser
gcr
];
mesonFlags = [
"-Dgcr=${lib.boolToString withGnome}"
];
postPatch = ''
substituteInPlace src/nma-ws/nma-eap.c --subst-var-by \
NM_APPLET_GSETTINGS ${glib.makeSchemaPath "$out" "${pname}-${version}"}
'';
postInstall = ''
glib-compile-schemas $out/share/glib-2.0/schemas
'';
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "odd-unstable";
};
};
meta = with lib; {
homepage = "https://gitlab.gnome.org/GNOME/libnma";
description = "NetworkManager UI utilities (libnm version)";
license = licenses.gpl2Plus; # Mix of GPL and LPGL 2+
maintainers = teams.gnome.members;
platforms = platforms.linux;
};
}