2021-05-19 07:58:28 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
|
|
|
, cmake, git
|
|
|
|
, asio, catch2, spdlog
|
|
|
|
, IOKit, udev
|
|
|
|
}:
|
2020-07-13 11:49:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pc-ble-driver";
|
2021-05-19 07:58:28 +00:00
|
|
|
version = "4.1.4";
|
2020-07-13 11:49:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NordicSemiconductor";
|
|
|
|
repo = "pc-ble-driver";
|
|
|
|
rev = "v${version}";
|
2021-05-19 07:58:28 +00:00
|
|
|
sha256 = "1609x17sbfi668jfwyvnfk9z29w6cgzvgv67xcpvpx5jv0czpcdj";
|
2020-07-13 11:49:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DNRF_BLE_DRIVER_VERSION=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake git ];
|
2021-05-19 07:58:28 +00:00
|
|
|
buildInputs = [ asio catch2 spdlog ];
|
2020-07-19 21:26:49 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2020-07-19 21:26:49 +00:00
|
|
|
IOKit
|
2021-01-21 17:00:13 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2020-07-19 21:26:49 +00:00
|
|
|
udev
|
|
|
|
];
|
2020-07-13 11:49:22 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-07-13 11:49:22 +00: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 ];
|
|
|
|
};
|
|
|
|
}
|