forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / al / alsa-lib / package.nix
blob8647c91f3f033b5364305e01ce27de6ffff75a39
1 { lib
2 , stdenv
3 , fetchurl
4 , alsa-topology-conf
5 , alsa-ucm-conf
6 , testers
7 }:
9 stdenv.mkDerivation (finalAttrs: {
10   pname = "alsa-lib";
11   version = "1.2.12";
13   src = fetchurl {
14     url = "mirror://alsa/lib/alsa-lib-${finalAttrs.version}.tar.bz2";
15     hash = "sha256-SGjNkIYnJ52lpjT0aHAWJb6MwlHYQmLH5baiGDka0NI=";
16   };
18   patches = [
19     # Add a "libs" field to the syntax recognized in the /etc/asound.conf file.
20     # The nixos modules for pulseaudio, jack, and pipewire are leveraging this
21     # "libs" field to declare locations for both native and 32bit plugins, in
22     # order to support apps with 32bit sound running on x86_64 architecture.
23     ./alsa-plugin-conf-multilib.patch
24   ];
26   enableParallelBuilding = true;
28   postInstall = ''
29     ln -s ${alsa-ucm-conf}/share/alsa/{ucm,ucm2} $out/share/alsa
30     ln -s ${alsa-topology-conf}/share/alsa/topology $out/share/alsa
31   '';
33   outputs = [ "out" "dev" ];
35   passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
37   meta = with lib; {
38     homepage = "http://www.alsa-project.org/";
39     description = "ALSA, the Advanced Linux Sound Architecture libraries";
40     mainProgram = "aserver";
42     longDescription = ''
43       The Advanced Linux Sound Architecture (ALSA) provides audio and
44       MIDI functionality to the Linux-based operating system.
45     '';
47     license = licenses.lgpl21Plus;
48     pkgConfigModules = [ "alsa" "alsa-topology" ];
49     platforms = platforms.linux;
50     maintainers = with maintainers; [ l-as ];
51   };