From ca228f3532a62bdff22dcb921f771bfda90883d5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 12 Dec 2024 00:08:55 +0000 Subject: [PATCH 1/2] pico-sdk: 2.0.0 -> 2.1.0 --- pkgs/by-name/pi/pico-sdk/package.nix | 31 +++++++++++++++++++--------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/pi/pico-sdk/package.nix b/pkgs/by-name/pi/pico-sdk/package.nix index 28a1f2ba6d43..109f11ea04bf 100644 --- a/pkgs/by-name/pi/pico-sdk/package.nix +++ b/pkgs/by-name/pi/pico-sdk/package.nix @@ -3,6 +3,9 @@ stdenv, fetchFromGitHub, cmake, + versionCheckHook, + nix-update-script, + pico-sdk, # Options @@ -14,18 +17,18 @@ stdenv.mkDerivation (finalAttrs: { pname = "pico-sdk"; - version = "2.0.0"; + version = "2.1.0"; src = fetchFromGitHub { owner = "raspberrypi"; repo = "pico-sdk"; - rev = finalAttrs.version; + tag = finalAttrs.version; fetchSubmodules = withSubmodules; hash = - if (withSubmodules) then - "sha256-fVSpBVmjeP5pwkSPhhSCfBaEr/FEtA82mQOe/cHFh0A=" + if withSubmodules then + "sha256-nLn6H/P79Jbk3/TIowH2WqmHFCXKEy7lgs7ZqhqJwDM=" else - "sha256-d6mEjuG8S5jvJS4g8e90gFII3sEqUVlT2fgd9M9LUkA="; + "sha256-QKc16Wnx2AvpM0/bklY8CnbsShVR1r5ejtRlvE8f8mM="; }; nativeBuildInputs = [ cmake ]; @@ -42,11 +45,19 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; - meta = with lib; { - homepage = "https://github.com/raspberrypi/pico-sdk"; + passthru = { + updateScript = nix-update-script { }; + tests = { + withSubmodules = pico-sdk.override { withSubmodules = true; }; + }; + }; + + meta = { description = "SDK provides the headers, libraries and build system necessary to write programs for the RP2040-based devices"; - license = licenses.bsd3; - maintainers = with maintainers; [ muscaln ]; - platforms = platforms.unix; + homepage = "https://github.com/raspberrypi/pico-sdk"; + changelog = "https://github.com/raspberrypi/pico-sdk/releases/tag/${finalAttrs.version}"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ muscaln ]; + platforms = lib.platforms.unix; }; }) From 8b1b464a82465ea7a2f1c2c8e2c50249d6606ce9 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sun, 5 Jan 2025 01:44:18 +0100 Subject: [PATCH 2/2] picotool: 2.0.0 -> 2.1.0 --- pkgs/by-name/pi/picotool/package.nix | 39 ++++++++++++++++++---------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/pi/picotool/package.nix b/pkgs/by-name/pi/picotool/package.nix index 54a8b4f8e6d9..76460c9d24e5 100644 --- a/pkgs/by-name/pi/picotool/package.nix +++ b/pkgs/by-name/pi/picotool/package.nix @@ -7,17 +7,19 @@ libusb1, pico-sdk, mbedtls_2, + versionCheckHook, + gitUpdater, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "picotool"; - version = "2.0.0"; + version = "2.1.0"; src = fetchFromGitHub { owner = "raspberrypi"; - repo = pname; - rev = version; - sha256 = "sha256-z7EFk3qxg1PoKZQpUQqjhttZ2RkhhhiMdYc9TkXzkwk="; + repo = "picotool"; + tag = finalAttrs.version; + hash = "sha256-aGhh19/dl6o/3hbmKJGVh22qSHeCqxST2PoWzxmc7KQ="; }; postPatch = '' @@ -42,12 +44,23 @@ stdenv.mkDerivation rec { install -Dm444 ../udev/99-picotool.rules -t $out/etc/udev/rules.d ''; - meta = with lib; { - homepage = "https://github.com/raspberrypi/picotool"; - description = "Tool for interacting with RP2040/RP2350 device(s) in BOOTSEL mode, or with an RP2040/RP2350 binary"; - mainProgram = "picotool"; - license = licenses.bsd3; - maintainers = with maintainers; [ muscaln ]; - platforms = platforms.unix; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + versionCheckProgramArg = [ "version" ]; + doInstallCheck = true; + + passthru = { + updateScript = gitUpdater { }; }; -} + + meta = { + description = "Tool for interacting with RP2040/RP2350 device(s) in BOOTSEL mode, or with an RP2040/RP2350 binary"; + homepage = "https://github.com/raspberrypi/picotool"; + changelog = "https://github.com/raspberrypi/picotool/releases/tag/${finalAttrs.version}"; + mainProgram = "picotool"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ muscaln ]; + platforms = lib.platforms.unix; + }; +})