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";
|
2024-10-11 05:15:48 +00:00
|
|
|
version = "1.2.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-07-27 06:49:29 +00:00
|
|
|
url = "mirror://alsa/lib/alsa-lib-${finalAttrs.version}.tar.bz2";
|
2024-10-11 05:15:48 +00:00
|
|
|
hash = "sha256-SGjNkIYnJ52lpjT0aHAWJb6MwlHYQmLH5baiGDka0NI=";
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "aserver";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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
|
|
|
})
|