mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 19:08:30 +00:00
67d0569b25
Some of the documentation is built with pandoc using some custom bash script. We need to fixup the shebang for that script to correctly run. Other parts of the documentation is built using help2man and doxygen. We also make libtecla a dependency for interactive help support. There is an upstream bug that makes builds fail when pandoc is in PATH. Most importantly however, the man pages should now build and install correctly. Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
40 lines
1.3 KiB
Nix
40 lines
1.3 KiB
Nix
{ stdenv, fetchgit, pkgconfig, cmake, git, doxygen, help2man, tecla, libusb1, udev }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "1.1.0";
|
|
name = "libbladeRF-v${version}";
|
|
|
|
src = fetchgit {
|
|
url = "https://github.com/Nuand/bladeRF/";
|
|
rev = "refs/tags/libbladeRF_v${version}";
|
|
sha256 = "19qd26yflig51scknyjf3r3nmnc2bni75294jpsv0idzqfj87lbr";
|
|
name = "libbladeRF_v${version}-checkout";
|
|
};
|
|
|
|
buildInputs = [ pkgconfig cmake git doxygen help2man tecla libusb1 udev ];
|
|
|
|
# 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
|
|
sed -i 's/ --no-info/ --no-info --no-discard-stderr/' host/utilities/bladeRF-cli/CMakeLists.txt
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
"-DCMAKE_BUILD_TYPE=Debug"
|
|
"-DUDEV_RULES_PATH=$out/etc/udev/rules.d"
|
|
"-DINSTALL_UDEV_RULES=ON"
|
|
"-DBUILD_DOCUMENTATION=ON"
|
|
];
|
|
|
|
meta = {
|
|
homepage = "https://www.nuand.com/";
|
|
description = "Supporting library of the BladeRF SDR opensource hardware";
|
|
license = stdenv.lib.licenses.lgpl21;
|
|
maintainers = [ stdenv.lib.maintainers.funfunctor ];
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
};
|
|
}
|