2021-04-02 15:04:58 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, libbtbb, libpcap , libusb1, bluez
|
2020-05-13 16:39:36 +00:00
|
|
|
, udevGroup ? "ubertooth"
|
|
|
|
}:
|
2020-05-13 16:00:08 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ubertooth";
|
2021-01-08 10:27:48 +00:00
|
|
|
version = "2020-12-R1";
|
2020-05-13 16:00:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "greatscottgadgets";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-01-08 10:27:48 +00:00
|
|
|
sha256 = "11r5ag2l5xn4pr7ycicm30w9c3ldn9yiqj1sqnjc79csxl2vrcfw";
|
2020-05-13 16:00:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "source/host";
|
|
|
|
|
2021-04-02 15:04:58 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-05-13 16:00:08 +00:00
|
|
|
buildInputs = [ libbtbb libpcap libusb1 bluez ];
|
|
|
|
|
|
|
|
cmakeFlags = lib.optionals stdenv.isLinux [
|
|
|
|
"-DINSTALL_UDEV_RULES=TRUE"
|
|
|
|
"-DUDEV_RULES_PATH=etc/udev/rules.d"
|
2020-05-13 16:39:36 +00:00
|
|
|
"-DUDEV_RULES_GROUP=${udevGroup}"
|
2020-05-13 16:00:08 +00:00
|
|
|
];
|
|
|
|
|
2021-04-02 13:37:43 +00:00
|
|
|
meta = with lib; {
|
2020-05-13 16:00:08 +00: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;
|
|
|
|
};
|
|
|
|
}
|