-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
virt-manager: Fix 'ImportError: No module named libvirt' and add Spice support #1475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why don't you use
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried, but the derivation ended up with no files in it: |
||
| 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") { | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!