2021-10-08 15:17:17 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2020-05-15 21:57:56 +00:00
|
|
|
pname = "sof-firmware";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "2.2.2";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thesofproject";
|
|
|
|
repo = "sof-bin";
|
2021-05-03 20:48:10 +00:00
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-ztewE/8Mc0bbKbxmbJ2sBn3TysuM9hoaSgqrboy77oI=";
|
2020-05-15 21:57:56 +00:00
|
|
|
};
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
dontFixup = true; # binaries must not be stripped or patchelfed
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# There is no proper structure in the upstream repo.
|
|
|
|
# This needs to be adapted by hand for every new release.
|
2020-05-15 21:57:56 +00:00
|
|
|
installPhase = ''
|
2021-10-08 15:17:17 +00:00
|
|
|
runHook preInstall
|
2022-11-21 17:40:18 +00:00
|
|
|
cd "v2.2.x"
|
|
|
|
mkdir -p $out/lib/firmware/intel/sof{,-tplg}
|
|
|
|
cp -a sof-v2.2/* $out/lib/firmware/intel/sof
|
|
|
|
cp -a sof-v2.2.2/* $out/lib/firmware/intel/sof
|
|
|
|
cp -a sof-tplg-v2.2.1/* $out/lib/firmware/intel/sof-tplg
|
2021-10-08 15:17:17 +00:00
|
|
|
runHook postInstall
|
2020-05-15 21:57:56 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-15 21:57:56 +00:00
|
|
|
description = "Sound Open Firmware";
|
|
|
|
homepage = "https://www.sofproject.org/";
|
|
|
|
license = with licenses; [ bsd3 isc ];
|
2021-05-03 20:48:10 +00:00
|
|
|
maintainers = with maintainers; [ lblasc evenbrenden hmenke ];
|
2020-05-15 21:57:56 +00:00
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|