bluez: don’t build python packages when tests are disabled
Can’t run these on cross anyway
This commit is contained in:
parent
e446334824
commit
0bbdba2d11
|
@ -11,9 +11,13 @@
|
||||||
, readline
|
, readline
|
||||||
, systemd
|
, systemd
|
||||||
, udev
|
, udev
|
||||||
}:
|
}: let
|
||||||
|
pythonPath = with python3.pkgs; [
|
||||||
stdenv.mkDerivation rec {
|
dbus-python
|
||||||
|
pygobject3
|
||||||
|
recursivePthLoader
|
||||||
|
];
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
pname = "bluez";
|
pname = "bluez";
|
||||||
version = "5.54";
|
version = "5.54";
|
||||||
|
|
||||||
|
@ -22,12 +26,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1p2ncvjz6alr9n3l5wvq2arqgc7xjs6dqyar1l9jp0z8cfgapkb8";
|
sha256 = "1p2ncvjz6alr9n3l5wvq2arqgc7xjs6dqyar1l9jp0z8cfgapkb8";
|
||||||
};
|
};
|
||||||
|
|
||||||
pythonPath = with python3.pkgs; [
|
|
||||||
dbus-python
|
|
||||||
pygobject3
|
|
||||||
recursivePthLoader
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
alsaLib
|
alsaLib
|
||||||
dbus
|
dbus
|
||||||
|
@ -44,7 +42,7 @@ stdenv.mkDerivation rec {
|
||||||
python3.pkgs.wrapPython
|
python3.pkgs.wrapPython
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs = [ "out" "dev" "test" ];
|
outputs = [ "out" "dev" ] ++ lib.optional doCheck "test";
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace tools/hid2hci.rules \
|
substituteInPlace tools/hid2hci.rules \
|
||||||
|
@ -79,7 +77,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
doCheck = stdenv.hostPlatform.isx86_64;
|
doCheck = stdenv.hostPlatform.isx86_64;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = lib.optionalString doCheck ''
|
||||||
mkdir -p $test/{bin,test}
|
mkdir -p $test/{bin,test}
|
||||||
cp -a test $test
|
cp -a test $test
|
||||||
pushd $test/test
|
pushd $test/test
|
||||||
|
@ -94,8 +92,8 @@ stdenv.mkDerivation rec {
|
||||||
ln -s ../test/$a $test/bin/bluez-$a
|
ln -s ../test/$a $test/bin/bluez-$a
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
wrapPythonProgramsIn $test/test "$test/test $pythonPath"
|
wrapPythonProgramsIn $test/test "$test/test ${toString pythonPath}"
|
||||||
|
'' + ''
|
||||||
# for bluez4 compatibility for NixOS
|
# for bluez4 compatibility for NixOS
|
||||||
mkdir $out/sbin
|
mkdir $out/sbin
|
||||||
ln -s ../libexec/bluetooth/bluetoothd $out/sbin/bluetoothd
|
ln -s ../libexec/bluetooth/bluetoothd $out/sbin/bluetoothd
|
||||||
|
|
Loading…
Reference in New Issue