1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-19 20:36:27 +00:00
nixpkgs/pkgs/development/tools/misc/openocd/default.nix
Bjørn Forsman 1149154e0e openocd: update 0.7.0 -> 0.8.0
* Remove unneeded --enable-<JLINK_BASED_DEBUGGER> configure flags.
  configure auto selects support for them now (and they're all enabled).

* Not everything is auto-detected; I asked on the openocd mailing list
  and they suggested a set of ./configure flags for a "distro build"
  (add them).

* Remove --enable-ft2232_libftdi because configure says that it's
  deprecated and we should use libftdi (which we are using when *not*
  passing --enable-ft2232_libftdi (or --enable-legacy-ft2232_libftdi as
  the option is now known as)).

* Add needed pkgconfig build input.

* Udev rules file has been renamed in source archive: openocd.rules =>
  99-openocd.rules.
2014-06-25 20:18:53 +02:00

55 lines
1.7 KiB
Nix

{ stdenv, fetchurl, libftdi, libusb1, pkgconfig }:
# TODO: Add "hidapi" as dependency to gain access to CMSIS-DAP debuggers.
# Support should be auto-detected, but if not, pass "--enable-cmsis-dap" to
# configure.
stdenv.mkDerivation rec {
name = "openocd-${version}";
version = "0.8.0";
src = fetchurl {
url = "mirror://sourceforge/openocd/openocd-${version}.tar.bz2";
sha256 = "0byk7hnccgmhw0f84qlkfhps38gp2xp628bfrsc03vq08hr6q1sv";
};
buildInputs = [ libftdi libusb1 pkgconfig ];
configureFlags = [
"--enable-jtag_vpi"
"--enable-usb_blaster_libftdi"
"--enable-amtjtagaccel"
"--enable-gw16012"
"--enable-presto_libftdi"
"--enable-openjtag_ftdi"
"--enable-oocd_trace"
"--enable-buspirate"
"--enable-sysfsgpio"
"--enable-remote-bitbang"
];
postInstall = ''
mkdir -p "$out/etc/udev/rules.d"
ln -s "$out/share/openocd/contrib/99-openocd.udev" "$out/etc/udev/rules.d/99-openocd.rules"
'';
meta = {
homepage = http://openocd.sourceforge.net/;
description = "OpenOCD, an on-chip debugger";
longDescription =
'' OpenOCD provides on-chip programming and debugging support with a
layered architecture of JTAG interface and TAP support, debug target
support (e.g. ARM, MIPS), and flash chip drivers (e.g. CFI, NAND,
etc.). Several network interfaces are available for interactiving
with OpenOCD: HTTP, telnet, TCL, and GDB. The GDB server enables
OpenOCD to function as a "remote target" for source-level debugging
of embedded systems using the GNU GDB program.
'';
license = "GPLv2+";
maintainers = with stdenv.lib.maintainers; [ viric bjornfor ];
platforms = with stdenv.lib.platforms; linux;
};
}