2021-06-28 23:13:55 +00:00
|
|
|
{ lib, stdenv, fetchurl , alsa-lib, }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "zita-alsa-pcmi";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.5.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-zyAKaO22She1e/+zPjiwSHeCctGLVYnT0vWgHODzSwc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
buildInputs = [ alsa-lib ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cd source
|
|
|
|
make PREFIX="$out"
|
|
|
|
|
|
|
|
# create lib link for building apps
|
|
|
|
ln -s libzita-alsa-pcmi.so.$version libzita-alsa-pcmi.so
|
|
|
|
|
|
|
|
# apps
|
|
|
|
cd ../apps
|
|
|
|
CXXFLAGS+=" -I../source" \
|
|
|
|
LDFLAGS+=" -L../source" \
|
|
|
|
make PREFIX="$out"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir "$out"
|
|
|
|
mkdir "$out/lib"
|
|
|
|
mkdir "$out/include"
|
|
|
|
mkdir "$out/bin"
|
|
|
|
|
|
|
|
cd ../source
|
|
|
|
|
|
|
|
# source
|
|
|
|
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 \
|
|
|
|
"$out/bin/alsa_loopback"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The successor of clalsadrv, provides easy access to ALSA PCM devices";
|
|
|
|
version = version;
|
|
|
|
homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
maintainers = [ lib.maintainers.magnetophon ];
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|