1 { lib, stdenv, fetchpatch, fetchFromGitHub
7 stdenv.mkDerivation rec {
8 pname = "pc-ble-driver";
11 src = fetchFromGitHub {
12 owner = "NordicSemiconductor";
15 hash = "sha256-srH7Gdiy9Lsv68fst/9jhifx03R2e+4kMia6pU/oCZg=";
20 name = "support-arm.patch";
21 url = "https://github.com/NordicSemiconductor/pc-ble-driver/commit/76a6b31dba7a13ceae40587494cbfa01a29192f4.patch";
22 hash = "sha256-bvK1BXjdlhIXV8R4PiCGaq8oSLzgjMmTgAwssm8N2sk=";
24 # Fix build with GCC 11
26 url = "https://github.com/NordicSemiconductor/pc-ble-driver/commit/37258e65bdbcd0b4369ae448faf650dd181816ec.patch";
27 hash = "sha256-gOdzIW8YJQC+PE4FJd644I1+I7CMcBY8wpF6g02eI5g=";
32 "-DNRF_BLE_DRIVER_VERSION=${version}"
33 ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
37 nativeBuildInputs = [ cmake git ];
38 buildInputs = [ asio catch2 spdlog ];
40 propagatedBuildInputs = [
42 ] ++ lib.optionals stdenv.isDarwin [
44 ] ++ lib.optionals stdenv.isLinux [
49 description = "Desktop library for Bluetooth low energy development";
50 homepage = "https://github.com/NordicSemiconductor/pc-ble-driver";
51 license = licenses.unfreeRedistributable;
52 platforms = platforms.unix;