nixpkgs-suyu/pkgs/applications/radio/ubertooth/default.nix

35 lines
955 B
Nix
Raw Normal View History

2021-04-02 17:04:58 +02:00
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, libbtbb, libpcap , libusb1, bluez
, udevGroup ? "ubertooth"
}:
2020-05-13 18:00:08 +02:00
stdenv.mkDerivation rec {
pname = "ubertooth";
2021-01-08 11:27:48 +01:00
version = "2020-12-R1";
2020-05-13 18:00:08 +02:00
src = fetchFromGitHub {
owner = "greatscottgadgets";
repo = pname;
rev = version;
2021-01-08 11:27:48 +01:00
sha256 = "11r5ag2l5xn4pr7ycicm30w9c3ldn9yiqj1sqnjc79csxl2vrcfw";
2020-05-13 18:00:08 +02:00
};
sourceRoot = "source/host";
2021-04-02 17:04:58 +02:00
nativeBuildInputs = [ cmake pkg-config ];
2020-05-13 18:00:08 +02:00
buildInputs = [ libbtbb libpcap libusb1 bluez ];
cmakeFlags = lib.optionals stdenv.isLinux [
"-DINSTALL_UDEV_RULES=TRUE"
"-DUDEV_RULES_PATH=etc/udev/rules.d"
"-DUDEV_RULES_GROUP=${udevGroup}"
2020-05-13 18:00:08 +02:00
];
2021-04-02 15:37:43 +02:00
meta = with lib; {
2020-05-13 18:00:08 +02:00
description = "Open source wireless development platform suitable for Bluetooth experimentation";
homepage = "https://github.com/greatscottgadgets/ubertooth";
license = licenses.gpl2;
maintainers = with maintainers; [ oxzi ];
platforms = platforms.linux;
};
}