Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions pkgs/applications/virtualization/virt-manager/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{ stdenv, fetchurl, pythonPackages, intltool, libvirt, libxml2Python, curl,
python, makeWrapper, virtinst, pyGtkGlade, pythonDBus, gnome_python, gtkvnc, vte}:
{ stdenv, fetchurl, pythonPackages, intltool, libxml2Python, curl, python
, makeWrapper, virtinst, pyGtkGlade, pythonDBus, gnome_python, gtkvnc, vte
, spiceSupport ? true, spice_gtk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spice_gtk is not present in nixpkgs? you forgot to push this part? is it in some other pull request i'm not seeing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garbas You're right, sorry. I have added and pushed the missing commit now.

Thanks!

}:

with stdenv.lib;

Expand All @@ -18,13 +20,13 @@ stdenv.mkDerivation rec {
paste_deploy m2crypto ipy boto_1_9 twisted sqlalchemy_migrate
distutils_extra simplejson readline glance cheetah lockfile httplib2
# !!! should libvirt be a build-time dependency? Note that
# libxml2Python is a dependency of libvirt.py.
# libxml2Python is a dependency of libvirt.py.
libvirt libxml2Python urlgrabber virtinst pyGtkGlade pythonDBus gnome_python
gtkvnc vte
];
] ++ optional spiceSupport spice_gtk;

buildInputs =
[ pythonPackages.python
[ pythonPackages.python
pythonPackages.wrapPython
pythonPackages.mox
pythonPackages.urlgrabber
Expand All @@ -36,7 +38,7 @@ stdenv.mkDerivation rec {
] ++ pythonPath;

buildPhase = "make";

nativeBuildInputs = [ makeWrapper pythonPackages.wrapPython ];

# patch the runner script in order to make wrapPythonPrograms work and run the program using a syscall
Expand Down
55 changes: 55 additions & 0 deletions pkgs/development/libraries/spice-gtk/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{ stdenv, fetchurl, pkgconfig, gtk, spice_protocol, intltool, celt_0_5_1
, openssl, pulseaudio, pixman, gobjectIntrospection, libjpeg_turbo, zlib
, cyrus_sasl, python, pygtk, autoconf, automake, libtool }:

with stdenv.lib;

stdenv.mkDerivation rec {
name = "spice-gtk-0.22";

src = fetchurl {
url = "http://www.spice-space.org/download/gtk/${name}.tar.bz2";
sha256 = "0fpsn6qhy9a701lmd4yym6qz6zhpp8xp6vw42al0b4592pcybs85";
};

buildInputs = [
gtk spice_protocol celt_0_5_1 openssl pulseaudio pixman gobjectIntrospection
libjpeg_turbo zlib cyrus_sasl python pygtk
];

nativeBuildInputs = [ pkgconfig intltool libtool autoconf automake ];

NIX_CFLAGS_COMPILE = "-fno-stack-protector";

preConfigure = ''
substituteInPlace gtk/Makefile.am \
--replace '=codegendir pygtk-2.0' '=codegendir pygobject-2.0'

autoreconf -v --force --install
intltoolize -f
'';

configureFlags = [
"--disable-maintainer-mode"
"--with-gtk=2.0"
];

dontDisableStatic = true; # Needed by the coroutine test

enableParallelBuilding = true;

meta = {
description = "A GTK+2 and GTK+3 SPICE widget";
longDescription = ''
spice-gtk is a GTK+2 and GTK+3 SPICE widget. It features glib-based
objects for SPICE protocol parsing and a gtk widget for embedding
the SPICE display into other applications such as virt-manager.
Python bindings are available too.
'';

homepage = http://www.spice-space.org/;
license = licenses.lgpl21;

platforms = platforms.linux;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5735,6 +5735,8 @@ let
inherit (pythonPackages) pyparsing;
};

spice_gtk = callPackage ../development/libraries/spice-gtk { };

spice_protocol = callPackage ../development/libraries/spice-protocol { };

sratom = callPackage ../development/libraries/audio/sratom { };
Expand Down
24 changes: 23 additions & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8195,7 +8195,29 @@ pythonPackages = modules // import ./python-packages-generated.nix {
description = "A logging replacement for Python";
license = pkgs.lib.licenses.bsd3;
};
};
};

libvirt = pkgs.stdenv.mkDerivation rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't you use buildPythonPackage here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried, but the derivation ended up with no files in it:

# find /nix/store/b010qffb8hk103q172qzw6k9gdxzblyb-python2.7-libvirt-python-1.2.0
/nix/store/b010qffb8hk103q172qzw6k9gdxzblyb-python2.7-libvirt-python-1.2.0
/nix/store/b010qffb8hk103q172qzw6k9gdxzblyb-python2.7-libvirt-python-1.2.0/lib
/nix/store/b010qffb8hk103q172qzw6k9gdxzblyb-python2.7-libvirt-python-1.2.0/lib/python2.7
/nix/store/b010qffb8hk103q172qzw6k9gdxzblyb-python2.7-libvirt-python-1.2.0/lib/python2.7/site-packages
/nix/store/b010qffb8hk103q172qzw6k9gdxzblyb-python2.7-libvirt-python-1.2.0/nix-support
/nix/store/b010qffb8hk103q172qzw6k9gdxzblyb-python2.7-libvirt-python-1.2.0/nix-support/propagated-native-build-inputs

name = "libvirt-python-${version}";
version = "1.2.0";

src = fetchurl {
url = "http://libvirt.org/sources/python/${name}.tar.gz";
sha256 = "0azml1yv9iqnpj4sdg1wwsa70q7kb06lv85p63qwyd8vrd0y7rrg";
};

buildInputs = [ python pkgs.pkgconfig pkgs.libvirt lxml ];

buildPhase = "python setup.py build";

installPhase = "python setup.py install --prefix=$out";

meta = {
homepage = http://www.libvirt.org/;
description = "libvirt Python bindings";
license = "LGPLv2";
};
};

# python2.7 specific eggs
} // pkgs.lib.optionalAttrs (python.majorVersion == "2.7") {
Expand Down