lol
1{ stdenv, fetchurl, libftdi, libusb1, pkgconfig, hidapi }:
2
3stdenv.mkDerivation rec {
4 name = "openocd-${version}";
5 version = "0.9.0";
6
7 src = fetchurl {
8 url = "mirror://sourceforge/openocd/openocd-${version}.tar.bz2";
9 sha256 = "0hzlnm19c4b35vsxs6ik94xbigv3ykdgr8gzrdir6sqmkan44w43";
10 };
11
12 buildInputs = [ libftdi libusb1 pkgconfig hidapi ];
13
14 configureFlags = [
15 "--enable-jtag_vpi"
16 "--enable-usb_blaster_libftdi"
17 "--enable-amtjtagaccel"
18 "--enable-gw16012"
19 "--enable-presto_libftdi"
20 "--enable-openjtag_ftdi"
21 "--enable-oocd_trace"
22 "--enable-buspirate"
23 "--enable-sysfsgpio"
24 "--enable-remote-bitbang"
25 ];
26
27 postInstall = ''
28 mkdir -p "$out/etc/udev/rules.d"
29 ln -s "$out/share/openocd/contrib/99-openocd.rules" "$out/etc/udev/rules.d/99-openocd.rules"
30 '';
31
32 meta = with stdenv.lib; {
33 description = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing";
34 longDescription = ''
35 OpenOCD provides on-chip programming and debugging support with a layered
36 architecture of JTAG interface and TAP support, debug target support
37 (e.g. ARM, MIPS), and flash chip drivers (e.g. CFI, NAND, etc.). Several
38 network interfaces are available for interactiving with OpenOCD: HTTP,
39 telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a
40 "remote target" for source-level debugging of embedded systems using the
41 GNU GDB program.
42 '';
43 homepage = http://openocd.sourceforge.net/;
44 license = licenses.gpl2Plus;
45 maintainers = with maintainers; [ viric bjornfor ];
46 platforms = platforms.linux;
47 };
48}