2015-07-02 14:25:24 +00:00
|
|
|
{ stdenv, fetchFromGitHub, pkgconfig, cmake, git, doxygen, help2man, tecla
|
|
|
|
, libusb1, udev }:
|
2015-01-25 10:25:47 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-01-12 10:43:56 +00:00
|
|
|
version = "1.9.0";
|
2018-05-28 12:59:57 +00:00
|
|
|
name = "libbladeRF-${version}";
|
2015-01-25 10:25:47 +00:00
|
|
|
|
2015-07-02 14:25:24 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Nuand";
|
|
|
|
repo = "bladeRF";
|
|
|
|
rev = "libbladeRF_v${version}";
|
2018-01-12 10:43:56 +00:00
|
|
|
sha256 = "0frvphp4xxdxwzmi94b0asl7b891sd3fk8iw9kfk8h6f3cdhj8xa";
|
2015-01-25 10:25:47 +00:00
|
|
|
};
|
|
|
|
|
2017-09-05 21:26:13 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ cmake git doxygen help2man tecla libusb1 udev ];
|
2015-01-25 10:25:47 +00:00
|
|
|
|
2015-01-25 18:01:58 +00:00
|
|
|
# Fixup shebang
|
|
|
|
prePatch = "patchShebangs host/utilities/bladeRF-cli/src/cmd/doc/generate.bash";
|
|
|
|
|
|
|
|
# Let us avoid nettools as a dependency.
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i 's/$(hostname)/hostname/' host/utilities/bladeRF-cli/src/cmd/doc/generate.bash
|
|
|
|
'';
|
2015-01-25 10:25:47 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_BUILD_TYPE=Debug"
|
2017-03-03 11:03:50 +00:00
|
|
|
"-DUDEV_RULES_PATH=etc/udev/rules.d"
|
2015-01-25 10:25:47 +00:00
|
|
|
"-DINSTALL_UDEV_RULES=ON"
|
2015-01-25 18:01:58 +00:00
|
|
|
"-DBUILD_DOCUMENTATION=ON"
|
2015-01-25 10:25:47 +00:00
|
|
|
];
|
2015-01-25 10:25:47 +00:00
|
|
|
|
2015-07-02 14:25:24 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://www.nuand.com/;
|
2015-01-25 10:25:47 +00:00
|
|
|
description = "Supporting library of the BladeRF SDR opensource hardware";
|
2015-07-02 14:25:24 +00:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [ funfunctor ];
|
2018-01-12 10:43:56 +00:00
|
|
|
platforms = with platforms; linux;
|
2015-01-25 10:25:47 +00:00
|
|
|
};
|
|
|
|
}
|