3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #220476 from ErinvanderVeen/openocd

openocd: rework configuration flags
This commit is contained in:
Pavol Rusnak 2023-03-10 14:38:26 +01:00 committed by GitHub
commit f991762ea1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"