about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/bluez/default.nix
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-04-13 16:48:38 -0400
committerGitHub <noreply@github.com>2020-04-13 16:48:38 -0400
commite520d6af29158ff6d17c34ec16b1f2e79bccad45 (patch)
treeddf031dda697cba7549ed8357ca3454c30433fbd /pkgs/os-specific/linux/bluez/default.nix
parent940c35568bc2fa135eafe0817027c765d9840469 (diff)
parentc6ff360cc437d366c10f2f827edd5a7fb47e73c3 (diff)
downloadnixlib-e520d6af29158ff6d17c34ec16b1f2e79bccad45.tar
nixlib-e520d6af29158ff6d17c34ec16b1f2e79bccad45.tar.gz
nixlib-e520d6af29158ff6d17c34ec16b1f2e79bccad45.tar.bz2
nixlib-e520d6af29158ff6d17c34ec16b1f2e79bccad45.tar.lz
nixlib-e520d6af29158ff6d17c34ec16b1f2e79bccad45.tar.xz
nixlib-e520d6af29158ff6d17c34ec16b1f2e79bccad45.tar.zst
nixlib-e520d6af29158ff6d17c34ec16b1f2e79bccad45.zip
Merge pull request #84415 from matthewbauer/mb-cross-fixes-april2020
Cross compilation fixes [april 2020]
Diffstat (limited to 'pkgs/os-specific/linux/bluez/default.nix')
-rw-r--r--pkgs/os-specific/linux/bluez/default.nix24
1 files changed, 11 insertions, 13 deletions
diff --git a/pkgs/os-specific/linux/bluez/default.nix b/pkgs/os-specific/linux/bluez/default.nix
index 78d88d941e87..401ab39bca36 100644
--- a/pkgs/os-specific/linux/bluez/default.nix
+++ b/pkgs/os-specific/linux/bluez/default.nix
@@ -11,9 +11,13 @@
 , readline
 , systemd
 , udev
-}:
-
-stdenv.mkDerivation rec {
+}: let
+  pythonPath = with python3.pkgs; [
+    dbus-python
+    pygobject3
+    recursivePthLoader
+  ];
+in stdenv.mkDerivation rec {
   pname = "bluez";
   version = "5.54";
 
@@ -22,12 +26,6 @@ stdenv.mkDerivation rec {
     sha256 = "1p2ncvjz6alr9n3l5wvq2arqgc7xjs6dqyar1l9jp0z8cfgapkb8";
   };
 
-  pythonPath = with python3.pkgs; [
-    dbus-python
-    pygobject3
-    recursivePthLoader
-  ];
-
   buildInputs = [
     alsaLib
     dbus
@@ -44,7 +42,7 @@ stdenv.mkDerivation rec {
     python3.pkgs.wrapPython
   ];
 
-  outputs = [ "out" "dev" "test" ];
+  outputs = [ "out" "dev" ] ++ lib.optional doCheck "test";
 
   postPatch = ''
     substituteInPlace tools/hid2hci.rules \
@@ -79,7 +77,7 @@ stdenv.mkDerivation rec {
 
   doCheck = stdenv.hostPlatform.isx86_64;
 
-  postInstall = ''
+  postInstall = lib.optionalString doCheck ''
     mkdir -p $test/{bin,test}
     cp -a test $test
     pushd $test/test
@@ -94,8 +92,8 @@ stdenv.mkDerivation rec {
       ln -s ../test/$a $test/bin/bluez-$a
     done
     popd
-    wrapPythonProgramsIn $test/test "$test/test $pythonPath"
-
+    wrapPythonProgramsIn $test/test "$test/test ${toString pythonPath}"
+  '' + ''
     # for bluez4 compatibility for NixOS
     mkdir $out/sbin
     ln -s ../libexec/bluetooth/bluetoothd $out/sbin/bluetoothd