forked from mirrors/nixpkgs
facetimehd-firmware: init at 1.43
This commit is contained in:
parent
a4fb3c27cc
commit
fdb5563bcc
|
@ -0,0 +1,51 @@
|
|||
{ stdenv, fetchurl, cpio, xz, pkgs }:
|
||||
|
||||
let
|
||||
|
||||
version = "1.43";
|
||||
|
||||
dmgRange = "420107885-421933300"; # the whole download is 1.3GB, this cuts it down to 2MB
|
||||
|
||||
firmwareIn = "./System/Library/Extensions/AppleCameraInterface.kext/Contents/MacOS/AppleCameraInterface";
|
||||
firmwareOut = "firmware.bin";
|
||||
firmwareOffset = "81920";
|
||||
firmwareSize = "603715";
|
||||
|
||||
# separated this here as the script will fail without the 'exit 0'
|
||||
unpack = pkgs.writeScriptBin "unpack" ''
|
||||
xzcat -Q $src | cpio --format odc -i -d ${firmwareIn}
|
||||
exit 0
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
name = "facetimehd-firmware-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://support.apple.com/downloads/DL1849/en_US/osxupd10.11.2.dmg";
|
||||
sha256 = "1jw6sy9vj27amfak83cs2c7q856y4mk1wix3rl4q10yvd9bl4k9x";
|
||||
curlOpts = "-r ${dmgRange}";
|
||||
};
|
||||
|
||||
phases = [ "buildPhase" ];
|
||||
|
||||
buildInputs = [ cpio xz ];
|
||||
|
||||
buildPhase = ''
|
||||
${unpack}/bin/unpack
|
||||
dd bs=1 skip=${firmwareOffset} count=${firmwareSize} if=${firmwareIn} of=${firmwareOut}.gz &> /dev/null
|
||||
mkdir -p $out/lib/firmware/facetimehd
|
||||
gunzip -c ${firmwareOut}.gz > $out/lib/firmware/facetimehd/${firmwareOut}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "facetimehd firmware";
|
||||
homepage = https://support.apple.com/downloads/DL1849;
|
||||
license = licenses.unfree;
|
||||
maintainers = [ maintainers.womfoo ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
||||
}
|
|
@ -9938,6 +9938,8 @@ let
|
|||
|
||||
eject = utillinux;
|
||||
|
||||
facetimehd-firmware = callPackage ../os-specific/linux/firmware/facetimehd-firmware { };
|
||||
|
||||
fanctl = callPackage ../os-specific/linux/fanctl {
|
||||
iproute = iproute.override { enableFan = true; };
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue