2024-04-26 20:24:03 +00:00
|
|
|
{ lib, fetchFromGitHub, python3, intltool, file, wrapGAppsHook3, gtk-vnc
|
2022-03-11 20:22:16 +00:00
|
|
|
, vte, avahi, dconf, gobject-introspection, libvirt-glib, system-libvirt
|
2023-11-15 19:58:17 +00:00
|
|
|
, gsettings-desktop-schemas, gst_all_1, libosinfo, gnome, gtksourceview4, docutils, cpio
|
2022-04-18 17:29:18 +00:00
|
|
|
, e2fsprogs, findutils, gzip, cdrtools, xorriso, fetchpatch
|
2023-06-26 13:53:42 +00:00
|
|
|
, desktopToDarwinBundle, stdenv
|
2018-02-25 02:23:58 +00:00
|
|
|
, spiceSupport ? true, spice-gtk ? null
|
2014-01-10 19:43:55 +00:00
|
|
|
}:
|
2012-05-06 19:25:01 +00:00
|
|
|
|
2022-03-11 20:22:16 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2019-11-21 11:30:20 +00:00
|
|
|
pname = "virt-manager";
|
2022-09-11 06:31:32 +00:00
|
|
|
version = "4.1.0";
|
2012-07-20 23:27:24 +00:00
|
|
|
|
2022-03-11 20:22:16 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-09-11 06:31:32 +00:00
|
|
|
hash = "sha256-UgZ58WLXq0U3EDt4311kv0kayVU17In4kwnQ+QN1E7A=";
|
2012-05-06 19:25:01 +00:00
|
|
|
};
|
|
|
|
|
2024-01-07 00:48:56 +00:00
|
|
|
patches = [
|
|
|
|
# refresh Fedora tree URLs in virt-install-osinfo* expected XMLs
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/virt-manager/virt-manager/commit/6e5c1db6b4a0af96afeb09a09fb2fc2b73308f01.patch";
|
|
|
|
hash = "sha256-zivVo6nHvfB7aHadOouQZCBXn5rY12nxFjQ4FFwjgZI=";
|
|
|
|
})
|
2024-01-29 21:33:35 +00:00
|
|
|
# fix test with libvirt 10
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/virt-manager/virt-manager/commit/83fcc5b2e8f2cede84564387756fe8971de72188.patch";
|
|
|
|
hash = "sha256-yEk+md5EkwYpP27u3E+oTJ8thgtH2Uy1x3JIWPBhqeE=";
|
|
|
|
})
|
2024-01-07 00:48:56 +00:00
|
|
|
];
|
|
|
|
|
2018-01-11 18:42:18 +00:00
|
|
|
nativeBuildInputs = [
|
2019-07-12 20:19:28 +00:00
|
|
|
intltool file
|
2018-12-02 11:41:15 +00:00
|
|
|
gobject-introspection # for setup hook populating GI_TYPELIB_PATH
|
2020-10-12 16:41:33 +00:00
|
|
|
docutils
|
2024-04-26 20:24:03 +00:00
|
|
|
wrapGAppsHook3
|
2023-08-30 18:44:54 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle;
|
2017-03-28 17:13:39 +00:00
|
|
|
|
2019-03-12 21:29:45 +00:00
|
|
|
buildInputs = [
|
2023-11-15 19:58:17 +00:00
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
gst_all_1.gst-plugins-good
|
2021-05-07 21:18:14 +00:00
|
|
|
libvirt-glib vte dconf gtk-vnc gnome.adwaita-icon-theme avahi
|
2019-07-12 20:19:07 +00:00
|
|
|
gsettings-desktop-schemas libosinfo gtksourceview4
|
2023-08-30 18:44:54 +00:00
|
|
|
] ++ lib.optional spiceSupport spice-gtk;
|
2012-07-20 23:27:24 +00:00
|
|
|
|
2022-03-11 20:22:16 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2022-05-30 04:06:35 +00:00
|
|
|
pygobject3 libvirt libxml2 requests cdrtools
|
2021-05-29 00:46:48 +00:00
|
|
|
];
|
2012-05-06 19:25:01 +00:00
|
|
|
|
2022-05-30 04:06:35 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's|/usr/share/libvirt/cpu_map.xml|${system-libvirt}/share/libvirt/cpu_map.xml|g' virtinst/capabilities.py
|
|
|
|
sed -i "/'install_egg_info'/d" setup.py
|
|
|
|
'';
|
|
|
|
|
2015-11-20 12:48:30 +00:00
|
|
|
postConfigure = ''
|
2022-03-11 20:22:16 +00:00
|
|
|
${python3.interpreter} setup.py configure --prefix=$out
|
virt-manager: update to 1.0.1, fix & update dependencies, gtk3 support
- Vte, add gtk3 support, enable introspection, update to 0.35.90
- Spice-gtk, add gtk3 support
- gtk-vnc, add gtk3 support
- Add libvirt-glib (thanks @bjornfor)
- Add usbredir
- qemu, enable usbredir
- spice-gtk, enable usbredir
- virt-manager, update to 1.0.1
[Bjørn:
* Set namePrefix = "" to preserve package name "virt-manager"
(instead of "python2.7-virt-manager")
* Add dconf to GIO_EXTRA_MODULES to get persistent settings in
virt-manager. Without it:
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
* Add ${gtk3}/share to XDG_DATA_DIRS to unbreak "Take Screenshot"
feature (fixes "Settings schema 'org.gtk.Settings.FileChooser' is not installed")
* gtk-vnc: don't pull "pkgs" attrset for optionalString, use stdenv.lib.optionalString instead.
]
2014-03-23 17:12:07 +00:00
|
|
|
'';
|
2012-05-06 19:25:01 +00:00
|
|
|
|
2022-03-11 20:22:16 +00:00
|
|
|
setupPyGlobalFlags = [ "--no-update-icon-cache" "--no-compile-schemas" ];
|
2019-07-12 20:19:28 +00:00
|
|
|
|
2021-12-10 22:27:03 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
|
2017-06-04 14:58:13 +00:00
|
|
|
preFixup = ''
|
2022-03-12 22:13:21 +00:00
|
|
|
glib-compile-schemas $out/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas
|
2022-03-11 20:22:16 +00:00
|
|
|
|
2017-06-04 14:58:13 +00:00
|
|
|
gappsWrapperArgs+=(--set PYTHONPATH "$PYTHONPATH")
|
2018-05-13 17:58:10 +00:00
|
|
|
# these are called from virt-install in initrdinject.py
|
2022-05-30 04:06:35 +00:00
|
|
|
gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ cpio e2fsprogs file findutils gzip ]}")
|
2021-12-10 22:27:03 +00:00
|
|
|
|
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
2022-08-06 13:46:30 +00:00
|
|
|
|
|
|
|
# Fixes testCLI0051virt_install_initrd_inject on Darwin: "cpio: root:root: invalid group"
|
|
|
|
substituteInPlace virtinst/install/installerinject.py \
|
|
|
|
--replace "'--owner=root:root'" "'--owner=0:0'"
|
2017-06-04 14:58:13 +00:00
|
|
|
'';
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2024-03-27 16:12:26 +00:00
|
|
|
pytest7CheckHook
|
2022-03-14 03:59:50 +00:00
|
|
|
cpio
|
|
|
|
cdrtools
|
|
|
|
xorriso
|
|
|
|
];
|
2021-05-20 17:49:22 +00:00
|
|
|
|
2022-03-14 03:59:50 +00:00
|
|
|
disabledTests = [
|
2022-03-14 18:04:45 +00:00
|
|
|
"testAlterDisk"
|
|
|
|
"test_misc_nonpredicatble_generate"
|
2022-09-11 06:31:32 +00:00
|
|
|
"test_disk_dir_searchable" # does something strange with permissions
|
|
|
|
"testCLI0001virt_install_many_devices" # expects /var to exist
|
2022-03-12 21:39:20 +00:00
|
|
|
];
|
2021-05-20 17:49:22 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
2024-01-07 00:48:56 +00:00
|
|
|
export HOME=$(mktemp -d)
|
2021-05-20 17:49:22 +00:00
|
|
|
''; # <- Required for "tests/test_urldetect.py".
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
$out/bin/virt-manager --version | grep -Fw ${version} > /dev/null
|
|
|
|
'';
|
virt-manager: update to 1.0.1, fix & update dependencies, gtk3 support
- Vte, add gtk3 support, enable introspection, update to 0.35.90
- Spice-gtk, add gtk3 support
- gtk-vnc, add gtk3 support
- Add libvirt-glib (thanks @bjornfor)
- Add usbredir
- qemu, enable usbredir
- spice-gtk, enable usbredir
- virt-manager, update to 1.0.1
[Bjørn:
* Set namePrefix = "" to preserve package name "virt-manager"
(instead of "python2.7-virt-manager")
* Add dconf to GIO_EXTRA_MODULES to get persistent settings in
virt-manager. Without it:
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
* Add ${gtk3}/share to XDG_DATA_DIRS to unbreak "Take Screenshot"
feature (fixes "Settings schema 'org.gtk.Settings.FileChooser' is not installed")
* gtk-vnc: don't pull "pkgs" attrset for optionalString, use stdenv.lib.optionalString instead.
]
2014-03-23 17:12:07 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2023-10-30 20:41:44 +00:00
|
|
|
homepage = "https://virt-manager.org";
|
2013-10-06 09:49:53 +00:00
|
|
|
description = "Desktop user interface for managing virtual machines";
|
|
|
|
longDescription = ''
|
|
|
|
The virt-manager application is a desktop user interface for managing
|
|
|
|
virtual machines through libvirt. It primarily targets KVM VMs, but also
|
|
|
|
manages Xen and LXC (linux containers).
|
|
|
|
'';
|
virt-manager: update to 1.0.1, fix & update dependencies, gtk3 support
- Vte, add gtk3 support, enable introspection, update to 0.35.90
- Spice-gtk, add gtk3 support
- gtk-vnc, add gtk3 support
- Add libvirt-glib (thanks @bjornfor)
- Add usbredir
- qemu, enable usbredir
- spice-gtk, enable usbredir
- virt-manager, update to 1.0.1
[Bjørn:
* Set namePrefix = "" to preserve package name "virt-manager"
(instead of "python2.7-virt-manager")
* Add dconf to GIO_EXTRA_MODULES to get persistent settings in
virt-manager. Without it:
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
* Add ${gtk3}/share to XDG_DATA_DIRS to unbreak "Take Screenshot"
feature (fixes "Settings schema 'org.gtk.Settings.FileChooser' is not installed")
* gtk-vnc: don't pull "pkgs" attrset for optionalString, use stdenv.lib.optionalString instead.
]
2014-03-23 17:12:07 +00:00
|
|
|
license = licenses.gpl2;
|
2022-08-06 13:46:30 +00:00
|
|
|
platforms = platforms.unix;
|
2023-08-26 12:03:52 +00:00
|
|
|
mainProgram = "virt-manager";
|
2019-08-20 17:36:05 +00:00
|
|
|
maintainers = with maintainers; [ qknight offline fpletz globin ];
|
2012-05-06 19:25:01 +00:00
|
|
|
};
|
2012-07-20 23:27:24 +00:00
|
|
|
}
|