-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
/
default.nix
64 lines (52 loc) · 1.57 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{ lib, stdenv, fetchurl , alsa-lib, }:
stdenv.mkDerivation rec {
pname = "zita-alsa-pcmi";
version = "0.4.0";
src = fetchurl {
url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
sha256 = "sha256-vYyfNg37VB+2DkinE7rx4i1BssdMGaD+ny005y9Q8cU=";
};
buildInputs = [ alsa-lib ];
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";
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.magnetophon ];
platforms = lib.platforms.linux;
};
}