From 0f6682c97fab3b098fb4351375c60a29c4f083f2 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Sun, 3 Jun 2018 21:44:25 -0500 Subject: [PATCH] libbladerf: enable Darwin building --- pkgs/development/libraries/libbladeRF/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/libbladeRF/default.nix b/pkgs/development/libraries/libbladeRF/default.nix index 1597765aaa9c..04bd3f3d71ed 100644 --- a/pkgs/development/libraries/libbladeRF/default.nix +++ b/pkgs/development/libraries/libbladeRF/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, pkgconfig, cmake, git, doxygen, help2man, tecla +{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake, git, doxygen, help2man, ncurses, tecla , libusb1, udev }: stdenv.mkDerivation rec { @@ -13,7 +13,10 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ cmake git doxygen help2man tecla libusb1 udev ]; + # ncurses used due to https://github.com/Nuand/bladeRF/blob/ab4fc672c8bab4f8be34e8917d3f241b1d52d0b8/host/utilities/bladeRF-cli/CMakeLists.txt#L208 + buildInputs = [ cmake git doxygen help2man tecla libusb1 ] + ++ lib.optionals stdenv.isLinux [ udev ] + ++ lib.optionals stdenv.isDarwin [ ncurses ]; # Fixup shebang prePatch = "patchShebangs host/utilities/bladeRF-cli/src/cmd/doc/generate.bash"; @@ -24,19 +27,19 @@ stdenv.mkDerivation rec { ''; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Debug" + "-DBUILD_DOCUMENTATION=ON" + ] ++ lib.optionals stdenv.isLinux [ "-DUDEV_RULES_PATH=etc/udev/rules.d" "-DINSTALL_UDEV_RULES=ON" - "-DBUILD_DOCUMENTATION=ON" ]; hardeningDisable = [ "fortify" ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://nuand.com/libbladeRF-doc; description = "Supporting library of the BladeRF SDR opensource hardware"; license = licenses.lgpl21; maintainers = with maintainers; [ funfunctor ]; - platforms = with platforms; linux; + platforms = platforms.unix; }; }