openocd: update libftdi dependency, fix Darwin build
Restrict Linux-only features to Linux and disable any feature that doesn't build on Darwin for any reason. Restrict GCC-specific cflags to GCC.
This commit is contained in:
parent
16e5ce4058
commit
8e2ab5d8dd
1 changed files with 10 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, libftdi, libusb1, pkgconfig, hidapi }:
|
||||
{ stdenv, lib, fetchurl, libftdi1, libusb1, pkgconfig, hidapi }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "openocd-${version}";
|
||||
|
@ -10,28 +10,28 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ libftdi libusb1 hidapi ];
|
||||
buildInputs = [ libftdi1 libusb1 hidapi ];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-jtag_vpi"
|
||||
"--enable-usb_blaster_libftdi"
|
||||
"--enable-amtjtagaccel"
|
||||
"--enable-gw16012"
|
||||
(lib.enableFeature (! stdenv.isDarwin) "amtjtagaccel")
|
||||
(lib.enableFeature (! stdenv.isDarwin) "gw16012")
|
||||
"--enable-presto_libftdi"
|
||||
"--enable-openjtag_ftdi"
|
||||
"--enable-oocd_trace"
|
||||
(lib.enableFeature (! stdenv.isDarwin) "oocd_trace")
|
||||
"--enable-buspirate"
|
||||
"--enable-sysfsgpio"
|
||||
(lib.enableFeature stdenv.isLinux "sysfsgpio")
|
||||
"--enable-remote-bitbang"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
|
||||
"-Wno-implicit-fallthrough"
|
||||
"-Wno-format-truncation"
|
||||
"-Wno-format-overflow"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString stdenv.isLinux ''
|
||||
mkdir -p "$out/etc/udev/rules.d"
|
||||
rules="$out/share/openocd/contrib/60-openocd.rules"
|
||||
if [ ! -f "$rules" ]; then
|
||||
|
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
|
|||
ln -s "$rules" "$out/etc/udev/rules.d/"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing";
|
||||
longDescription = ''
|
||||
OpenOCD provides on-chip programming and debugging support with a layered
|
||||
|
@ -55,6 +55,6 @@ stdenv.mkDerivation rec {
|
|||
homepage = http://openocd.sourceforge.net/;
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ bjornfor ];
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue