From af9924b92904a8ce6bcef44fa44fbdfe63ea5d5d Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 5 Jun 2012 15:18:34 +0200 Subject: [PATCH 1/4] Add Cython, because it's needed to build xpra. --- .../interpreters/cython/default.nix | 20 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/development/interpreters/cython/default.nix diff --git a/pkgs/development/interpreters/cython/default.nix b/pkgs/development/interpreters/cython/default.nix new file mode 100644 index 000000000000..42dafcb7f2e7 --- /dev/null +++ b/pkgs/development/interpreters/cython/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, python, pkgconfig }: + +stdenv.mkDerivation { + name = "cython-0.16"; + + src = fetchurl { + url = http://www.cython.org/release/Cython-0.16.tar.gz; + sha256 = "1yz6jwv25xx5mbr2nm4l7mi65gvpm63dzi3vrw73p51wbpy525lp"; + }; + + buildPhase = "python setup.py build --build-base $out"; + + installPhase = "python setup.py install --prefix=$out"; + + buildInputs = [ python pkgconfig ]; + + meta = { + description = "An interpreter to help writing C extensions for Python"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e21558ac5117..8777ebc0b3bf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1777,6 +1777,8 @@ let cmucl_binary = callPackage ../development/compilers/cmucl/binary.nix { }; + cython = callPackage ../development/interpreters/cython { }; + dylan = callPackage ../development/compilers/gwydion-dylan { dylan = callPackage ../development/compilers/gwydion-dylan/binary.nix { }; }; From d802bacdd93adf52797e3066b66da62c35a9693d Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 5 Jun 2012 15:19:49 +0200 Subject: [PATCH 2/4] xpra: New version from the fork. This is because the original version is no longer in development, as stated on the website at http://code.google.com/p/partiwm/wiki/xpra: "This project is in deep hibernation; I haven't had time to devote for several years now. If you are looking for xpra, you may prefer Antoine Martin's fork, which receives more support. It is available at: http://xpra.org/" So I guess its safe to switch over to that fork. --- pkgs/tools/X11/xpra/default.nix | 14 ++++++-------- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix index cf7692cc58ac..9fc34a2cf3fd 100644 --- a/pkgs/tools/X11/xpra/default.nix +++ b/pkgs/tools/X11/xpra/default.nix @@ -1,17 +1,15 @@ -{stdenv, fetchurl, pkgconfig, python, pyrex, pygtk, xlibs, gtk, makeWrapper}: +{stdenv, fetchurl, pkgconfig, python, cython, pygtk, xlibs, gtk, ffmpeg, x264, libvpx, makeWrapper}: stdenv.mkDerivation { - name = "xpra-0.0.3"; + name = "xpra-0.3.2"; src = fetchurl { - url = http://partiwm.org/static/downloads/parti-all-0.0.3.tar.gz; - sha256 = "17inksd4cc7mba2vfs17gz1yk3h6x6wf06pm3hcbs5scq8rr5bkp"; + url = http://xpra.org/src/xpra-0.3.2.tar.bz2; + sha256 = "1s1z6r0r78qvf59ci3vxammjz7lj5m64jyk0bfn7yxd5jl3sy41y"; }; - #src = /home/eelco/Dev/nixpkgs/parti-all-0.0.3; - buildInputs = [ - pkgconfig python pyrex pygtk gtk makeWrapper + pkgconfig python cython pygtk gtk ffmpeg x264 libvpx makeWrapper xlibs.inputproto xlibs.libXcomposite xlibs.libXdamage xlibs.libXtst ]; @@ -33,7 +31,7 @@ stdenv.mkDerivation { ''; meta = { - homepage = http://partiwm.org/wiki/xpra; + homepage = http://xpra.org/; description = "Persistent remote applications for X"; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8777ebc0b3bf..fc26ed174d6e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7683,9 +7683,7 @@ let libxpdf = callPackage ../applications/misc/xpdf/libxpdf.nix { }; - xpra = callPackage ../tools/X11/xpra { - pyrex = pyrex095; - }; + xpra = callPackage ../tools/X11/xpra { }; xscreensaver = callPackage ../misc/screensavers/xscreensaver { inherit (gnome) libglade; From 5cf889967374a49f0af8eb974c1d14b255e4fa14 Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 6 Jul 2012 03:33:52 +0200 Subject: [PATCH 3/4] xpra: Don't include cython into store requisites. Cython is not required in order to run XPRA, so we now explicitly specify what should be put into PYTHONPATH instead of using the PYTHONPATH which is set during build time. That way we don't get unnecessary stuff in /nix/store, like the mentioned cython compiler/interpreter. --- pkgs/tools/X11/xpra/default.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix index 9fc34a2cf3fd..a6d0065e8cc1 100644 --- a/pkgs/tools/X11/xpra/default.nix +++ b/pkgs/tools/X11/xpra/default.nix @@ -1,6 +1,8 @@ -{stdenv, fetchurl, pkgconfig, python, cython, pygtk, xlibs, gtk, ffmpeg, x264, libvpx, makeWrapper}: +{ stdenv, fetchurl, pkgconfig, python, cython +, pygtk, pygobject, pycairo, xlibs, gtk +, ffmpeg, x264, libvpx, makeWrapper}: -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "xpra-0.3.2"; src = fetchurl { @@ -8,8 +10,10 @@ stdenv.mkDerivation { sha256 = "1s1z6r0r78qvf59ci3vxammjz7lj5m64jyk0bfn7yxd5jl3sy41y"; }; + buildNativeInputs = [ cython ]; + buildInputs = [ - pkgconfig python cython pygtk gtk ffmpeg x264 libvpx makeWrapper + pkgconfig python pygtk gtk ffmpeg x264 libvpx makeWrapper xlibs.inputproto xlibs.libXcomposite xlibs.libXdamage xlibs.libXtst ]; @@ -19,13 +23,20 @@ stdenv.mkDerivation { ./do-build ''; + pythonPaths = [ + "$out/lib/python" + "$(toPythonPath ${pygtk})/gtk-2.0" + ] ++ map (i: "$(toPythonPath ${i})") [ + pygobject pycairo notify + ]; + installPhase = '' mkdir -p $out cp -r install/* $out for i in $(cd $out/bin && ls); do wrapProgram $out/bin/$i \ - --set PYTHONPATH "$out/lib/python:$(toPythonPath ${pygtk})/gtk-2.0:$PYTHONPATH" \ + --set PYTHONPATH "${stdenv.lib.concatStringsSep ":" pythonPaths}" \ --prefix PATH : "${xlibs.xauth}/bin:${xlibs.xorgserver}/bin:${xlibs.xmodmap}/bin" done ''; From ceff799efcf1380b765c20a8a35d3cdaa26bafcb Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 6 Jul 2012 03:36:15 +0200 Subject: [PATCH 4/4] xpra: Add python notify module. This is not needed to run XPRA, but gets rid of a few nasty errors. XPRA is using the notify library to display nice desktop notifications, so there might be users who actually like to have those funny things. --- pkgs/tools/X11/xpra/default.nix | 2 +- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix index a6d0065e8cc1..3fbb350e0ab0 100644 --- a/pkgs/tools/X11/xpra/default.nix +++ b/pkgs/tools/X11/xpra/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, python, cython -, pygtk, pygobject, pycairo, xlibs, gtk +, pygtk, pygobject, pycairo, notify, xlibs, gtk , ffmpeg, x264, libvpx, makeWrapper}: stdenv.mkDerivation rec { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fc26ed174d6e..3c9a0b51bbeb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7683,7 +7683,9 @@ let libxpdf = callPackage ../applications/misc/xpdf/libxpdf.nix { }; - xpra = callPackage ../tools/X11/xpra { }; + xpra = callPackage ../tools/X11/xpra { + inherit (pythonPackages) notify; + }; xscreensaver = callPackage ../misc/screensavers/xscreensaver { inherit (gnome) libglade;