libbladerf: enable Darwin building
This commit is contained in:
parent
312d2897cd
commit
0f6682c97f
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, pkgconfig, cmake, git, doxygen, help2man, tecla
|
{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake, git, doxygen, help2man, ncurses, tecla
|
||||||
, libusb1, udev }:
|
, libusb1, udev }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -13,7 +13,10 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
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
|
# Fixup shebang
|
||||||
prePatch = "patchShebangs host/utilities/bladeRF-cli/src/cmd/doc/generate.bash";
|
prePatch = "patchShebangs host/utilities/bladeRF-cli/src/cmd/doc/generate.bash";
|
||||||
@ -24,19 +27,19 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DCMAKE_BUILD_TYPE=Debug"
|
"-DBUILD_DOCUMENTATION=ON"
|
||||||
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
"-DUDEV_RULES_PATH=etc/udev/rules.d"
|
"-DUDEV_RULES_PATH=etc/udev/rules.d"
|
||||||
"-DINSTALL_UDEV_RULES=ON"
|
"-DINSTALL_UDEV_RULES=ON"
|
||||||
"-DBUILD_DOCUMENTATION=ON"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
hardeningDisable = [ "fortify" ];
|
hardeningDisable = [ "fortify" ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
homepage = https://nuand.com/libbladeRF-doc;
|
homepage = https://nuand.com/libbladeRF-doc;
|
||||||
description = "Supporting library of the BladeRF SDR opensource hardware";
|
description = "Supporting library of the BladeRF SDR opensource hardware";
|
||||||
license = licenses.lgpl21;
|
license = licenses.lgpl21;
|
||||||
maintainers = with maintainers; [ funfunctor ];
|
maintainers = with maintainers; [ funfunctor ];
|
||||||
platforms = with platforms; linux;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user