tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
firewalld: init at 1.1.1
Sandro Jäckel
3 years ago
aeeb5ebd
cecb014d
+121
3 changed files
expand all
collapse all
unified
split
pkgs
applications
networking
firewalld
default.nix
respect-xml-catalog-files-var.patch
top-level
all-packages.nix
+104
pkgs/applications/networking/firewalld/default.nix
···
1
1
+
{ lib
2
2
+
, stdenv
3
3
+
, fetchFromGitHub
4
4
+
, autoreconfHook
5
5
+
, bash
6
6
+
, docbook_xml_dtd_42
7
7
+
, docbook-xsl-nons
8
8
+
, glib
9
9
+
, gobject-introspection
10
10
+
, gtk3
11
11
+
, intltool
12
12
+
, libnotify
13
13
+
, libxml2
14
14
+
, libxslt
15
15
+
, networkmanager-applet
16
16
+
, pkg-config
17
17
+
, python3
18
18
+
, wrapGAppsNoGuiHook
19
19
+
, withGui ? false
20
20
+
}:
21
21
+
22
22
+
let
23
23
+
pythonPath = python3.withPackages (ps: with ps; [
24
24
+
dbus-python
25
25
+
nftables
26
26
+
pygobject3
27
27
+
] ++ lib.optionals withGui [
28
28
+
pyqt5
29
29
+
pyqt5_sip
30
30
+
]);
31
31
+
in
32
32
+
stdenv.mkDerivation rec {
33
33
+
pname = "firewalld";
34
34
+
version = "1.1.1";
35
35
+
36
36
+
src = fetchFromGitHub {
37
37
+
owner = "firewalld";
38
38
+
repo = "firewalld";
39
39
+
rev = "v${version}";
40
40
+
sha256 = "sha256-w8TbovIhOhJAUZWbKdBd/+db8Hro/ttlxWZDcrCXX4Q=";
41
41
+
};
42
42
+
43
43
+
patches = [
44
44
+
./respect-xml-catalog-files-var.patch
45
45
+
];
46
46
+
47
47
+
postPatch = ''
48
48
+
substituteInPlace src/firewall/config/__init__.py.in \
49
49
+
--replace "/usr/share" "$out/share"
50
50
+
51
51
+
for file in config/firewall-{applet,config}.desktop.in; do
52
52
+
substituteInPlace $file \
53
53
+
--replace "/usr/bin/" "$out/bin/"
54
54
+
done
55
55
+
'' + lib.optionalString withGui ''
56
56
+
substituteInPlace src/firewall-applet.in \
57
57
+
--replace "/usr/bin/nm-connection-editor" "${networkmanager-applet}/bin/nm-conenction-editor"
58
58
+
'';
59
59
+
60
60
+
nativeBuildInputs = [
61
61
+
autoreconfHook
62
62
+
docbook_xml_dtd_42
63
63
+
docbook-xsl-nons
64
64
+
glib
65
65
+
intltool
66
66
+
libxml2
67
67
+
libxslt
68
68
+
pkg-config
69
69
+
python3
70
70
+
python3.pkgs.wrapPython
71
71
+
] ++ lib.optionals withGui [
72
72
+
gobject-introspection
73
73
+
wrapGAppsNoGuiHook
74
74
+
];
75
75
+
76
76
+
buildInputs = [
77
77
+
bash
78
78
+
glib
79
79
+
] ++ lib.optionals withGui [
80
80
+
gtk3
81
81
+
libnotify
82
82
+
pythonPath
83
83
+
];
84
84
+
85
85
+
dontWrapGApps = true;
86
86
+
87
87
+
preFixup = lib.optionalString withGui ''
88
88
+
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
89
89
+
'';
90
90
+
91
91
+
postFixup = ''
92
92
+
chmod +x $out/share/firewalld/*.py $out/share/firewalld/testsuite/python/*.py $out/share/firewalld/testsuite/{,integration/}testsuite
93
93
+
patchShebangs --host $out/share/firewalld/testsuite/{,integration/}testsuite $out/share/firewalld/*.py
94
94
+
wrapPythonProgramsIn "$out/bin" "$out ${pythonPath}"
95
95
+
wrapPythonProgramsIn "$out/share/firewalld/testsuite/python" "$out ${pythonPath}"
96
96
+
'';
97
97
+
98
98
+
meta = with lib; {
99
99
+
description = "Firewall daemon with D-Bus interface";
100
100
+
homepage = "https://github.com/firewalld/firewalld";
101
101
+
license = licenses.gpl2Plus;
102
102
+
maintainers = with maintainers; [ SuperSandro2000 ];
103
103
+
};
104
104
+
}
+13
pkgs/applications/networking/firewalld/respect-xml-catalog-files-var.patch
···
1
1
+
--- a/m4/jh_path_xml_catalog.m4
2
2
+
+++ b/m4/jh_path_xml_catalog.m4
3
3
+
@@ -40,8 +40,8 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
4
4
+
[
5
5
+
AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
6
6
+
AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
7
7
+
- if $jh_found_xmlcatalog && \
8
8
+
- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
9
9
+
+ # empty argument forces libxml to use XML_CATALOG_FILES variable
10
10
+
+ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then
11
11
+
AC_MSG_RESULT([found])
12
12
+
ifelse([$3],,,[$3
13
13
+
])dnl
+4
pkgs/top-level/all-packages.nix
···
26031
26031
inherit (darwin.apple_sdk.frameworks) Security;
26032
26032
};
26033
26033
26034
26034
+
firewalld = callPackage ../applications/networking/firewalld { };
26035
26035
+
26036
26036
+
firewalld-gui = firewalld.override { withGui = true; };
26037
26037
+
26034
26038
flacon = libsForQt5.callPackage ../applications/audio/flacon { };
26035
26039
26036
26040
flexget = callPackage ../applications/networking/flexget { };