Merge pull request #170952 from SuperSandro2000/firewalld

firewalld: init at 1.1.1
This commit is contained in:
Sandro 2022-05-04 20:51:27 +02:00 committed by GitHub
commit 7e4329608c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 145 additions and 19 deletions

View File

@ -23,7 +23,7 @@
description = "Network manager applet";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
serviceConfig.ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet ${lib.optionalString config.programs.nm-applet.indicator "--indicator"}";
serviceConfig.ExecStart = "${pkgs.networkmanager-applet}/bin/nm-applet ${lib.optionalString config.programs.nm-applet.indicator "--indicator"}";
};
services.dbus.packages = [ pkgs.gcr ];

View File

@ -136,7 +136,7 @@ in
# session requirements
cinnamon-screensaver
# cinnamon-killer-daemon: provided by cinnamon-common
networkmanagerapplet # session requirement - also nm-applet not needed
networkmanager-applet # session requirement - also nm-applet not needed
# For a polkit authentication agent
polkit_gnome

View File

@ -0,0 +1,104 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, bash
, docbook_xml_dtd_42
, docbook-xsl-nons
, glib
, gobject-introspection
, gtk3
, intltool
, libnotify
, libxml2
, libxslt
, networkmanager-applet
, pkg-config
, python3
, wrapGAppsNoGuiHook
, withGui ? false
}:
let
pythonPath = python3.withPackages (ps: with ps; [
dbus-python
nftables
pygobject3
] ++ lib.optionals withGui [
pyqt5
pyqt5_sip
]);
in
stdenv.mkDerivation rec {
pname = "firewalld";
version = "1.1.1";
src = fetchFromGitHub {
owner = "firewalld";
repo = "firewalld";
rev = "v${version}";
sha256 = "sha256-w8TbovIhOhJAUZWbKdBd/+db8Hro/ttlxWZDcrCXX4Q=";
};
patches = [
./respect-xml-catalog-files-var.patch
];
postPatch = ''
substituteInPlace src/firewall/config/__init__.py.in \
--replace "/usr/share" "$out/share"
for file in config/firewall-{applet,config}.desktop.in; do
substituteInPlace $file \
--replace "/usr/bin/" "$out/bin/"
done
'' + lib.optionalString withGui ''
substituteInPlace src/firewall-applet.in \
--replace "/usr/bin/nm-connection-editor" "${networkmanager-applet}/bin/nm-conenction-editor"
'';
nativeBuildInputs = [
autoreconfHook
docbook_xml_dtd_42
docbook-xsl-nons
glib
intltool
libxml2
libxslt
pkg-config
python3
python3.pkgs.wrapPython
] ++ lib.optionals withGui [
gobject-introspection
wrapGAppsNoGuiHook
];
buildInputs = [
bash
glib
] ++ lib.optionals withGui [
gtk3
libnotify
pythonPath
];
dontWrapGApps = true;
preFixup = lib.optionalString withGui ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
postFixup = ''
chmod +x $out/share/firewalld/*.py $out/share/firewalld/testsuite/python/*.py $out/share/firewalld/testsuite/{,integration/}testsuite
patchShebangs --host $out/share/firewalld/testsuite/{,integration/}testsuite $out/share/firewalld/*.py
wrapPythonProgramsIn "$out/bin" "$out ${pythonPath}"
wrapPythonProgramsIn "$out/share/firewalld/testsuite/python" "$out ${pythonPath}"
'';
meta = with lib; {
description = "Firewall daemon with D-Bus interface";
homepage = "https://github.com/firewalld/firewalld";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -0,0 +1,13 @@
--- a/m4/jh_path_xml_catalog.m4
+++ b/m4/jh_path_xml_catalog.m4
@@ -40,8 +40,8 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
[
AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
- if $jh_found_xmlcatalog && \
- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
+ # empty argument forces libxml to use XML_CATALOG_FILES variable
+ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then
AC_MSG_RESULT([found])
ifelse([$3],,,[$3
])dnl

View File

@ -42,7 +42,7 @@
, modemmanager
, mutter
, networkmanager
, networkmanagerapplet
, networkmanager-applet
, libnma-gtk4
, ninja
, pkg-config
@ -76,8 +76,9 @@ stdenv.mkDerivation rec {
src = ./paths.patch;
gcm = gnome-color-manager;
gnome_desktop = gnome-desktop;
networkmanagerapplet = networkmanager-applet;
inherit glibc libgnomekbd tzdata;
inherit cups networkmanagerapplet;
inherit cups;
})
# Fix Online Accounts configuration on X11

View File

@ -379,7 +379,7 @@ lib.makeScope pkgs.newScope (self: with self; {
dconf = throw "The gnome.dconf alias was removed on 2022-01-13. Please use pkgs.dconf directly."; # added 2019-11-30
networkmanagerapplet = throw "The gnome.networkmanagerapplet alias was removed on 2022-01-13. Please use pkgs.networkmanagerapplet directly."; # added 2019-12-12
networkmanagerapplet = throw "The gnome.networkmanagerapplet alias was removed on 2022-01-13. Please use pkgs.networkmanager-applet directly."; # added 2019-12-12
glade = throw "The gnome.glade alias was removed on 2022-01-13. Please use pkgs.glade directly."; # added 2020-05-15

View File

@ -11,7 +11,7 @@
, granite
, gtk3
, networkmanager
, networkmanagerapplet
, networkmanager-applet
, libnma
, switchboard
}:
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
patches = [
(substituteAll {
src = ./fix-paths.patch;
inherit networkmanagerapplet;
networkmanagerapplet = networkmanager-applet;
})
];

View File

@ -8,8 +8,6 @@
, withXtables ? true , iptables
}:
with lib;
stdenv.mkDerivation rec {
version = "1.0.2";
pname = "nftables";
@ -28,8 +26,8 @@ stdenv.mkDerivation rec {
buildInputs = [
libmnl libnftnl libpcap
gmp jansson libedit
] ++ optional withXtables iptables
++ optional withPython python3;
] ++ lib.optional withXtables iptables
++ lib.optional withPython python3;
preConfigure = ''
substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file
@ -46,12 +44,12 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-json"
"--with-cli=editline"
] ++ optional (!withDebugSymbols) "--disable-debug"
++ optional (!withPython) "--disable-python"
++ optional withPython "--enable-python"
++ optional withXtables "--with-xtables";
] ++ lib.optional (!withDebugSymbols) "--disable-debug"
++ lib.optional (!withPython) "--disable-python"
++ lib.optional withPython "--enable-python"
++ lib.optional withXtables "--with-xtables";
meta = {
meta = with lib; {
description = "The project that aims to replace the existing {ip,ip6,arp,eb}tables framework";
homepage = "https://netfilter.org/projects/nftables/";
license = licenses.gpl2Only;

View File

@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
attrPath = "networkmanagerapplet";
attrPath = "networkmanager-applet";
versionPolicy = "odd-unstable";
};
};

View File

@ -849,6 +849,7 @@ mapAliases ({
neap = throw "neap was removed from nixpkgs, as it relies on python2"; # Added 2022-01-12
netcat-openbsd = throw "'netcat-openbsd' has been renamed to/replaced by 'libressl.nc'"; # Converted to throw 2022-02-22
netease-cloud-music = throw "netease-cloud-music has been removed together with deepin"; # Added 2020-08-31
networkmanagerapplet = networkmanager-applet; # Added 2022-04-30
networkmanager_fortisslvpn = throw "'networkmanager_fortisslvpn' has been renamed to/replaced by 'networkmanager-fortisslvpn'"; # Converted to throw 2022-02-22
networkmanager_iodine = throw "'networkmanager_iodine' has been renamed to/replaced by 'networkmanager-iodine'"; # Converted to throw 2022-02-22
networkmanager_l2tp = throw "'networkmanager_l2tp' has been renamed to/replaced by 'networkmanager-l2tp'"; # Converted to throw 2022-02-22

View File

@ -8560,6 +8560,8 @@ with pkgs;
networkmanager = callPackage ../tools/networking/networkmanager { };
networkmanager-applet = callPackage ../tools/networking/networkmanager/applet { };
networkmanager-iodine = callPackage ../tools/networking/networkmanager/iodine { };
networkmanager-openvpn = callPackage ../tools/networking/networkmanager/openvpn { };
@ -8576,8 +8578,6 @@ with pkgs;
networkmanager-sstp = callPackage ../tools/networking/networkmanager/sstp { };
networkmanagerapplet = callPackage ../tools/networking/networkmanager/applet { };
libnma = callPackage ../tools/networking/networkmanager/libnma { };
libnma-gtk4 = libnma.override { withGtk4 = true; };
@ -26112,6 +26112,10 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Security;
};
firewalld = callPackage ../applications/networking/firewalld { };
firewalld-gui = firewalld.override { withGui = true; };
flacon = libsForQt5.callPackage ../applications/audio/flacon { };
flexget = callPackage ../applications/networking/flexget { };

View File

@ -5622,6 +5622,11 @@ in {
nextcord = callPackage ../development/python-modules/nextcord { };
nftables = toPythonModule (pkgs.nftables.override {
python3 = python;
withPython = true;
});
nghttp2 = (toPythonModule (pkgs.nghttp2.override {
inherit (self) python cython setuptools;
inherit (pkgs) ncurses;