2016-06-19 20:47:30 +01:00
|
|
|
{ stdenv, fetchFromGitHub }:
|
2013-01-27 17:49:02 +00:00
|
|
|
|
2016-06-19 20:47:30 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "raspberrypi-firmware-${version}";
|
|
|
|
version = "1.20160620";
|
2013-08-27 11:03:19 +01:00
|
|
|
|
2016-06-19 20:47:30 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "raspberrypi";
|
|
|
|
repo = "firmware";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "06g691px0abndp5zvz2ba1g675rcqb64n055h5ahgnlck5cdpawg";
|
2013-01-27 17:49:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
2016-03-08 17:20:57 +00:00
|
|
|
|
|
|
|
for f in $out/bin/*; do
|
2016-06-19 20:47:30 +01:00
|
|
|
if isELF "$f"; then
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f"
|
|
|
|
patchelf --set-rpath "$out/lib" "$f"
|
|
|
|
fi
|
2016-03-08 17:20:57 +00:00
|
|
|
done
|
2013-01-27 17:49:02 +00:00
|
|
|
'';
|
2014-11-06 00:44:33 +00:00
|
|
|
|
2016-04-13 20:02:57 +01:00
|
|
|
meta = with stdenv.lib; {
|
2013-01-27 17:49:02 +00:00
|
|
|
description = "Firmware for the Raspberry Pi board";
|
|
|
|
homepage = https://github.com/raspberrypi;
|
2016-04-13 20:02:57 +01:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = [ "armv6l-linux" "armv7l-linux" ];
|
|
|
|
maintainers = with maintainers; [ viric tavyc ];
|
2013-01-27 17:49:02 +00:00
|
|
|
};
|
|
|
|
}
|