2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, git, cmake, catch2, asio, udev, IOKit }:
|
2020-07-13 12:49:22 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pc-ble-driver";
|
|
|
|
version = "4.1.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NordicSemiconductor";
|
|
|
|
repo = "pc-ble-driver";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1llhkpbdbsq9d91m873vc96bprkgpb5wsm5fgs1qhzdikdhg077q";
|
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DNRF_BLE_DRIVER_VERSION=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake git ];
|
2020-07-19 22:26:49 +01:00
|
|
|
buildInputs = [ catch2 asio ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2020-07-19 22:26:49 +01:00
|
|
|
IOKit
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2020-07-19 22:26:49 +01:00
|
|
|
udev
|
|
|
|
];
|
2020-07-13 12:49:22 +01:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-07-13 12:49:22 +01:00
|
|
|
description = "Desktop library for Bluetooth low energy development";
|
|
|
|
homepage = "https://github.com/NordicSemiconductor/pc-ble-driver";
|
|
|
|
license = licenses.unfreeRedistributable;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ jschievink ];
|
|
|
|
};
|
|
|
|
}
|