git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #64627 from aske/virtman-fix

Fix virt-manager on non-gnome systems

commit7803ff314c707ee11a6d8d1c9ac4cde70737d22e authorJaka Hudoklin <offlinehacker@users.noreply.github.com> dateSat 13 Jul 2019, 08:00 (7 years ago) parentf93c5de2df33c4
3 files changed+19−7
pkgs/applications/virtualization/virt-manager/default.nix+15−5 pkgs/applications/virtualization/virt-viewer/default.nix−1 pkgs/development/libraries/spice-gtk/default.nix+4−1
pkgs/applications/virtualization/virt-manager/default.nix+15−5
@@ -1,13 +1,18 @@
11{ stdenv, fetchurl, python3Packages, intltool, file
22, wrapGAppsHook, gtk-vnc, vte, avahi, dconf
33, gobject-introspection, libvirt-glib, system-libvirt
4−, gsettings-desktop-schemas, glib, libosinfo, gnome3, gtk3
4+, gsettings-desktop-schemas, glib, libosinfo, gnome3
5+, gtksourceview4
56, spiceSupport ? true, spice-gtk ? null
67, cpio, e2fsprogs, findutils, gzip
78}:
89
910with stdenv.lib;
1011
12+# TODO: remove after there's support for setupPyDistFlags
13+let
14+ setuppy = ../../../development/interpreters/python/run_setup.py;
15+in
1116python3Packages.buildPythonApplication rec {
1217 name = "virt-manager-${version}";
1318 version = "2.2.0";
@@ -19,13 +24,14 @@ python3Packages.buildPythonApplication rec {
1924 };
2025
2126 nativeBuildInputs = [
22− wrapGAppsHook intltool file
27+ intltool file
2328 gobject-introspection # for setup hook populating GI_TYPELIB_PATH
2429 ];
2530
2631 buildInputs = [
32+ wrapGAppsHook
2733 libvirt-glib vte dconf gtk-vnc gnome3.adwaita-icon-theme avahi
28− gsettings-desktop-schemas libosinfo gtk3
34+ gsettings-desktop-schemas libosinfo gtksourceview4
2935 gobject-introspection # Temporary fix, see https://github.com/NixOS/nixpkgs/issues/56943
3036 ] ++ optional spiceSupport spice-gtk;
3137
@@ -43,8 +49,12 @@ python3Packages.buildPythonApplication rec {
4349 ${python3Packages.python.interpreter} setup.py configure --prefix=$out
4450 '';
4551
46− postInstall = ''
47− ${glib.dev}/bin/glib-compile-schemas "$out"/share/glib-2.0/schemas
52+ # TODO: remove after there's support for setupPyDistFlags
53+ buildPhase = ''
54+ runHook preBuild
55+ cp ${setuppy} nix_run_setup
56+ ${python3Packages.python.pythonForBuild.interpreter} nix_run_setup --no-update-icon-cache build_ext bdist_wheel
57+ runHook postBuild
4858 '';
4959
5060 preFixup = ''
pkgs/applications/virtualization/virt-viewer/default.nix−1
@@ -30,7 +30,6 @@ stdenv.mkDerivation rec {
3030 xen
3131 ] ++ optionals spiceSupport [
3232 spice-gtk spice-protocol libcap gdbm
33− gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good
3433 ];
3534
3635 # Required for USB redirection PolicyKit rules file
pkgs/development/libraries/spice-gtk/default.nix+4−1
@@ -87,10 +87,13 @@ stdenv.mkDerivation rec {
8787 vala
8888 ];
8989
90+ propagatedBuildInputs = [
91+ gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good
92+ ];
93+
9094 buildInputs = [
9195 cyrus_sasl
9296 epoxy
93− gst_all_1.gst-plugins-base
9497 gtk3
9598 json-glib
9699 libcacard