push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchFromGitHub,
alsa-lib,
cmake,
pkg-config,
glib,
tracingSupport ? true,
logToStderr ? true,
}:
let
oz = x: if x then "1" else "0";
in
stdenv.mkDerivation rec {
pname = "apulse";
version = "0.1.14";
src = fetchFromGitHub {
owner = "i-rinat";
repo = pname;
rev = "v${version}";
sha256 = "sha256-SWvQvS9QBOevOSRpjY3XpyhzWoHAkXzkk8Mh4ovltNI=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
alsa-lib
glib
];
cmakeFlags = [
"-DWITH_TRACE=${oz tracingSupport}"
"-DLOG_TO_STDERR=${oz logToStderr}"
];
meta = with lib; {
description = "PulseAudio emulation for ALSA";
homepage = "https://github.com/i-rinat/apulse";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ maintainers.jagajaga ];
mainProgram = "apulse";
};
}

View File

@@ -0,0 +1,91 @@
{
stdenv,
apulse,
libpulseaudio,
pkg-config,
intltool,
}:
stdenv.mkDerivation {
pname = "libpressureaudio";
version = apulse.version;
src = libpulseaudio.src;
nativeBuildInputs = [
pkg-config
intltool
];
dontConfigure = true;
dontBuild = true;
installPhase = ''
echo "Copying libraries from apulse."
mkdir -p $out/lib
ls ${apulse}/lib/apulse $out/lib
cp -a ${apulse}/lib/apulse/* $out/lib/
echo "Copying headers from pulseaudio."
mkdir -p $out/include/pulse
cp -a src/pulse/*.h $out/include/pulse
echo "Generating custom pkgconfig definitions."
mkdir -p $out/lib/pkgconfig
for a in libpulse.pc libpulse-simple.pc libpulse-mainloop-glib.pc ; do
cat > $out/lib/pkgconfig/$a << EOF
prefix=$out
libdir=$out/lib
includedir=$out/include
EOF
done
cat >> $out/lib/pkgconfig/libpulse.pc << EOF
Name: libpulse
Description: PulseAudio Client Interface
Version: ${libpulseaudio.version}-rebootstrapped
Libs: -L$out/lib -lpulse
Cflags: -I$out/include -D_REENTRANT
EOF
cat >> $out/lib/pkgconfig/libpulse-simple.pc << EOF
Name: libpulse-simple
Description: PulseAudio Simplified Synchronous Client Interface
Version: ${libpulseaudio.version}-rebootstrapped
Libs: -L$out/lib -lpulse-simple
Cflags: -I$out/include -D_REENTRANT
Requires: libpulse
EOF
cat >> $out/lib/pkgconfig/libpulse-mainloop-glib.pc << EOF
Name: libpulse-mainloop-glib
Description: PulseAudio GLib 2.0 Main Loop Wrapper
Version: ${libpulseaudio.version}-rebootstrapped
Libs: -L$out/lib -lpulse-mainloop-glib
Cflags: -I$out/include -D_REENTRANT
Requires: libpulse glib-2.0
EOF
'';
meta = apulse.meta // {
description = "Libpulse without any sound daemons over pure ALSA";
longDescription = ''
apulse (${apulse.meta.homepage}) implements most of libpulse
API over pure ALSA in 5% LOC of the original PulseAudio.
But apulse is made to be used as a wrapper that substitutes its
replacement libs into LD_LIBRARY_PATH. The problem with that is
that you still have to link against the original libpulse.
pressureaudio (http://git.r-36.net/pressureaudio/) wraps apulse
with everything you need to replace libpulse completely.
This derivation is a reimplementation of pressureaudio in pure
nix.
You can simply override libpulse with this and most
packages would just work.
'';
};
}