at v206 50 lines 1.5 kB view raw
1{ stdenv, fetchurl, pkgconfig, intltool, glib, libxml2, gtk3, gtkvnc, gmp 2, libgcrypt, gnupg, cyrus_sasl, shared_mime_info, libvirt, libcap_ng, yajl 3, gsettings_desktop_schemas, makeWrapper 4, spiceSupport ? true, spice_gtk ? null, spice_protocol ? null, libcap ? null, gdbm ? null 5}: 6 7assert spiceSupport -> 8 spice_gtk != null && spice_protocol != null && libcap != null && gdbm != null; 9 10with stdenv.lib; 11 12let sourceInfo = rec { 13 baseName="virt-viewer"; 14 version="2.0"; 15 name="${baseName}-${version}"; 16 url="http://virt-manager.org/download/sources/${baseName}/${name}.tar.gz"; 17 hash="0dylhpk5rq9jz0l1cxs50q2s74z0wingygm1m33bmnmcnny87ig9"; 18}; in 19 20stdenv.mkDerivation { 21 inherit (sourceInfo) name version; 22 23 src = fetchurl { 24 url = sourceInfo.url; 25 sha256 = sourceInfo.hash; 26 }; 27 28 buildInputs = [ 29 pkgconfig intltool glib libxml2 gtk3 gtkvnc gmp libgcrypt gnupg cyrus_sasl 30 shared_mime_info libvirt libcap_ng yajl gsettings_desktop_schemas makeWrapper 31 ] ++ optionals spiceSupport [ spice_gtk spice_protocol libcap gdbm ]; 32 33 postInstall = '' 34 for f in "$out"/bin/*; do 35 wrapProgram "$f" --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" 36 done 37 ''; 38 39 meta = { 40 description = "A viewer for remote virtual machines"; 41 maintainers = [ maintainers.raskin ]; 42 platforms = platforms.linux; 43 license = licenses.gpl2; 44 }; 45 passthru = { 46 updateInfo = { 47 downloadPage = "http://virt-manager.org/download.html"; 48 }; 49 }; 50}