nixpkgs/pkgs/by-name/al/alsa-firmware/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, buildPackages, stdenvNoCC, autoreconfHook, fetchurl, fetchpatch }:
2015-03-16 14:45:21 +00:00
stdenvNoCC.mkDerivation rec {
pname = "alsa-firmware";
version = "1.2.4";
2015-03-16 14:45:21 +00:00
src = fetchurl {
url = "mirror://alsa/firmware/alsa-firmware-${version}.tar.bz2";
sha256 = "sha256-tnttfQi8/CR+9v8KuIqZwYgwWjz1euLf0LzZpbNs1bs=";
2015-03-16 14:45:21 +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=";
})
];
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ autoreconfHook ];
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
'';
meta = with lib; {
homepage = "http://www.alsa-project.org/";
description = "Soundcard firmwares from the alsa project";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ l-as ];
2015-03-16 14:45:21 +00:00
};
}