Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libusb1, pico-sdk }: 2 3stdenv.mkDerivation rec { 4 pname = "picotool"; 5 version = "1.1.1"; 6 7 src = fetchFromGitHub { 8 owner = "raspberrypi"; 9 repo = pname; 10 rev = version; 11 sha256 = "sha256-KP5Cq6pYKQI5dV6S4lLapu9EcwAgLgYpK0qreNDZink="; 12 }; 13 14 buildInputs = [ libusb1 pico-sdk ]; 15 nativeBuildInputs = [ cmake pkg-config ]; 16 cmakeFlags = [ "-DPICO_SDK_PATH=${pico-sdk}/lib/pico-sdk" ]; 17 18 meta = with lib; { 19 homepage = "https://github.com/raspberrypi/picotool"; 20 description = "Tool for interacting with a RP2040 device in BOOTSEL mode, or with a RP2040 binary"; 21 license = licenses.bsd3; 22 maintainers = with maintainers; [ muscaln ]; 23 platforms = platforms.unix; 24 }; 25}