Open PABLEXWorld opened 4 months ago
Check with this PR - https://github.com/NixOS/nixpkgs/pull/276123
Try to completely rebuild system?
sudo nixos-rebuild boot -I nixpkgs=/.../nixpkgs
I don't know any other simpler variants.
After hacking things together with callPackage
instead of rebuilding the system, the PR got firewalld past this error. Now it's crashing at a later, unrelated stage, and I'll take it from here. Thanks and please get it merged!
firewalld 2.1.2 seems to depend on python nftables 1.0.9 now, but fails to build:
error: builder for '/nix/store/0zyqqxj730k4cc0hpzppbz2hsxs92hvh-python3.11-nftables-1.0.9.drv' failed with exit code 1;
last 10 log lines:
> Using pythonImportsCheckPhase
> Sourcing python-namespaces-hook
> Sourcing python-catch-conflicts-hook.sh
> Running phase: unpackPhase
> unpacking source archive /nix/store/gppnhpfzmz12f61v729b5x5shj09ja8r-nftables-1.0.9.tar.xz
> source root is nftables-1.0.9/py
> setting SOURCE_DATE_EPOCH to timestamp 1697710722 of file nftables-1.0.9/py/Makefile.in
> Running phase: patchPhase
> substitute(): ERROR: file 'py/src/nftables.py' does not exist
> /nix/store/558iw5j1bk7z6wrg8cp96q2rx03jqj1v-stdenv-linux/setup: line 131: pop_var_context: head of shell_variables not a function context
For full logs, run 'nix log /nix/store/0zyqqxj730k4cc0hpzppbz2hsxs92hvh-python3.11-nftables-1.0.9.drv'.
error: 1 dependencies of derivation '/nix/store/fkc0rn7gw3dskapvmr3a5iyhbchc8i7s-python3-3.11.9-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pjpp1ynfpslv368syghw1kfzw2bd6qm9-firewalld-2.1.2.drv' failed to build
[...]
if some is still trying to get it work: with the patch from https://github.com/NixOS/nixpkgs/pull/205380 I got it working
diff --git a/pkgs/applications/networking/firewalld/default.nix b/pkgs/applications/networking/firewalld/default.nix
index 0743e7541..15febb321 100644
--- a/pkgs/applications/networking/firewalld/default.nix
+++ b/pkgs/applications/networking/firewalld/default.nix
@@ -12,9 +12,11 @@
, libnotify
, libxml2
, libxslt
+, networkmanager
, networkmanagerapplet
, pkg-config
, python3
+, wrapQtAppsHook
, wrapGAppsNoGuiHook
, withGui ? false
}:
@@ -46,7 +48,8 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace src/firewall/config/__init__.py.in \
- --replace "/usr/share" "$out/share"
+ --replace "/usr/share" "$out/share" \
+ --replace "/usr/lib/" "$out/lib/"
for file in config/firewall-{applet,config}.desktop.in; do
substituteInPlace $file \
@@ -54,13 +57,14 @@ stdenv.mkDerivation rec {
done
'' + lib.optionalString withGui ''
substituteInPlace src/firewall-applet.in \
- --replace "/usr/bin/nm-connection-editor" "${networkmanagerapplet}/bin/nm-conenction-editor"
+ --replace "/usr/bin/nm-connection-editor" "${networkmanagerapplet}/bin/nm-connection-editor"
'';
nativeBuildInputs = [
autoreconfHook
docbook_xml_dtd_42
docbook-xsl-nons
+ gobject-introspection
glib
intltool
libxml2
@@ -68,14 +72,15 @@ stdenv.mkDerivation rec {
pkg-config
python3
python3.pkgs.wrapPython
- ] ++ lib.optionals withGui [
- gobject-introspection
wrapGAppsNoGuiHook
+ ] ++ lib.optionals withGui [
+ wrapQtAppsHook
];
buildInputs = [
bash
glib
+ networkmanager
] ++ lib.optionals withGui [
gtk3
libnotify
@@ -83,9 +88,12 @@ stdenv.mkDerivation rec {
];
dontWrapGApps = true;
+ dontWrapQtApps = true;
- preFixup = lib.optionalString withGui ''
+ preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
+ '' + lib.optionalString withGui ''
+ makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
postFixup = ''
@@ -95,10 +103,11 @@ stdenv.mkDerivation rec {
wrapPythonProgramsIn "$out/share/firewalld/testsuite/python" "$out ${pythonPath}"
'';
+
meta = with lib; {
description = "Firewall daemon with D-Bus interface";
homepage = "https://github.com/firewalld/firewalld";
+ platforms = platforms.linux;
license = licenses.gpl2Plus;
- maintainers = with maintainers; [ ];
};
-}
+}
\ No newline at end of file
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f52160e15..7398ec567 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -30525,7 +30525,7 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Security;
};
- firewalld = callPackage ../applications/networking/firewalld { };
+ firewalld = libsForQt5.callPackage ../applications/networking/firewalld { };
firewalld-gui = firewalld.override { withGui = true; };
Describe the bug
I am unable to run firewalld because nftables' python package appears to be broken:
Running firewalld manually reveals the error:
After creating the relevant nix config for my Python environment, I can attest that Python is indeed unable to find the module:
Other modules (I tested with termcolor) are working properly.
Steps To Reproduce
Steps to reproduce the behavior:
Notify maintainers
@Izorkin
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.