From 633dc17a6624ff82c6f70d1c739dea1aa0ae98b8 Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Sat, 13 Jun 2026 15:15:10 +0200 Subject: [PATCH] openocd-rp2040: move override to pkgs/by-name and update the description. --- pkgs/by-name/op/openocd-rp2040/package.nix | 33 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 16 ----------- 2 files changed, 33 insertions(+), 16 deletions(-) create mode 100644 pkgs/by-name/op/openocd-rp2040/package.nix 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 6af7a2024028..89bfd4382275 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5501,22 +5501,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; }; };