2015-07-02 16:25:24 +02:00
|
|
|
{ stdenv, fetchFromGitHub, pkgconfig, cmake, git, doxygen, help2man, tecla
|
|
|
|
, libusb1, udev }:
|
2015-01-25 11:25:47 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-07-02 16:25:24 +02:00
|
|
|
version = "1.4.0";
|
2015-01-25 11:25:47 +01:00
|
|
|
name = "libbladeRF-v${version}";
|
|
|
|
|
2015-07-02 16:25:24 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Nuand";
|
|
|
|
repo = "bladeRF";
|
|
|
|
rev = "libbladeRF_v${version}";
|
|
|
|
sha256 = "1y00hqsmqaix4dql8mb75zx87zvn8b483yxv53x9qyjspksbs60c";
|
2015-01-25 11:25:47 +01:00
|
|
|
};
|
|
|
|
|
2015-01-25 19:01:58 +01:00
|
|
|
buildInputs = [ pkgconfig cmake git doxygen help2man tecla libusb1 udev ];
|
2015-01-25 11:25:47 +01:00
|
|
|
|
2015-01-25 19:01:58 +01: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 11:25:47 +01:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_BUILD_TYPE=Debug"
|
2017-03-03 12:03:50 +01:00
|
|
|
"-DUDEV_RULES_PATH=etc/udev/rules.d"
|
2015-01-25 11:25:47 +01:00
|
|
|
"-DINSTALL_UDEV_RULES=ON"
|
2015-01-25 19:01:58 +01:00
|
|
|
"-DBUILD_DOCUMENTATION=ON"
|
2015-01-25 11:25:47 +01:00
|
|
|
];
|
2015-01-25 11:25:47 +01:00
|
|
|
|
2015-07-02 16:25:24 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://www.nuand.com/;
|
2015-01-25 11:25:47 +01:00
|
|
|
description = "Supporting library of the BladeRF SDR opensource hardware";
|
2015-07-02 16:25:24 +02:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [ funfunctor ];
|
|
|
|
platforms = platforms.linux;
|
2015-01-25 11:25:47 +01:00
|
|
|
};
|
|
|
|
}
|