1 { lib, stdenv, fetchFromGitHub, libusb1, pkg-config }:
3 stdenv.mkDerivation rec {
5 version = "20221215-105525";
7 src = fetchFromGitHub {
11 hash = "sha256-Y77IrDblXmnpZleJ3zTyiGDYLZ7gNxASXpqUzwS1NCU=";
14 buildInputs = [ libusb1 ];
15 nativeBuildInputs = [ pkg-config ];
18 sed -i "s@/usr/@$out/@g" main.c
23 mkdir -p $out/share/rpiboot
25 cp -r msd $out/share/rpiboot
29 homepage = "https://github.com/raspberrypi/usbboot";
30 description = "Utility to boot a Raspberry Pi CM/CM3/CM4/Zero over USB";
31 license = licenses.asl20;
32 maintainers = with maintainers; [ cartr flokli ];
33 platforms = [ "aarch64-linux" "aarch64-darwin" "armv7l-linux" "armv6l-linux" "x86_64-linux" "x86_64-darwin" ];