Merge pull request #170952 from SuperSandro2000/firewalld
firewalld: init at 1.1.1
This commit is contained in:
commit
7e4329608c
|
@ -23,7 +23,7 @@
|
||||||
description = "Network manager applet";
|
description = "Network manager applet";
|
||||||
wantedBy = [ "graphical-session.target" ];
|
wantedBy = [ "graphical-session.target" ];
|
||||||
partOf = [ "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 ];
|
services.dbus.packages = [ pkgs.gcr ];
|
||||||
|
|
|
@ -136,7 +136,7 @@ in
|
||||||
# session requirements
|
# session requirements
|
||||||
cinnamon-screensaver
|
cinnamon-screensaver
|
||||||
# cinnamon-killer-daemon: provided by cinnamon-common
|
# 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
|
# For a polkit authentication agent
|
||||||
polkit_gnome
|
polkit_gnome
|
||||||
|
|
104
pkgs/applications/networking/firewalld/default.nix
Normal file
104
pkgs/applications/networking/firewalld/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -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
|
|
@ -42,7 +42,7 @@
|
||||||
, modemmanager
|
, modemmanager
|
||||||
, mutter
|
, mutter
|
||||||
, networkmanager
|
, networkmanager
|
||||||
, networkmanagerapplet
|
, networkmanager-applet
|
||||||
, libnma-gtk4
|
, libnma-gtk4
|
||||||
, ninja
|
, ninja
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
@ -76,8 +76,9 @@ stdenv.mkDerivation rec {
|
||||||
src = ./paths.patch;
|
src = ./paths.patch;
|
||||||
gcm = gnome-color-manager;
|
gcm = gnome-color-manager;
|
||||||
gnome_desktop = gnome-desktop;
|
gnome_desktop = gnome-desktop;
|
||||||
|
networkmanagerapplet = networkmanager-applet;
|
||||||
inherit glibc libgnomekbd tzdata;
|
inherit glibc libgnomekbd tzdata;
|
||||||
inherit cups networkmanagerapplet;
|
inherit cups;
|
||||||
})
|
})
|
||||||
|
|
||||||
# Fix Online Accounts configuration on X11
|
# Fix Online Accounts configuration on X11
|
||||||
|
|
|
@ -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
|
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
|
glade = throw "The ‘gnome.glade’ alias was removed on 2022-01-13. Please use ‘pkgs.glade’ directly."; # added 2020-05-15
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
, granite
|
, granite
|
||||||
, gtk3
|
, gtk3
|
||||||
, networkmanager
|
, networkmanager
|
||||||
, networkmanagerapplet
|
, networkmanager-applet
|
||||||
, libnma
|
, libnma
|
||||||
, switchboard
|
, switchboard
|
||||||
}:
|
}:
|
||||||
|
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
|
||||||
patches = [
|
patches = [
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./fix-paths.patch;
|
src = ./fix-paths.patch;
|
||||||
inherit networkmanagerapplet;
|
networkmanagerapplet = networkmanager-applet;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
, withXtables ? true , iptables
|
, withXtables ? true , iptables
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "1.0.2";
|
version = "1.0.2";
|
||||||
pname = "nftables";
|
pname = "nftables";
|
||||||
|
@ -28,8 +26,8 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libmnl libnftnl libpcap
|
libmnl libnftnl libpcap
|
||||||
gmp jansson libedit
|
gmp jansson libedit
|
||||||
] ++ optional withXtables iptables
|
] ++ lib.optional withXtables iptables
|
||||||
++ optional withPython python3;
|
++ lib.optional withPython python3;
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file
|
substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file
|
||||||
|
@ -46,12 +44,12 @@ stdenv.mkDerivation rec {
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-json"
|
"--with-json"
|
||||||
"--with-cli=editline"
|
"--with-cli=editline"
|
||||||
] ++ optional (!withDebugSymbols) "--disable-debug"
|
] ++ lib.optional (!withDebugSymbols) "--disable-debug"
|
||||||
++ optional (!withPython) "--disable-python"
|
++ lib.optional (!withPython) "--disable-python"
|
||||||
++ optional withPython "--enable-python"
|
++ lib.optional withPython "--enable-python"
|
||||||
++ optional withXtables "--with-xtables";
|
++ lib.optional withXtables "--with-xtables";
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "The project that aims to replace the existing {ip,ip6,arp,eb}tables framework";
|
description = "The project that aims to replace the existing {ip,ip6,arp,eb}tables framework";
|
||||||
homepage = "https://netfilter.org/projects/nftables/";
|
homepage = "https://netfilter.org/projects/nftables/";
|
||||||
license = licenses.gpl2Only;
|
license = licenses.gpl2Only;
|
||||||
|
|
|
@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = gnome.updateScript {
|
updateScript = gnome.updateScript {
|
||||||
packageName = pname;
|
packageName = pname;
|
||||||
attrPath = "networkmanagerapplet";
|
attrPath = "networkmanager-applet";
|
||||||
versionPolicy = "odd-unstable";
|
versionPolicy = "odd-unstable";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -849,6 +849,7 @@ mapAliases ({
|
||||||
neap = throw "neap was removed from nixpkgs, as it relies on python2"; # Added 2022-01-12
|
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
|
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
|
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_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_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
|
networkmanager_l2tp = throw "'networkmanager_l2tp' has been renamed to/replaced by 'networkmanager-l2tp'"; # Converted to throw 2022-02-22
|
||||||
|
|
|
@ -8560,6 +8560,8 @@ with pkgs;
|
||||||
|
|
||||||
networkmanager = callPackage ../tools/networking/networkmanager { };
|
networkmanager = callPackage ../tools/networking/networkmanager { };
|
||||||
|
|
||||||
|
networkmanager-applet = callPackage ../tools/networking/networkmanager/applet { };
|
||||||
|
|
||||||
networkmanager-iodine = callPackage ../tools/networking/networkmanager/iodine { };
|
networkmanager-iodine = callPackage ../tools/networking/networkmanager/iodine { };
|
||||||
|
|
||||||
networkmanager-openvpn = callPackage ../tools/networking/networkmanager/openvpn { };
|
networkmanager-openvpn = callPackage ../tools/networking/networkmanager/openvpn { };
|
||||||
|
@ -8576,8 +8578,6 @@ with pkgs;
|
||||||
|
|
||||||
networkmanager-sstp = callPackage ../tools/networking/networkmanager/sstp { };
|
networkmanager-sstp = callPackage ../tools/networking/networkmanager/sstp { };
|
||||||
|
|
||||||
networkmanagerapplet = callPackage ../tools/networking/networkmanager/applet { };
|
|
||||||
|
|
||||||
libnma = callPackage ../tools/networking/networkmanager/libnma { };
|
libnma = callPackage ../tools/networking/networkmanager/libnma { };
|
||||||
|
|
||||||
libnma-gtk4 = libnma.override { withGtk4 = true; };
|
libnma-gtk4 = libnma.override { withGtk4 = true; };
|
||||||
|
@ -26112,6 +26112,10 @@ with pkgs;
|
||||||
inherit (darwin.apple_sdk.frameworks) Security;
|
inherit (darwin.apple_sdk.frameworks) Security;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
firewalld = callPackage ../applications/networking/firewalld { };
|
||||||
|
|
||||||
|
firewalld-gui = firewalld.override { withGui = true; };
|
||||||
|
|
||||||
flacon = libsForQt5.callPackage ../applications/audio/flacon { };
|
flacon = libsForQt5.callPackage ../applications/audio/flacon { };
|
||||||
|
|
||||||
flexget = callPackage ../applications/networking/flexget { };
|
flexget = callPackage ../applications/networking/flexget { };
|
||||||
|
|
|
@ -5622,6 +5622,11 @@ in {
|
||||||
|
|
||||||
nextcord = callPackage ../development/python-modules/nextcord { };
|
nextcord = callPackage ../development/python-modules/nextcord { };
|
||||||
|
|
||||||
|
nftables = toPythonModule (pkgs.nftables.override {
|
||||||
|
python3 = python;
|
||||||
|
withPython = true;
|
||||||
|
});
|
||||||
|
|
||||||
nghttp2 = (toPythonModule (pkgs.nghttp2.override {
|
nghttp2 = (toPythonModule (pkgs.nghttp2.override {
|
||||||
inherit (self) python cython setuptools;
|
inherit (self) python cython setuptools;
|
||||||
inherit (pkgs) ncurses;
|
inherit (pkgs) ncurses;
|
||||||
|
|
Loading…
Reference in a new issue