diff options
author | Aristid Breitkreuz <aristidb@gmail.com> | 2013-08-27 23:10:39 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2013-08-28 21:20:56 +0200 |
commit | 319629355ce16fcfae865385b0d1190ac37534fe (patch) | |
tree | b43464ca1dc8af5cdf6b1fb51d74d3ad942f5a8c /pkgs/os-specific/linux | |
parent | 69c57b92e8a0d33baf1b932b7060789ebd90c0c3 (diff) |
bluez5: fix python programs
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r-- | pkgs/os-specific/linux/bluez/bluez5.nix | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/pkgs/os-specific/linux/bluez/bluez5.nix b/pkgs/os-specific/linux/bluez/bluez5.nix index 8a0a42f100920..c0c87b4947246 100644 --- a/pkgs/os-specific/linux/bluez/bluez5.nix +++ b/pkgs/os-specific/linux/bluez/bluez5.nix @@ -1,13 +1,9 @@ -{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, python, makeWrapper -, pythonDBus, pygobject, readline, libsndfile, udev, libical, systemd }: +{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, python, + pythonPackages, pythonDBus, readline, libsndfile, udev, libical, + systemd }: assert stdenv.isLinux; -let - pythonpath = "${pythonDBus}/lib/${python.libPrefix}/site-packages:" - + "${pygobject}/lib/${python.libPrefix}/site-packages"; -in - stdenv.mkDerivation rec { name = "bluez-5.8"; @@ -16,8 +12,11 @@ stdenv.mkDerivation rec { sha256 = "1l33lq1lpg7hy26138ir5dj4gl3mql2qxpj20rjnnwyckc3jk700"; }; + pythonPath = with pythonPackages; + [ pythonDBus pygobject3 recursivePthLoader ]; + buildInputs = - [ pkgconfig dbus.libs glib libusb alsaLib python makeWrapper + [ pkgconfig dbus.libs glib libusb alsaLib python pythonPackages.wrapPython readline libsndfile udev libical # Disables GStreamer; not clear what it gains us other than a # zillion extra dependencies. @@ -49,7 +48,9 @@ stdenv.mkDerivation rec { # FIXME: Move these into a separate package to prevent Bluez from # depending on Python etc. postInstall = '' - pushd test + mkdir $out/test + cp -a test $out + pushd $out/test for a in \ simple-agent \ test-adapter \ @@ -58,10 +59,10 @@ stdenv.mkDerivation rec { list-devices \ monitor-bluetooth \ ; do - cp $a $out/bin/bluez-$a - wrapProgram $out/bin/bluez-$a --prefix PYTHONPATH : ${pythonpath} + ln -s ../test/$a $out/bin/bluez-$a done popd + wrapPythonProgramsIn $out/test "$out/test $pythonPath" ''; meta = { |