2022-11-27 14:25:28 +00:00
|
|
|
{ lib, buildPackages, stdenvNoCC, autoreconfHook, fetchurl, fetchpatch }:
|
2015-03-16 14:45:21 +00:00
|
|
|
|
2022-08-12 15:51:22 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2021-08-27 14:47:49 +00:00
|
|
|
pname = "alsa-firmware";
|
2021-12-19 19:11:40 +00:00
|
|
|
version = "1.2.4";
|
2015-03-16 14:45:21 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-27 14:47:49 +00:00
|
|
|
url = "mirror://alsa/firmware/alsa-firmware-${version}.tar.bz2";
|
2021-12-19 19:11:40 +00:00
|
|
|
sha256 = "sha256-tnttfQi8/CR+9v8KuIqZwYgwWjz1euLf0LzZpbNs1bs=";
|
2015-03-16 14:45:21 +00:00
|
|
|
};
|
|
|
|
|
2022-11-27 14:25:28 +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=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-12-19 19:11:40 +00:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2020-03-06 01:58:17 +00:00
|
|
|
|
2018-07-25 21:44:21 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-hotplug-dir=$(out)/lib/firmware"
|
|
|
|
];
|
2015-03-16 14:45:21 +00:00
|
|
|
|
2015-03-17 00:12:21 +00:00
|
|
|
dontStrip = true;
|
2015-03-16 14:45:21 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# These are lifted from the Arch PKGBUILD
|
|
|
|
# remove files which conflicts with linux-firmware
|
2015-03-16 16:55:45 +00:00
|
|
|
rm -rf $out/lib/firmware/{ct{efx,speq}.bin,ess,korg,sb16,yamaha}
|
2015-03-16 14:45:21 +00:00
|
|
|
# remove broken symlinks (broken upstream)
|
2015-03-16 16:55:45 +00:00
|
|
|
rm -rf $out/lib/firmware/turtlebeach
|
2015-03-16 14:45:21 +00:00
|
|
|
# remove empty dir
|
2015-03-16 16:55:45 +00:00
|
|
|
rm -rf $out/bin
|
2015-03-16 14:45:21 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-19 19:11:40 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.alsa-project.org/";
|
2015-03-18 20:22:33 +00:00
|
|
|
description = "Soundcard firmwares from the alsa project";
|
2021-12-19 19:11:40 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ l-as ];
|
2015-03-16 14:45:21 +00:00
|
|
|
};
|
|
|
|
}
|