summary refs log tree commit diff
diff options
context:
space:
mode:
author7c6f434c <7c6f434c@mail.ru>2022-02-20 10:48:04 +0000
committerGitHub <noreply@github.com>2022-02-20 10:48:04 +0000
commit4870e97e9d22a63d8afabfd2030a1e411a91ac2b (patch)
treee3e2f162bd1a77a92ee08e85359276f6f916702a
parentea614de51a745aae32cec8a37cc48bbad94e027c (diff)
parenta6b058e0fac70144041029ba3e2de7e44efcecba (diff)
Merge pull request #160074 from amarshall/virt-viewer-11
virt-viewer: 9.0 -> 11; libgovirt: init at 0.3.8
-rw-r--r--maintainers/maintainer-list.nix6
-rw-r--r--pkgs/applications/virtualization/libgovirt/default.nix39
-rw-r--r--pkgs/applications/virtualization/virt-viewer/default.nix74
-rw-r--r--pkgs/top-level/all-packages.nix2
4 files changed, 109 insertions, 12 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 541de28d7b233..e8108a3ec6d72 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -601,6 +601,12 @@
     githubId = 15623522;
     name = "Amar Paul";
   };
+  amarshall = {
+    email = "andrew@johnandrewmarshall.com";
+    github = "amarshall";
+    githubId = 153175;
+    name = "Andrew Marshall";
+  };
   ambroisie = {
     email = "bruno.nixpkgs@belanyi.fr";
     github = "ambroisie";
diff --git a/pkgs/applications/virtualization/libgovirt/default.nix b/pkgs/applications/virtualization/libgovirt/default.nix
new file mode 100644
index 0000000000000..bd92f7666abf9
--- /dev/null
+++ b/pkgs/applications/virtualization/libgovirt/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchurl
+, glib
+, librest
+, libsoup
+, pkg-config
+}:
+
+with lib;
+
+stdenv.mkDerivation rec {
+  pname = "libgovirt";
+  version = "0.3.8";
+
+  src = fetchurl {
+    url = "https://download.gnome.org/sources/libgovirt/0.3/${pname}-${version}.tar.xz";
+    sha256 = "sha256-HckYYikXa9+p8l/Y+oLAoFi2pgwcyAfHUH7IqTwPHfg=";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  propagatedBuildInputs = [
+    librest
+    libsoup
+  ];
+
+  meta = {
+    homepage = "https://gitlab.gnome.org/GNOME/libgovirt";
+    description = "GObject wrapper for the oVirt REST API";
+    maintainers = [ maintainers.amarshall ];
+    platforms = platforms.linux;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/pkgs/applications/virtualization/virt-viewer/default.nix b/pkgs/applications/virtualization/virt-viewer/default.nix
index 4fd56e0cae335..29e05a069ce7f 100644
--- a/pkgs/applications/virtualization/virt-viewer/default.nix
+++ b/pkgs/applications/virtualization/virt-viewer/default.nix
@@ -1,36 +1,86 @@
-{ lib, stdenv, fetchurl, pkg-config, intltool, shared-mime-info, wrapGAppsHook
-, glib, gsettings-desktop-schemas, gtk-vnc, gtk3, libvirt, libvirt-glib, libxml2, vte
+{ lib
+, stdenv
+, bash-completion
+, fetchurl
+, gdbm ? null
+, glib
+, gsettings-desktop-schemas
+, gtk-vnc
+, gtk3
+, intltool
+, libcap ? null
+, libgovirt
+, libvirt
+, libvirt-glib
+, libxml2
+, meson
+, ninja
+, pkg-config
+, python3
+, shared-mime-info
+, spice-gtk ? null
+, spice-protocol ? null
 , spiceSupport ? true
-, spice-gtk ? null, spice-protocol ? null, libcap ? null, gdbm ? null
+, vte
+, wrapGAppsHook
 }:
 
-assert spiceSupport ->
-  spice-gtk != null && spice-protocol != null && libcap != null && gdbm != null;
+assert spiceSupport -> (
+  gdbm != null
+  && libcap != null
+  && spice-gtk != null
+  && spice-protocol != null
+);
 
 with lib;
 
 stdenv.mkDerivation rec {
   baseName = "virt-viewer";
-  version = "9.0";
+  version = "11.0";
   name = "${baseName}-${version}";
 
   src = fetchurl {
-    url = "http://virt-manager.org/download/sources/${baseName}/${name}.tar.gz";
-    sha256 = "09a83mzyn3b4nd7wpa659g1zf1fjbzb79rk968bz6k5xl21k7d4i";
+    url = "http://virt-manager.org/download/sources/${baseName}/${name}.tar.xz";
+    sha256 = "sha256-pD+iMlxMHHelyMmAZaww7wURohrJjlkPIjQIabrZq9A=";
   };
 
-  nativeBuildInputs = [ pkg-config intltool shared-mime-info wrapGAppsHook glib ];
+  nativeBuildInputs = [
+    glib
+    intltool
+    meson
+    ninja
+    pkg-config
+    python3
+    shared-mime-info
+    wrapGAppsHook
+  ];
+
   buildInputs = [
-    glib gsettings-desktop-schemas gtk-vnc gtk3 libvirt libvirt-glib libxml2 vte
+    bash-completion
+    glib
+    gsettings-desktop-schemas
+    gtk-vnc
+    gtk3
+    libgovirt
+    libvirt
+    libvirt-glib
+    libxml2
+    vte
   ] ++ optionals spiceSupport [
-    spice-gtk spice-protocol libcap gdbm
+    gdbm
+    libcap
+    spice-gtk
+    spice-protocol
   ];
 
   # Required for USB redirection PolicyKit rules file
   propagatedUserEnvPkgs = optional spiceSupport spice-gtk;
 
   strictDeps = true;
-  enableParallelBuilding = true;
+
+  postPatch = ''
+    patchShebangs build-aux/post_install.py
+  '';
 
   meta = {
     description = "A viewer for remote virtual machines";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 6addcf33e2ad0..baaed5612284c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7079,6 +7079,8 @@ with pkgs;
 
   libcsptr = callPackage ../development/libraries/libcsptr { };
 
+  libgovirt = callPackage ../applications/virtualization/libgovirt { };
+
   libscrypt = callPackage ../development/libraries/libscrypt { };
 
   libcloudproviders = callPackage ../development/libraries/libcloudproviders { };