diff --git a/pkgs/by-name/fi/firewalld/nm-connection-editor.patch b/pkgs/by-name/fi/firewalld/nm-connection-editor.patch new file mode 100644 index 000000000000..b12ef91354f7 --- /dev/null +++ b/pkgs/by-name/fi/firewalld/nm-connection-editor.patch @@ -0,0 +1,19 @@ +--- a/src/firewall-applet.in ++++ b/src/firewall-applet.in +@@ -59,14 +59,8 @@ + + NM_CONNECTION_EDITOR = "" + for binary in [ +- "/usr/bin/systemsettings", +- "/bin/systemsettings", +- "/usr/bin/nm-connection-editor", +- "/bin/nm-connection-editor", +- "/usr/bin/kde5-nm-connection-editor", +- "/bin/kde5-nm-connection-editor", +- "/usr/bin/kde-nm-connection-editor", +- "/bin/kde-nm-connection-editor", ++ "/run/current-system/sw/bin/systemsettings", ++ "/run/current-system/sw/bin/nm-connection-editor", + ]: + if os.path.exists(binary): + NM_CONNECTION_EDITOR = binary diff --git a/pkgs/by-name/fi/firewalld/package.nix b/pkgs/by-name/fi/firewalld/package.nix index 853ea60a0220..0d7e5ea21f23 100644 --- a/pkgs/by-name/fi/firewalld/package.nix +++ b/pkgs/by-name/fi/firewalld/package.nix @@ -12,14 +12,12 @@ intltool, ipset, iptables, - kdePackages, kmod, libnotify, librsvg, libxml2, libxslt, networkmanager, - networkmanagerapplet, pkg-config, python3, qt6, @@ -63,7 +61,8 @@ stdenv.mkDerivation (finalAttrs: { ./specify-localedir.patch ./gettext-0.25.patch - ]; + ] + ++ lib.optional withGui ./nm-connection-editor.patch; postPatch = '' substituteInPlace config/xmlschema/check.sh \ @@ -73,11 +72,6 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace $file \ --replace-fail /usr "$out" done - '' - + lib.optionalString withGui '' - substituteInPlace src/firewall-applet.in \ - --replace-fail "/usr/bin/systemsettings" "${kdePackages.systemsettings}/bin/systemsettings" \ - --replace-fail "/usr/bin/nm-connection-editor" "${networkmanagerapplet}/bin/nm-connection-editor" ''; nativeBuildInputs = [