2021-10-06 11:47:41 +02:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
2020-04-28 07:25:38 +02:00
|
|
|
|
2021-10-06 11:47:41 +02:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2020-04-28 07:25:38 +02:00
|
|
|
pname = "sof-firmware";
|
2021-12-26 16:07:19 +01:00
|
|
|
version = "2.0";
|
2020-04-28 07:25:38 +02:00
|
|
|
|
2020-06-09 11:22:02 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thesofproject";
|
|
|
|
repo = "sof-bin";
|
2021-04-30 15:02:09 +02:00
|
|
|
rev = "v${version}";
|
2021-12-26 16:07:19 +01:00
|
|
|
sha256 = "sha256-pDxNcDe/l1foFYuHB0w3YZidKIeH6h0IuwRmMzeMteE=";
|
2020-04-28 07:25:38 +02:00
|
|
|
};
|
|
|
|
|
2021-04-30 15:02:09 +02:00
|
|
|
dontFixup = true; # binaries must not be stripped or patchelfed
|
2020-04-28 07:25:38 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-10-06 11:47:41 +02:00
|
|
|
runHook preInstall
|
2021-11-28 11:54:14 +01:00
|
|
|
cd "v${lib.versions.majorMinor version}.x"
|
2021-04-30 15:02:09 +02: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-06 11:47:41 +02:00
|
|
|
runHook postInstall
|
2020-04-28 07:25:38 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-28 07:25:38 +02:00
|
|
|
description = "Sound Open Firmware";
|
|
|
|
homepage = "https://www.sofproject.org/";
|
|
|
|
license = with licenses; [ bsd3 isc ];
|
2021-04-30 15:02:09 +02:00
|
|
|
maintainers = with maintainers; [ lblasc evenbrenden hmenke ];
|
2020-04-28 07:25:38 +02:00
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|