1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-08 02:38:11 +09:00

miniaudio: export miniaudio header (#411069)

This commit is contained in:
Peder Bergebakken Sundt 2025-06-07 09:00:21 +02:00 committed by GitHub
commit 6f155bc0af
Signed by: github
GPG key ID: B5690EEEBB952194
2 changed files with 29 additions and 7 deletions

View file

@ -101,6 +101,8 @@ stdenv.mkDerivation rec {
'';
meta = {
# Fails to build on x86_64-linux as of 2025-03-16 and potentially earlier
broken = true;
description = "Jagged Alliance 2, with community fixes";
license = "SFI Source Code license agreement";
homepage = "https://ja2-stracciatella.github.io/";

View file

@ -2,32 +2,52 @@
lib,
stdenv,
fetchFromGitHub,
testers,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "miniaudio";
version = "0.11.22";
src = fetchFromGitHub {
owner = "mackron";
repo = "miniaudio";
rev = version;
rev = finalAttrs.version;
hash = "sha256-o/7sfBcrhyXEakccOAogQqm8dO4Szj1QSpaIHg6OSt4=";
};
installPhase = ''
mkdir -p $out
cp -r $src/* $out/
postInstall = ''
mkdir -p $out/include
mkdir -p $out/lib/pkgconfig
cp $src/miniaudio.h $out/include
ln -s $out/include/miniaudio.h $out
cp -r $src/extras $out/
cat <<EOF >$out/lib/pkgconfig/miniaudio.pc
prefix=$out
includedir=$out/include
Name: miniaudio
Description: An audio playback and capture library in a single source file.
Version: $version
Cflags: -I$out/include
Libs: -lm -lpthread -latomic
EOF
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "Single header audio playback and capture library written in C";
homepage = "https://github.com/mackron/miniaudio";
changelog = "https://github.com/mackron/miniaudio/blob/${src.rev}/CHANGES.md";
changelog = "https://github.com/mackron/miniaudio/blob/${finalAttrs.version}/CHANGES.md";
license = with licenses; [
unlicense # or
mit0
];
maintainers = [ maintainers.jansol ];
pkgConfigModules = [ "miniaudio" ];
platforms = platforms.all;
};
}
})