diff --git a/pkgs/development/tools/misc/openocd/default.nix b/pkgs/development/tools/misc/openocd/default.nix index 80203dd0df9c..169c1afd55d2 100644 --- a/pkgs/development/tools/misc/openocd/default.nix +++ b/pkgs/development/tools/misc/openocd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, libftdi1, libusb1, pkgconfig, hidapi }: +{ stdenv, lib, fetchurl, fetchpatch, libftdi1, libusb1, pkgconfig, hidapi }: stdenv.mkDerivation rec { pname = "openocd"; @@ -9,6 +9,15 @@ stdenv.mkDerivation rec { sha256 = "1bhn2c85rdz4gf23358kg050xlzh7yxbbwmqp24c0akmh3bff4kk"; }; + patches = [ + # Fix FTDI channel configuration for SheevaPlug + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837989 + (fetchpatch { + url = "https://salsa.debian.org/electronics-team/openocd/raw/9a94335daa332a37a51920f87afbad4d36fad2d5/debian/patches/fix-sheeva.patch"; + sha256 = "01x021fagwvgxdpzk7psap7ryqiya4m4mi4nqr27asbmb3q46g5r"; + }) + ]; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ libftdi1 libusb1 hidapi ];