Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

59 lines
1.4 KiB
Nix

{
lib,
stdenv,
alsa-utils,
installShellFiles,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "alsa-utils-nhlt";
inherit (alsa-utils) version src;
outputs = [
"out"
"man"
];
nativeBuildInputs = [ installShellFiles ];
# The configure script insists on various headers and libraries from
# alsa-lib and cannot be convinced to forego the respective checks. To
# avoid dependency on alsa-lib we therefore circumvent the usual build
# flow and compile the source directly.
dontConfigure = true;
postPatch = ''
# The aconfig.h header is normally generated by the configure script and
# even though included it is not actually used. Drop in an empty dummy
# header.
touch nhlt/aconfig.h
'';
buildPhase = ''
runHook preBuild
# Compile flags -g -O2 mirroring configure script.
$CC -g -O2 -o nhlt-dmic-info nhlt/nhlt-dmic-info.c
runHook postBuild
'';
installPhase = ''
runHook preInstall
installBin nhlt-dmic-info
installManPage nhlt/nhlt-dmic-info.1
runHook postInstall
'';
meta = {
description = "Tool to extract microphone array information from ACPI NHLT table";
homepage = "http://www.alsa-project.org/";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ mvs ];
mainProgram = "nhlt-dmic-info";
platforms = lib.platforms.linux;
};
})