1 { lib, stdenv, fetchFromGitHub, cmake, pkg-config, libusb1, pico-sdk }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-YjDHoRcDoezyli42bJ0bnfjdNNY8l6ZilrxhOudqvwE=";
14 buildInputs = [ libusb1 pico-sdk ];
15 nativeBuildInputs = [ cmake pkg-config ];
16 cmakeFlags = [ "-DPICO_SDK_PATH=${pico-sdk}/lib/pico-sdk" ];
20 install -Dm755 ./picotool -t $out/bin
25 homepage = "https://github.com/raspberrypi/picotool";
26 description = "Tool for interacting with a RP2040 device in BOOTSEL mode, or with a RP2040 binary";
27 license = licenses.bsd3;
28 maintainers = with maintainers; [ muscaln ];
29 platforms = platforms.unix;