diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-03-10 18:46:21 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-03-10 18:46:21 +0000 |
commit | 8c70bfb9f2bc1373f934ea56de96eb7ea762f349 (patch) | |
tree | 8e7371704c17bed1d64a2a1045bd85dbedc7edaa /pkgs/development/embedded | |
parent | d562454bfd795e8071b45738c2c739372fece481 (diff) | |
parent | 4a0377b56ad94c807874bfda8a164299534d5d62 (diff) |
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts: pkgs/development/libraries/librsvg/default.nix pkgs/development/python-modules/r2pipe/default.nix
Diffstat (limited to 'pkgs/development/embedded')
-rw-r--r-- | pkgs/development/embedded/openocd/default.nix | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/development/embedded/openocd/default.nix b/pkgs/development/embedded/openocd/default.nix index dea8a56f38d41..4915b6df765b9 100644 --- a/pkgs/development/embedded/openocd/default.nix +++ b/pkgs/development/embedded/openocd/default.nix @@ -3,9 +3,13 @@ , fetchurl , pkg-config , hidapi -, libftdi1 , libusb1 , libgpiod + +, enableFtdi ? true, libftdi1 + +# Allow selection the hardware targets (SBCs, JTAG Programmers, JTAG Adapters) +, extraHardwareSupport ? [] }: stdenv.mkDerivation rec { @@ -24,17 +28,14 @@ stdenv.mkDerivation rec { configureFlags = [ "--disable-werror" "--enable-jtag_vpi" - "--enable-usb_blaster_libftdi" - (lib.enableFeature (! stdenv.isDarwin) "amtjtagaccel") - (lib.enableFeature (! stdenv.isDarwin) "gw16012") - "--enable-presto_libftdi" - "--enable-openjtag_ftdi" - (lib.enableFeature (! stdenv.isDarwin) "oocd_trace") "--enable-buspirate" - (lib.enableFeature stdenv.isLinux "sysfsgpio") - (lib.enableFeature stdenv.isLinux "linuxgpiod") "--enable-remote-bitbang" - ]; + (lib.enableFeature enableFtdi "ftdi") + (lib.enableFeature stdenv.isLinux "linuxgpiod") + (lib.enableFeature stdenv.isLinux "sysfsgpio") + ] ++ + map (hardware: "--enable-${hardware}") extraHardwareSupport + ; env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ "-Wno-error=cpp" |