tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
add libjack2-git
closes #9467
Andrew Kelley
10 years ago
3f47c2fb
0c874053
+79
2 changed files
expand all
collapse all
unified
split
pkgs
misc
jackaudio
git.nix
top-level
all-packages.nix
+78
pkgs/misc/jackaudio/git.nix
reviewed
···
1
1
+
{ stdenv, fetchFromGitHub, pkgconfig, python, makeWrapper
2
2
+
, bash, libsamplerate, libsndfile, readline
3
3
+
4
4
+
# Optional Dependencies
5
5
+
, dbus ? null, pythonDBus ? null, libffado ? null, alsaLib ? null
6
6
+
, libopus ? null
7
7
+
8
8
+
# Extra options
9
9
+
, prefix ? ""
10
10
+
}:
11
11
+
12
12
+
with stdenv.lib;
13
13
+
let
14
14
+
shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
15
15
+
16
16
+
libOnly = prefix == "lib";
17
17
+
18
18
+
optDbus = shouldUsePkg dbus;
19
19
+
optPythonDBus = if libOnly then null else shouldUsePkg pythonDBus;
20
20
+
optLibffado = if libOnly then null else shouldUsePkg libffado;
21
21
+
optAlsaLib = if libOnly then null else shouldUsePkg alsaLib;
22
22
+
optLibopus = shouldUsePkg libopus;
23
23
+
in
24
24
+
stdenv.mkDerivation rec {
25
25
+
name = "${prefix}jack2-${version}";
26
26
+
version = "2015-09-03";
27
27
+
28
28
+
src = fetchFromGitHub {
29
29
+
owner = "jackaudio";
30
30
+
repo = "jack2";
31
31
+
rev = "2e8c5502c692a25f1c0213f3f7eeba1f4434da3c";
32
32
+
sha256 = "0r1xdshm251yqb748r5l5f6xpznhwlqyyxkky7vgx5m2q51qb0a1";
33
33
+
};
34
34
+
35
35
+
nativeBuildInputs = [ pkgconfig python makeWrapper ];
36
36
+
buildInputs = [
37
37
+
python
38
38
+
39
39
+
libsamplerate libsndfile readline
40
40
+
41
41
+
optDbus optPythonDBus optLibffado optAlsaLib optLibopus
42
42
+
];
43
43
+
44
44
+
patchPhase = ''
45
45
+
substituteInPlace svnversion_regenerate.sh --replace /bin/bash ${bash}/bin/bash
46
46
+
'';
47
47
+
48
48
+
configurePhase = ''
49
49
+
python waf configure --prefix=$out \
50
50
+
${optionalString (optDbus != null) "--dbus"} \
51
51
+
--classic \
52
52
+
--profile \
53
53
+
${optionalString (optLibffado != null) "--firewire"} \
54
54
+
${optionalString (optAlsaLib != null) "--alsa"} \
55
55
+
--autostart=${if (optDbus != null) then "dbus" else "classic"} \
56
56
+
'';
57
57
+
58
58
+
buildPhase = ''
59
59
+
python waf build
60
60
+
'';
61
61
+
62
62
+
installPhase = ''
63
63
+
python waf install
64
64
+
'' + (if libOnly then ''
65
65
+
rm -rf $out/{bin,share}
66
66
+
rm -rf $out/lib/{jack,libjacknet*,libjackserver*}
67
67
+
'' else ''
68
68
+
wrapProgram $out/bin/jack_control --set PYTHONPATH $PYTHONPATH
69
69
+
'');
70
70
+
71
71
+
meta = {
72
72
+
description = "JACK audio connection kit, version 2 with jackdbus";
73
73
+
homepage = "http://jackaudio.org";
74
74
+
license = licenses.gpl2Plus;
75
75
+
platforms = platforms.unix;
76
76
+
maintainers = with maintainers; [ goibhniu wkennington ];
77
77
+
};
78
78
+
}
+1
pkgs/top-level/all-packages.nix
reviewed
···
14901
14901
libopus = libopus.override { withCustomModes = true; };
14902
14902
};
14903
14903
libjack2 = jack2Full.override { prefix = "lib"; };
14904
14904
+
libjack2-git = callPackage ../misc/jackaudio/git.nix { };
14904
14905
14905
14906
keynav = callPackage ../tools/X11/keynav { };
14906
14907