From 0fd439982dcae934363f7b1c164033cf0ec52aa1 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 6 Aug 2022 15:46:30 +0200 Subject: [PATCH] virt-manager: fix build on darwin --- .../virtualization/virt-manager/default.nix | 7 +++++-- pkgs/tools/admin/gtk-vnc/default.nix | 10 ++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix index 272e10318ef6..65bd4bcecb44 100644 --- a/pkgs/applications/virtualization/virt-manager/default.nix +++ b/pkgs/applications/virtualization/virt-manager/default.nix @@ -64,6 +64,10 @@ python3.pkgs.buildPythonApplication rec { gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ cpio e2fsprogs file findutils gzip ]}") makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + + # Fixes testCLI0051virt_install_initrd_inject on Darwin: "cpio: root:root: invalid group" + substituteInPlace virtinst/install/installerinject.py \ + --replace "'--owner=root:root'" "'--owner=0:0'" ''; checkInputs = with python3.pkgs; [ @@ -95,8 +99,7 @@ python3.pkgs.buildPythonApplication rec { manages Xen and LXC (linux containers). ''; license = licenses.gpl2; - # exclude Darwin since libvirt-glib currently doesn't build there - platforms = platforms.linux; + platforms = platforms.unix; maintainers = with maintainers; [ qknight offline fpletz globin ]; }; } diff --git a/pkgs/tools/admin/gtk-vnc/default.nix b/pkgs/tools/admin/gtk-vnc/default.nix index f4c4b0facde1..0f649a6948f4 100644 --- a/pkgs/tools/admin/gtk-vnc/default.nix +++ b/pkgs/tools/admin/gtk-vnc/default.nix @@ -9,6 +9,7 @@ , glib , pkg-config , cyrus_sasl +, pulseaudioSupport ? stdenv.isLinux , libpulseaudio , libgcrypt , gtk3 @@ -51,8 +52,13 @@ stdenv.mkDerivation rec { glib libgcrypt cyrus_sasl - libpulseaudio gtk3 + ] ++ lib.optionals pulseaudioSupport [ + libpulseaudio + ]; + + mesonFlags = lib.optionals (!pulseaudioSupport) [ + "-Dpulseaudio=disabled" ]; passthru = { @@ -67,6 +73,6 @@ stdenv.mkDerivation rec { homepage = "https://wiki.gnome.org/Projects/gtk-vnc"; license = licenses.lgpl2Plus; maintainers = with maintainers; [ raskin offline ]; - platforms = platforms.linux; + platforms = platforms.unix; }; }