2022-12-02 08:20:57 +00:00
|
|
|
{ lib, buildPackages, stdenvNoCC, autoreconfHook, fetchurl, fetchpatch }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2021-09-26 12:46:18 +00:00
|
|
|
pname = "alsa-firmware";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "1.2.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-09-26 12:46:18 +00:00
|
|
|
url = "mirror://alsa/firmware/alsa-firmware-${version}.tar.bz2";
|
2022-01-13 20:06:32 +00:00
|
|
|
sha256 = "sha256-tnttfQi8/CR+9v8KuIqZwYgwWjz1euLf0LzZpbNs1bs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
patches = [
|
|
|
|
# fixes some includes / missing types on musl libc; should not make a difference for other platforms
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/void-linux/void-packages/ae690000017d5fd355ab397c49202426e3a01c11/srcpkgs/alsa-firmware/patches/musl.patch";
|
|
|
|
sha256 = "sha256-4A+TBBvpz14NwMNewLc2LQL51hnz4EZlZ44rhnx5dnc=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-hotplug-dir=$(out)/lib/firmware"
|
|
|
|
];
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# These are lifted from the Arch PKGBUILD
|
|
|
|
# remove files which conflicts with linux-firmware
|
|
|
|
rm -rf $out/lib/firmware/{ct{efx,speq}.bin,ess,korg,sb16,yamaha}
|
|
|
|
# remove broken symlinks (broken upstream)
|
|
|
|
rm -rf $out/lib/firmware/turtlebeach
|
|
|
|
# remove empty dir
|
|
|
|
rm -rf $out/bin
|
|
|
|
'';
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.alsa-project.org/";
|
|
|
|
description = "Soundcard firmwares from the alsa project";
|
2022-01-13 20:06:32 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ l-as ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|