2021-06-10 04:57:09 +02:00
|
|
|
{ lib, stdenv, fetchurl , alsa-lib, }:
|
2015-04-22 16:28:37 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "zita-alsa-pcmi";
|
2018-10-07 17:33:10 +02:00
|
|
|
version = "0.3.2";
|
2015-04-22 16:28:37 +02:00
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
|
2018-10-07 17:33:10 +02:00
|
|
|
sha256 = "12d7vdg74yh21w69qi0wg57iz4876j94qbiq09bvscih6xz9y78s";
|
2015-04-22 16:28:37 +02:00
|
|
|
};
|
|
|
|
|
2021-06-10 04:57:09 +02:00
|
|
|
buildInputs = [ alsa-lib ];
|
2015-04-22 16:28:37 +02:00
|
|
|
|
|
|
|
buildPhase = ''
|
2018-10-07 17:33:10 +02:00
|
|
|
cd source
|
2015-04-22 16:28:37 +02:00
|
|
|
make PREFIX="$out"
|
|
|
|
|
|
|
|
# create lib link for building apps
|
|
|
|
ln -s libzita-alsa-pcmi.so.$version libzita-alsa-pcmi.so
|
|
|
|
|
|
|
|
# apps
|
|
|
|
cd ../apps
|
2018-10-07 17:33:10 +02:00
|
|
|
CXXFLAGS+=" -I../source" \
|
|
|
|
LDFLAGS+=" -L../source" \
|
2015-04-22 16:28:37 +02:00
|
|
|
make PREFIX="$out"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir "$out"
|
|
|
|
mkdir "$out/lib"
|
|
|
|
mkdir "$out/include"
|
|
|
|
mkdir "$out/bin"
|
|
|
|
|
2018-10-07 17:33:10 +02:00
|
|
|
cd ../source
|
2015-04-22 16:28:37 +02:00
|
|
|
|
2018-10-07 17:33:10 +02:00
|
|
|
# source
|
2015-04-22 16:28:37 +02:00
|
|
|
install -Dm755 libzita-alsa-pcmi.so.$version \
|
|
|
|
"$out/lib/libzita-alsa-pcmi.so.$version"
|
|
|
|
|
|
|
|
# link
|
|
|
|
ln -s libzita-alsa-pcmi.so.$version \
|
|
|
|
"$out/lib/libzita-alsa-pcmi.so"
|
|
|
|
ln -s libzita-alsa-pcmi.so.$version \
|
|
|
|
"$out/lib/libzita-alsa-pcmi.so.0"
|
|
|
|
|
|
|
|
# header
|
|
|
|
install -Dm644 zita-alsa-pcmi.h \
|
|
|
|
"$out/include/zita-alsa-pcmi.h"
|
|
|
|
|
|
|
|
# apps
|
|
|
|
install -Dm755 ../apps/alsa_delay \
|
|
|
|
"$out/bin/alsa_delay"
|
|
|
|
install -Dm755 ../apps/alsa_loopback \
|
2018-10-07 17:33:10 +02:00
|
|
|
"$out/bin/alsa_loopback"
|
2015-04-22 16:28:37 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The successor of clalsadrv, provides easy access to ALSA PCM devices";
|
2019-09-09 01:38:31 +02:00
|
|
|
version = version;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html";
|
2021-01-21 18:00:13 +01:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
maintainers = [ lib.maintainers.magnetophon ];
|
|
|
|
platforms = lib.platforms.linux;
|
2015-04-22 16:28:37 +02:00
|
|
|
};
|
|
|
|
}
|