bluez5: multiple outputs

This commit is contained in:
Thomas Tuegel 2016-04-24 19:17:42 -05:00
parent e0a2224f1e
commit 70936ce3f8

View file

@ -6,7 +6,7 @@ assert stdenv.isLinux;
stdenv.mkDerivation rec {
name = "bluez-5.37";
src = fetchurl {
url = "mirror://kernel/linux/bluetooth/${name}.tar.xz";
sha256 = "c14ba9ddcb0055522073477b8fd8bf1ddf5d219e75fdfd4699b7e0ce5350d6b0";
@ -20,11 +20,13 @@ stdenv.mkDerivation rec {
readline libsndfile udev libical
# Disables GStreamer; not clear what it gains us other than a
# zillion extra dependencies.
# gstreamer gst_plugins_base
# gstreamer gst_plugins_base
];
outputs = [ "dev" "out" "test" ];
patches = [ ./bluez-5.37-obexd_without_systemd-1.patch ];
preConfigure = ''
substituteInPlace tools/hid2hci.rules --replace /sbin/udevadm ${systemd}/bin/udevadm
substituteInPlace tools/hid2hci.rules --replace "hid2hci " "$out/lib/udev/hid2hci "
@ -51,9 +53,9 @@ stdenv.mkDerivation rec {
# FIXME: Move these into a separate package to prevent Bluez from
# depending on Python etc.
postInstall = ''
mkdir $out/test
cp -a test $out
pushd $out/test
mkdir -p $test/test
cp -a test $test
pushd $test/test
for a in \
simple-agent \
test-adapter \
@ -65,7 +67,7 @@ stdenv.mkDerivation rec {
ln -s ../test/$a $out/bin/bluez-$a
done
popd
wrapPythonProgramsIn $out/test "$out/test $pythonPath"
wrapPythonProgramsIn $test/test "$test/test $pythonPath"
# for bluez4 compatibility for NixOS
mkdir $out/sbin