Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-18.03 40 lines 1.2 kB view raw
1{ stdenv, fetchFromGitHub, pkgconfig, cmake, git, doxygen, help2man, tecla 2, libusb1, udev }: 3 4stdenv.mkDerivation rec { 5 version = "1.9.0"; 6 name = "libbladeRF-v${version}"; 7 8 src = fetchFromGitHub { 9 owner = "Nuand"; 10 repo = "bladeRF"; 11 rev = "libbladeRF_v${version}"; 12 sha256 = "0frvphp4xxdxwzmi94b0asl7b891sd3fk8iw9kfk8h6f3cdhj8xa"; 13 }; 14 15 nativeBuildInputs = [ pkgconfig ]; 16 buildInputs = [ cmake git doxygen help2man tecla libusb1 udev ]; 17 18 # Fixup shebang 19 prePatch = "patchShebangs host/utilities/bladeRF-cli/src/cmd/doc/generate.bash"; 20 21 # Let us avoid nettools as a dependency. 22 patchPhase = '' 23 sed -i 's/$(hostname)/hostname/' host/utilities/bladeRF-cli/src/cmd/doc/generate.bash 24 ''; 25 26 cmakeFlags = [ 27 "-DCMAKE_BUILD_TYPE=Debug" 28 "-DUDEV_RULES_PATH=etc/udev/rules.d" 29 "-DINSTALL_UDEV_RULES=ON" 30 "-DBUILD_DOCUMENTATION=ON" 31 ]; 32 33 meta = with stdenv.lib; { 34 homepage = https://www.nuand.com/; 35 description = "Supporting library of the BladeRF SDR opensource hardware"; 36 license = licenses.lgpl21; 37 maintainers = with maintainers; [ funfunctor ]; 38 platforms = with platforms; linux; 39 }; 40}