2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, alsa-topology-conf
|
|
|
|
, alsa-ucm-conf
|
2023-02-09 11:40:11 +00:00
|
|
|
, testers
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-12-25 13:55:36 +00:00
|
|
|
pname = "alsa-lib";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "1.2.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-02-09 11:40:11 +00:00
|
|
|
url = "mirror://alsa/lib/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2";
|
2023-02-16 17:41:37 +00:00
|
|
|
hash = "sha256-GrAbdOM0JcqZwuNsCET9aIgnMZO9iYJA/o+TrMvL80c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
patches = [
|
|
|
|
# Add a "libs" field to the syntax recognized in the /etc/asound.conf file.
|
|
|
|
# The nixos modules for pulseaudio, jack, and pipewire are leveraging this
|
|
|
|
# "libs" field to declare locations for both native and 32bit plugins, in
|
|
|
|
# order to support apps with 32bit sound running on x86_64 architecture.
|
|
|
|
./alsa-plugin-conf-multilib.patch
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
ln -s ${alsa-ucm-conf}/share/alsa/{ucm,ucm2} $out/share/alsa
|
|
|
|
ln -s ${alsa-topology-conf}/share/alsa/topology $out/share/alsa
|
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.alsa-project.org/";
|
|
|
|
description = "ALSA, the Advanced Linux Sound Architecture libraries";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
The Advanced Linux Sound Architecture (ALSA) provides audio and
|
|
|
|
MIDI functionality to the Linux-based operating system.
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
2023-02-09 11:40:11 +00:00
|
|
|
pkgConfigModules = [ "alsa" "alsa-topology" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2022-01-26 04:04:25 +00:00
|
|
|
maintainers = with maintainers; [ l-as ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-02-09 11:40:11 +00:00
|
|
|
})
|