2021-05-28 09:39:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
|
|
|
, cmake, git
|
|
|
|
, asio, catch2, spdlog
|
|
|
|
, IOKit, udev
|
|
|
|
}:
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pc-ble-driver";
|
2021-05-28 09:39:13 +00:00
|
|
|
version = "4.1.4";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NordicSemiconductor";
|
|
|
|
repo = "pc-ble-driver";
|
|
|
|
rev = "v${version}";
|
2021-05-28 09:39:13 +00:00
|
|
|
sha256 = "1609x17sbfi668jfwyvnfk9z29w6cgzvgv67xcpvpx5jv0czpcdj";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DNRF_BLE_DRIVER_VERSION=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake git ];
|
2021-05-28 09:39:13 +00:00
|
|
|
buildInputs = [ asio catch2 spdlog ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2020-08-20 17:08:02 +00:00
|
|
|
IOKit
|
2021-02-05 17:12:51 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2020-08-20 17:08:02 +00:00
|
|
|
udev
|
|
|
|
];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-07-18 16:06: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 ];
|
|
|
|
};
|
|
|
|
}
|