about summary refs log tree commit diff
path: root/pkgs/applications/virtualization
diff options
context:
space:
mode:
authorBernardo Meurer <bernardo@meurer.org>2022-03-11 12:22:16 -0800
committerBernardo Meurer <bernardo@meurer.org>2022-03-11 16:15:32 -0800
commitb46d276bbea10aca61be2df1d2ab47ade50b92d7 (patch)
treef72e2d6f1b0b5c89c1259fc0673012c088760638 /pkgs/applications/virtualization
parentfcc7311dc7567993a6ef84d61a2fbd4532bbabda (diff)
downloadnixlib-b46d276bbea10aca61be2df1d2ab47ade50b92d7.tar
nixlib-b46d276bbea10aca61be2df1d2ab47ade50b92d7.tar.gz
nixlib-b46d276bbea10aca61be2df1d2ab47ade50b92d7.tar.bz2
nixlib-b46d276bbea10aca61be2df1d2ab47ade50b92d7.tar.lz
nixlib-b46d276bbea10aca61be2df1d2ab47ade50b92d7.tar.xz
nixlib-b46d276bbea10aca61be2df1d2ab47ade50b92d7.tar.zst
nixlib-b46d276bbea10aca61be2df1d2ab47ade50b92d7.zip
virt-manager: 3.2.0 -> 4.0.0
Diffstat (limited to 'pkgs/applications/virtualization')
-rw-r--r--pkgs/applications/virtualization/virt-manager/default.nix34
1 files changed, 18 insertions, 16 deletions
diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix
index fb62a0d2e11a..4fd30b367524 100644
--- a/pkgs/applications/virtualization/virt-manager/default.nix
+++ b/pkgs/applications/virtualization/virt-manager/default.nix
@@ -1,22 +1,21 @@
-{ lib, fetchurl, python3Packages, intltool, file
-, wrapGAppsHook, gtk-vnc, vte, avahi, dconf
-, gobject-introspection, libvirt-glib, system-libvirt
-, gsettings-desktop-schemas, libosinfo, gnome
-, gtksourceview4, docutils
+{ lib, fetchFromGitHub, python3, intltool, file, wrapGAppsHook, gtk-vnc
+, vte, avahi, dconf, gobject-introspection, libvirt-glib, system-libvirt
+, gsettings-desktop-schemas, libosinfo, gnome, gtksourceview4, docutils, cpio
+, e2fsprogs, findutils, gzip, cdrtools
 , spiceSupport ? true, spice-gtk ? null
-, cpio, e2fsprogs, findutils, gzip
-, cdrtools
 }:
 
 with lib;
 
-python3Packages.buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "virt-manager";
-  version = "3.2.0";
+  version = "4.0.0";
 
-  src = fetchurl {
-    url = "https://releases.pagure.org/virt-manager/${pname}-${version}.tar.gz";
-    sha256 = "11kvpzcmyir91qz0dsnk7748jbb4wr8mrc744w117qc91pcy6vrb";
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-3ycXNBuf91kI2cJCRw0ZzaWkaIVwb/lmkOKeHNwpH9Y=";
   };
 
   nativeBuildInputs = [
@@ -32,7 +31,7 @@ python3Packages.buildPythonApplication rec {
     gobject-introspection # Temporary fix, see https://github.com/NixOS/nixpkgs/issues/56943
   ] ++ optional spiceSupport spice-gtk;
 
-  propagatedBuildInputs = with python3Packages; [
+  propagatedBuildInputs = with python3.pkgs; [
     pygobject3 ipaddress libvirt libxml2 requests cdrtools
   ];
 
@@ -42,14 +41,17 @@ python3Packages.buildPythonApplication rec {
   '';
 
   postConfigure = ''
-    ${python3Packages.python.interpreter} setup.py configure --prefix=$out
+    ${python3.interpreter} setup.py configure --prefix=$out
   '';
 
-  setupPyGlobalFlags = [ "--no-update-icon-cache" ];
+  setupPyGlobalFlags = [ "--no-update-icon-cache" "--no-compile-schemas" ];
 
   dontWrapGApps = true;
 
   preFixup = ''
+    mkdir -p $out/share/glib-2.0/schemas
+    cp $src/data/*.gschema.xml $out/share/glib-2.0/schemas/
+
     gappsWrapperArgs+=(--set PYTHONPATH "$PYTHONPATH")
     # these are called from virt-install in initrdinject.py
     gappsWrapperArgs+=(--prefix PATH : "${makeBinPath [ cpio e2fsprogs file findutils gzip ]}")
@@ -57,7 +59,7 @@ python3Packages.buildPythonApplication rec {
     makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
   '';
 
-  checkInputs = with python3Packages; [ cpio cdrtools pytestCheckHook ];
+  checkInputs = with python3.pkgs; [ cpio cdrtools pytestCheckHook ];
 
   disabledTestPaths = [
     "tests/test_cli.py"