blast: fix and enable strictDeps (#366620)
[NixPkgs.git] / pkgs / by-name / br / brainflow / package.nix
blob445283cc05a986bf98664d1ba879881c09c92fab
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   bluez,
6   cmake,
7   dbus,
8   libftdi1,
9   nix-update-script,
10   pkg-config,
11   useLibFTDI ? true,
12   useOpenMP ? true,
13   buildBluetooth ? true,
14   buildBluetoothLowEnergy ? true,
15   buildONNX ? true,
18 stdenv.mkDerivation (finalAttrs: {
19   pname = "brainflow";
20   version = "5.15.0";
22   src = fetchFromGitHub {
23     owner = "brainflow-dev";
24     repo = "brainflow";
25     tag = finalAttrs.version;
26     hash = "sha256-NBdSVYW2xWY5jgXeaeW0yBzIzvSWt5Qp2A9zIn7+0Yw=";
27   };
29   patches = [ ];
31   cmakeFlags = [
32     (lib.cmakeBool "USE_LIBFTDI" useLibFTDI)
33     (lib.cmakeBool "USE_OPENMP" useOpenMP)
34     (lib.cmakeBool "BUILD_OYMOTION_SDK" false) # Needs a "GFORCE_SDK"
35     (lib.cmakeBool "BUILD_BLUETOOTH" buildBluetooth)
36     (lib.cmakeBool "BUILD_BLE" buildBluetoothLowEnergy)
37     (lib.cmakeBool "BUILD_ONNX" buildONNX)
38   ];
40   buildInputs =
41     [ dbus ]
42     ++ lib.optional (buildBluetooth || buildBluetoothLowEnergy) bluez
43     ++ lib.optional useLibFTDI libftdi1;
45   nativeBuildInputs = [
46     cmake
47     pkg-config
48   ];
50   postPatch = ''
51     find . -type f -name 'build.cmake' -exec \
52     sed -i 's/DESTINATION inc/DESTINATION include/g' {} \;
53   '';
55   passthru.updateScript = nix-update-script { };
57   meta = {
58     description = "A library to obtain, parse and analyze data (EEG, EMG, ECG) from biosensors";
59     homepage = "https://brainflow.org/";
60     license = lib.licenses.mit;
61     maintainers = with lib.maintainers; [
62       pandapip1
63       ziguana
64     ];
65     platforms = lib.platforms.all;
66   };