10 stdenv.mkDerivation rec {
12 version = "20240926-102326";
14 src = fetchFromGitHub {
15 owner = "raspberrypi";
18 hash = "sha256-9m7PAw1WNQlfqOr5hDXrCsZlZLBmvoGUT58NN2cVolw=";
21 buildInputs = [ libusb1 ];
22 nativeBuildInputs = [ pkg-config ];
25 sed -i "s@/usr/@$out/@g" main.c
30 mkdir -p $out/share/rpiboot
32 cp -r msd firmware eeprom-erase mass-storage-gadget* recovery* secure-boot* rpi-imager-embedded $out/share/rpiboot
35 passthru.updateScript = gitUpdater { };
38 homepage = "https://github.com/raspberrypi/usbboot";
39 changelog = "https://github.com/raspberrypi/usbboot/blob/${version}/debian/changelog";
40 description = "Utility to boot a Raspberry Pi CM/CM3/CM4/Zero over USB";
41 mainProgram = "rpiboot";
42 license = lib.licenses.asl20;
43 maintainers = with lib.maintainers; [