2024-10-24 18:03:10 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
libusb1,
|
|
|
|
pkg-config,
|
|
|
|
}:
|
2018-04-05 04:23:16 +00:00
|
|
|
|
2021-07-30 23:50:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-12-25 02:15:53 +00:00
|
|
|
pname = "rpiboot";
|
2023-01-18 14:49:38 +00:00
|
|
|
version = "20221215-105525";
|
2018-04-05 04:23:16 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "raspberrypi";
|
|
|
|
repo = "usbboot";
|
2023-01-18 14:49:38 +00:00
|
|
|
rev = version;
|
|
|
|
hash = "sha256-Y77IrDblXmnpZleJ3zTyiGDYLZ7gNxASXpqUzwS1NCU=";
|
2018-04-05 04:23:16 +00:00
|
|
|
};
|
|
|
|
|
2023-01-18 14:49:38 +00:00
|
|
|
buildInputs = [ libusb1 ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2018-04-05 04:23:16 +00:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i "s@/usr/@$out/@g" main.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share/rpiboot
|
|
|
|
cp rpiboot $out/bin
|
|
|
|
cp -r msd $out/share/rpiboot
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/raspberrypi/usbboot";
|
2024-10-04 19:35:12 +00:00
|
|
|
changelog = "https://github.com/raspberrypi/usbboot/blob/${version}/debian/changelog";
|
2021-07-30 23:50:18 +00:00
|
|
|
description = "Utility to boot a Raspberry Pi CM/CM3/CM4/Zero over USB";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "rpiboot";
|
2020-12-25 02:15:53 +00:00
|
|
|
license = licenses.asl20;
|
2024-10-24 18:03:10 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
cartr
|
|
|
|
flokli
|
|
|
|
];
|
|
|
|
platforms = [
|
|
|
|
"aarch64-linux"
|
|
|
|
"aarch64-darwin"
|
|
|
|
"armv7l-linux"
|
|
|
|
"armv6l-linux"
|
|
|
|
"x86_64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
];
|
2018-04-05 04:23:16 +00:00
|
|
|
};
|
|
|
|
}
|