Merge pull request #87750 from oxzi/ubertooth
This commit is contained in:
commit
54d286365d
29
nixos/modules/hardware/ubertooth.nix
Normal file
29
nixos/modules/hardware/ubertooth.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.hardware.ubertooth;
|
||||
|
||||
ubertoothPkg = pkgs.ubertooth.override {
|
||||
udevGroup = cfg.group;
|
||||
};
|
||||
in {
|
||||
options.hardware.ubertooth = {
|
||||
enable = mkEnableOption "Enable the Ubertooth software and its udev rules.";
|
||||
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
default = "ubertooth";
|
||||
example = "wheel";
|
||||
description = "Group for Ubertooth's udev rules.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ ubertoothPkg ];
|
||||
|
||||
services.udev.packages = [ ubertoothPkg ];
|
||||
users.groups.${cfg.group} = {};
|
||||
};
|
||||
}
|
@ -67,6 +67,7 @@
|
||||
./hardware/steam-hardware.nix
|
||||
./hardware/system-76.nix
|
||||
./hardware/tuxedo-keyboard.nix
|
||||
./hardware/ubertooth.nix
|
||||
./hardware/usb-wwan.nix
|
||||
./hardware/onlykey.nix
|
||||
./hardware/opentabletdriver.nix
|
||||
|
34
pkgs/applications/radio/ubertooth/default.nix
Normal file
34
pkgs/applications/radio/ubertooth/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, libbtbb, libpcap , libusb1, bluez
|
||||
, udevGroup ? "ubertooth"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ubertooth";
|
||||
version = "2020-12-R1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "greatscottgadgets";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "11r5ag2l5xn4pr7ycicm30w9c3ldn9yiqj1sqnjc79csxl2vrcfw";
|
||||
};
|
||||
|
||||
sourceRoot = "source/host";
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
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}"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
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;
|
||||
};
|
||||
}
|
22
pkgs/development/libraries/libbtbb/default.nix
Normal file
22
pkgs/development/libraries/libbtbb/default.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ stdenv, fetchFromGitHub, cmake }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libbtbb";
|
||||
version = "2020-12-R1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "greatscottgadgets";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1byv8174xam7siakr1p0523x97wkh0fmwmq341sd3g70qr2g767d";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Bluetooth baseband decoding library";
|
||||
homepage = "https://github.com/greatscottgadgets/libbtbb";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ oxzi ];
|
||||
};
|
||||
}
|
@ -4422,6 +4422,8 @@ in
|
||||
|
||||
libbladeRF = callPackage ../development/libraries/libbladeRF { };
|
||||
|
||||
libbtbb = callPackage ../development/libraries/libbtbb { };
|
||||
|
||||
lp_solve = callPackage ../applications/science/math/lp_solve { };
|
||||
|
||||
fastlane = callPackage ../tools/admin/fastlane { };
|
||||
@ -8852,6 +8854,8 @@ in
|
||||
|
||||
ubridge = callPackage ../tools/networking/ubridge { };
|
||||
|
||||
ubertooth = callPackage ../applications/radio/ubertooth { };
|
||||
|
||||
ucl = callPackage ../development/libraries/ucl { };
|
||||
|
||||
ucspi-tcp = callPackage ../tools/networking/ucspi-tcp { };
|
||||
|
Loading…
Reference in New Issue
Block a user