nixpkgs/pkgs/development/libraries/libbladeRF/default.nix
Benno Fünfstück 410bba8f95 libbladeRF: fix udev rule location in $out
Shell variables in cmakeFlags are not expanded, so the rules instead ended up
in `$out/'$out'/etc/udev/rules.d`.
2017-03-03 12:27:49 +01:00

39 lines
1.1 KiB
Nix

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