nixpkgs/pkgs/os-specific/linux/firmware/sof-firmware/default.nix

36 lines
901 B
Nix
Raw Normal View History

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