2020-03-06 02:58:17 +01:00
|
|
|
{ stdenv, buildPackages, autoreconfHook, fetchurl, fetchpatch }:
|
2015-03-16 15:45:21 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-11-25 07:54:48 +01:00
|
|
|
name = "alsa-firmware-1.2.1";
|
2015-03-16 15:45:21 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-10 20:56:20 +02:00
|
|
|
url = "mirror://alsa/firmware/${name}.tar.bz2";
|
2019-11-25 07:54:48 +01:00
|
|
|
sha256 = "1aq8z8ajpjvcx7bwhwp36bh5idzximyn77ygk3ifs0my3mbpr8mf";
|
2015-03-16 15:45:21 +01:00
|
|
|
};
|
|
|
|
|
2020-03-06 02:58:17 +01:00
|
|
|
patches = [ (fetchpatch {
|
|
|
|
url = "https://github.com/alsa-project/alsa-firmware/commit/a8a478485a999ff9e4a8d8098107d3b946b70288.patch";
|
|
|
|
sha256 = "0zd7vrgz00hn02va5bkv7qj2395a1rl6f8jq1mwbryxs7hiysb78";
|
|
|
|
}) ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook buildPackages.stdenv.cc ];
|
|
|
|
|
2018-07-25 23:44:21 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--with-hotplug-dir=$(out)/lib/firmware"
|
|
|
|
];
|
2015-03-16 15:45:21 +01:00
|
|
|
|
2015-03-17 01:12:21 +01:00
|
|
|
dontStrip = true;
|
2015-03-16 15:45:21 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# These are lifted from the Arch PKGBUILD
|
|
|
|
# remove files which conflicts with linux-firmware
|
2015-03-16 17:55:45 +01:00
|
|
|
rm -rf $out/lib/firmware/{ct{efx,speq}.bin,ess,korg,sb16,yamaha}
|
2015-03-16 15:45:21 +01:00
|
|
|
# remove broken symlinks (broken upstream)
|
2015-03-16 17:55:45 +01:00
|
|
|
rm -rf $out/lib/firmware/turtlebeach
|
2015-03-16 15:45:21 +01:00
|
|
|
# remove empty dir
|
2015-03-16 17:55:45 +01:00
|
|
|
rm -rf $out/bin
|
2015-03-16 15:45:21 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2018-06-10 20:56:20 +02:00
|
|
|
homepage = http://www.alsa-project.org/;
|
2015-03-18 21:22:33 +01:00
|
|
|
description = "Soundcard firmwares from the alsa project";
|
2015-03-16 15:45:21 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2015-03-16 15:45:21 +01:00
|
|
|
};
|
|
|
|
}
|