1 { lib, stdenv, fetchFromGitHub, cmake, pkg-config, libusb1, pico-sdk }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-OcQJeiva6X2rUyh1rJ+w4O2dWxaR7MwMfbHlnWuBVb8=";
14 buildInputs = [ libusb1 pico-sdk ];
15 nativeBuildInputs = [ cmake pkg-config ];
16 cmakeFlags = [ "-DPICO_SDK_PATH=${pico-sdk}/lib/pico-sdk" ];
19 install -Dm444 ../udev/99-picotool.rules -t $out/etc/udev/rules.d
23 homepage = "https://github.com/raspberrypi/picotool";
24 description = "Tool for interacting with a RP2040 device in BOOTSEL mode, or with a RP2040 binary";
25 mainProgram = "picotool";
26 license = licenses.bsd3;
27 maintainers = with maintainers; [ muscaln ];
28 platforms = platforms.unix;