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