14 buildBluetooth ? true,
15 buildBluetoothLowEnergy ? true,
19 stdenv.mkDerivation (finalAttrs: {
23 src = fetchFromGitHub {
24 owner = "brainflow-dev";
26 rev = "refs/tags/${finalAttrs.version}";
27 hash = "sha256-haQO03nkvLoXtFVe+C+yi+MwM0CFh6rLcLvU8fQ4k/w=";
31 # All of these are PRs that were merged into the upstream repository and will be included in the next release
32 # These should be removed once the next version is released
34 # Fixes a major issue that prevented the build from working at all (why was this not backported???)
35 url = "https://github.com/brainflow-dev/brainflow/commit/883b0cd08acb99d7b6e241e92fba2e9a363d17b1.patch";
36 hash = "sha256-QQd+BI3I65gfaNS/SKLjCoqbCwPCiTh+nh0tJAZM6hQ=";
39 # Bumps the version of a python dependency that had a backwards-incompatible change
40 url = "https://github.com/brainflow-dev/brainflow/commit/ea23a6f0483ce4d6fdd7a82bace865356ee78d7f.patch";
41 hash = "sha256-dvMpxxRrnJQ9ADGagB1JhuoB9SNwn755wbHzW/3ECeo=";
44 # Fixes an incorrect use of an environment variable during the build
45 url = "https://github.com/brainflow-dev/brainflow/commit/053b8c1253b686cbec49ab4adb47c9ee02d3f99a.patch";
46 hash = "sha256-Pfhe1ZvMagfVAGZqeWn1uHXgwlTtkOm+gyWuvC5/Sro=";
51 (lib.cmakeBool "USE_LIBFTDI" useLibFTDI)
52 (lib.cmakeBool "USE_OPENMP" useOpenMP)
53 (lib.cmakeBool "BUILD_OYMOTION_SDK" false) # Needs a "GFORCE_SDK"
54 (lib.cmakeBool "BUILD_BLUETOOTH" buildBluetooth)
55 (lib.cmakeBool "BUILD_BLE" buildBluetoothLowEnergy)
56 (lib.cmakeBool "BUILD_ONNX" buildONNX)
61 ++ lib.optional (buildBluetooth || buildBluetoothLowEnergy) bluez
62 ++ lib.optional useLibFTDI libftdi1;
70 find . -type f -name 'build.cmake' -exec \
71 sed -i 's/DESTINATION inc/DESTINATION include/g' {} \;
74 passthru.updateScript = nix-update-script { };
77 description = "A library to obtain, parse and analyze data (EEG, EMG, ECG) from biosensors";
78 homepage = "https://brainflow.org/";
79 license = lib.licenses.mit;
80 maintainers = with lib.maintainers; [
84 platforms = lib.platforms.all;