forked from mirrors/nixpkgs
Merge pull request #220476 from ErinvanderVeen/openocd
openocd: rework configuration flags
This commit is contained in:
commit
f991762ea1
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue