diff --git a/pkgs/by-name/op/openocd-rp2040/package.nix b/pkgs/by-name/op/openocd-rp2040/package.nix new file mode 100644 index 000000000000..7ec3aa6f8d93 --- /dev/null +++ b/pkgs/by-name/op/openocd-rp2040/package.nix @@ -0,0 +1,33 @@ +{ + openocd, + autoreconfHook, + lib, + fetchFromGitHub, +}: + +openocd.overrideAttrs ( + finalAttrs: old: { + pname = "openocd-rp2040"; + version = "2.2.0"; + src = fetchFromGitHub { + owner = "raspberrypi"; + repo = "openocd"; + tag = "sdk-${finalAttrs.version}"; + hash = "sha256-ZfbZVFVncHa1MvNJb4jbnU66vnlwVLBaOXPdgLqAneM="; + # openocd disables the vendored libraries that use submodules and replaces them with nix versions. + # this works out as one of the submodule sources seems to be flakey. + fetchSubmodules = false; + }; + nativeBuildInputs = old.nativeBuildInputs ++ [ + autoreconfHook + ]; + meta = openocd.meta // { + description = "Raspberry Pi's downstream fork of OpenOCD for use with Pico-series devices"; + homepage = "https://github.com/raspberrypi/openocd"; + maintainers = with lib.maintainers; [ + aiyion + lu15w1r7h + ]; + }; + } +) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6ba3eba8821e..8eb6f69b6a3c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5499,22 +5499,6 @@ with pkgs; openai-whisper = with python3.pkgs; toPythonApplication openai-whisper; - openocd-rp2040 = openocd.overrideAttrs (old: { - pname = "openocd-rp2040"; - src = fetchFromGitHub { - owner = "raspberrypi"; - repo = "openocd"; - rev = "4d87f6dcae77d3cbcd8ac3f7dc887adf46ffa504"; - hash = "sha256-bBqVoHsnNoaC2t8hqcduI8GGlO0VDMUovCB0HC+rxvc="; - # openocd disables the vendored libraries that use submodules and replaces them with nix versions. - # this works out as one of the submodule sources seems to be flakey. - fetchSubmodules = false; - }; - nativeBuildInputs = old.nativeBuildInputs ++ [ - autoreconfHook - ]; - }); - oprofile = callPackage ../development/tools/profiling/oprofile { libiberty_static = libiberty.override { staticBuild = true; }; };