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-04-27 09:35:20 +00:00
|
|
|
version = "2.1.1";
|
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-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-/OYYfIJWMT+rBBhSCtHaSWvwRMlReEQ5y4FuMfk5zUg=";
|
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
|
|
|
|
|
|
|
installPhase = ''
|
2021-10-08 15:17:17 +00:00
|
|
|
runHook preInstall
|
2021-12-06 16:07:01 +00:00
|
|
|
cd "v${lib.versions.majorMinor version}.x"
|
2021-05-03 20:48:10 +00:00
|
|
|
mkdir -p $out/lib/firmware/intel/
|
|
|
|
cp -a sof-v${version} $out/lib/firmware/intel/sof
|
|
|
|
cp -a sof-tplg-v${version} $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;
|
|
|
|
};
|
|
|
|
}
|