9 , gobject-introspection
15 , networkmanagerapplet
23 pythonPath = python3.withPackages (ps: with ps; [
27 ] ++ lib.optionals withGui [
32 stdenv.mkDerivation rec {
36 src = fetchFromGitHub {
40 sha256 = "sha256-ugDleco/Ep+10ku+5xcW4zq/RrhruZCRlX0zKeXzLhg=";
44 ./respect-xml-catalog-files-var.patch
48 substituteInPlace src/firewall/config/__init__.py.in \
49 --replace "/usr/share" "$out/share"
51 for file in config/firewall-{applet,config}.desktop.in; do
52 substituteInPlace $file \
53 --replace "/usr/bin/" "$out/bin/"
55 '' + lib.optionalString withGui ''
56 substituteInPlace src/firewall-applet.in \
57 --replace "/usr/bin/nm-connection-editor" "${networkmanagerapplet}/bin/nm-conenction-editor"
70 python3.pkgs.wrapPython
71 ] ++ lib.optionals withGui [
79 ] ++ lib.optionals withGui [
87 preFixup = lib.optionalString withGui ''
88 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
92 chmod +x $out/share/firewalld/*.py $out/share/firewalld/testsuite/python/*.py $out/share/firewalld/testsuite/{,integration/}testsuite
93 patchShebangs --host $out/share/firewalld/testsuite/{,integration/}testsuite $out/share/firewalld/*.py
94 wrapPythonProgramsIn "$out/bin" "$out ${pythonPath}"
95 wrapPythonProgramsIn "$out/share/firewalld/testsuite/python" "$out ${pythonPath}"
99 description = "Firewall daemon with D-Bus interface";
100 homepage = "https://github.com/firewalld/firewalld";
101 license = licenses.gpl2Plus;