mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 08:31:59 +00:00
d8cd615720
- Use fetchFromGitHub - Some files in bin/ are now shell scripts, so skip patchelf on any non-ELF files. With this U-Boot can be successfully launched on a RPi 3.
36 lines
962 B
Nix
36 lines
962 B
Nix
{ stdenv, fetchFromGitHub }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "raspberrypi-firmware-${version}";
|
|
version = "1.20160620";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "raspberrypi";
|
|
repo = "firmware";
|
|
rev = version;
|
|
sha256 = "06g691px0abndp5zvz2ba1g675rcqb64n055h5ahgnlck5cdpawg";
|
|
};
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/share/raspberrypi/boot
|
|
cp -R boot/* $out/share/raspberrypi/boot
|
|
cp -R hardfp/opt/vc/* $out
|
|
cp opt/vc/LICENCE $out/share/raspberrypi
|
|
|
|
for f in $out/bin/*; do
|
|
if isELF "$f"; then
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f"
|
|
patchelf --set-rpath "$out/lib" "$f"
|
|
fi
|
|
done
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Firmware for the Raspberry Pi board";
|
|
homepage = https://github.com/raspberrypi;
|
|
license = licenses.unfree;
|
|
platforms = [ "armv6l-linux" "armv7l-linux" ];
|
|
maintainers = with maintainers; [ viric tavyc ];
|
|
};
|
|
}
|