tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
Merge #288092: pulseaudio: 16.1 -> 17.0
...into staging
Vladimír Čunát
2 years ago
c36301d6
5ec0e034
+6
-237
9 changed files
expand all
collapse all
unified
split
pkgs
servers
pulseaudio
0001-Make-gio-2.0-optional-16.patch
0002-Ignore-SCM_CREDS-on-darwin.patch
0003-Ignore-HAVE_CPUID_H-on-aarch64-darwin.patch
0004-Prefer-HAVE_CLOCK_GETTIME-on-darwin.patch
0005-Enable-CoreAudio-on-darwin.patch
0006-Fix-libpulsecommon-sources-on-darwin.patch
0007-Fix-link-args-on-darwin.patch
add-option-for-installation-sysconfdir.patch
default.nix
-26
pkgs/servers/pulseaudio/0001-Make-gio-2.0-optional-16.patch
···
1
1
-
From 72f3fe059f031f24c5ad026cb2fc16318f227c09 Mon Sep 17 00:00:00 2001
2
2
-
From: Andrew Childs <andrew.childs@bibo.com.ph>
3
3
-
Date: Tue, 19 Apr 2022 16:29:58 +0900
4
4
-
Subject: [PATCH 1/8] Make gio-2.0 optional when gsettings is disabled
5
5
-
6
6
-
Derived from https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/654
7
7
-
---
8
8
-
meson.build | 2 +-
9
9
-
1 file changed, 1 insertion(+), 1 deletion(-)
10
10
-
11
11
-
diff --git a/meson.build b/meson.build
12
12
-
index c5135330f..340f58e17 100644
13
13
-
--- a/meson.build
14
14
-
+++ b/meson.build
15
15
-
@@ -683,7 +683,7 @@ if get_option('daemon')
16
16
-
cdata.set('HAVE_ALSA_UCM', 1)
17
17
-
endif
18
18
-
19
19
-
- gio_dep = dependency('gio-2.0', version : '>= 2.26.0')
20
20
-
+ gio_dep = dependency('gio-2.0', version : '>= 2.26.0', required : false)
21
21
-
if get_option('gsettings').enabled()
22
22
-
assert(gio_dep.found(), 'GSettings support needs glib I/O library (GIO)')
23
23
-
cdata.set('HAVE_GSETTINGS', 1)
24
24
-
--
25
25
-
2.35.1
26
26
-
-27
pkgs/servers/pulseaudio/0002-Ignore-SCM_CREDS-on-darwin.patch
···
1
1
-
From 39bef695f783614e6175477417298ddf37e2ac13 Mon Sep 17 00:00:00 2001
2
2
-
From: Andrew Childs <andrew.childs@bibo.com.ph>
3
3
-
Date: Tue, 19 Apr 2022 16:58:43 +0900
4
4
-
Subject: [PATCH 2/8] Ignore SCM_CREDS on macOS
5
5
-
6
6
-
It was added for FreeBSD support, but also enables the
7
7
-
unsupported[citation needed] feature on macOS.
8
8
-
---
9
9
-
src/pulsecore/creds.h | 2 +-
10
10
-
1 file changed, 1 insertion(+), 1 deletion(-)
11
11
-
12
12
-
diff --git a/src/pulsecore/creds.h b/src/pulsecore/creds.h
13
13
-
index b599b569c..b5b1c9f37 100644
14
14
-
--- a/src/pulsecore/creds.h
15
15
-
+++ b/src/pulsecore/creds.h
16
16
-
@@ -34,7 +34,7 @@
17
17
-
typedef struct pa_creds pa_creds;
18
18
-
typedef struct pa_cmsg_ancil_data pa_cmsg_ancil_data;
19
19
-
20
20
-
-#if defined(SCM_CREDENTIALS) || defined(SCM_CREDS)
21
21
-
+#if defined(SCM_CREDENTIALS) || (defined(SCM_CREDS) && !defined(__APPLE__))
22
22
-
23
23
-
#define HAVE_CREDS 1
24
24
-
25
25
-
--
26
26
-
2.35.1
27
27
-
-26
pkgs/servers/pulseaudio/0003-Ignore-HAVE_CPUID_H-on-aarch64-darwin.patch
···
1
1
-
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
2
2
-
index c383a61c0..3d0a68c2e 100644
3
3
-
--- a/src/pulsecore/core-util.c
4
4
-
+++ b/src/pulsecore/core-util.c
5
5
-
@@ -110,7 +110,7 @@
6
6
-
#include <sys/personality.h>
7
7
-
#endif
8
8
-
9
9
-
-#ifdef HAVE_CPUID_H
10
10
-
+#if defined(HAVE_CPUID_H) && !(defined(__APPLE__) && defined(__aarch64__))
11
11
-
#include <cpuid.h>
12
12
-
#endif
13
13
-
14
14
-
diff --git a/src/pulsecore/cpu-x86.c b/src/pulsecore/cpu-x86.c
15
15
-
index 317a0101e..d1eb95d2b 100644
16
16
-
--- a/src/pulsecore/cpu-x86.c
17
17
-
+++ b/src/pulsecore/cpu-x86.c
18
18
-
@@ -24,7 +24,7 @@
19
19
-
20
20
-
#include <stdint.h>
21
21
-
22
22
-
-#ifdef HAVE_CPUID_H
23
23
-
+#if defined(HAVE_CPUID_H) && !(defined(__APPLE__) && defined(__aarch64__))
24
24
-
#include <cpuid.h>
25
25
-
#endif
26
26
-
-13
pkgs/servers/pulseaudio/0004-Prefer-HAVE_CLOCK_GETTIME-on-darwin.patch
···
1
1
-
diff --git a/src/pulsecore/core-rtclock.c b/src/pulsecore/core-rtclock.c
2
2
-
index 2c2e28631..b946a3fb1 100644
3
3
-
--- a/src/pulsecore/core-rtclock.c
4
4
-
+++ b/src/pulsecore/core-rtclock.c
5
5
-
@@ -65,7 +65,7 @@ pa_usec_t pa_rtclock_age(const struct timeval *tv) {
6
6
-
7
7
-
struct timeval *pa_rtclock_get(struct timeval *tv) {
8
8
-
9
9
-
-#if defined(OS_IS_DARWIN)
10
10
-
+#if defined(OS_IS_DARWIN) && !defined(HAVE_CLOCK_GETTIME)
11
11
-
uint64_t val, abs_time = mach_absolute_time();
12
12
-
Nanoseconds nanos;
13
13
-
-31
pkgs/servers/pulseaudio/0005-Enable-CoreAudio-on-darwin.patch
···
1
1
-
diff --git a/meson.build b/meson.build
2
2
-
index c5135330f..055567479 100644
3
3
-
--- a/meson.build
4
4
-
+++ b/meson.build
5
5
-
@@ -185,6 +185,7 @@ endif
6
6
-
# rather than ending up in the config.h file?
7
7
-
if host_machine.system() == 'darwin'
8
8
-
cdata.set('OS_IS_DARWIN', 1)
9
9
-
+ cdata.set('HAVE_COREAUDIO', 1)
10
10
-
cdata.set('_DARWIN_C_SOURCE', '200112L') # Needed to get NSIG on Mac OS
11
11
-
elif host_machine.system() == 'windows'
12
12
-
cdata.set('OS_IS_WIN32', 1)
13
13
-
diff --git a/src/modules/meson.build b/src/modules/meson.build
14
14
-
index 1e12569dc..53a800927 100644
15
15
-
--- a/src/modules/meson.build
16
16
-
+++ b/src/modules/meson.build
17
17
-
@@ -63,6 +63,14 @@ all_modules = [
18
18
-
[ 'module-volume-restore', 'module-volume-restore.c' ],
19
19
-
]
20
20
-
21
21
-
+if host_machine.system() == 'darwin'
22
22
-
+ coreaudio_dep = dependency('appleframeworks', modules : ['AudioUnit', 'Cocoa', 'CoreServices', 'CoreAudio'])
23
23
-
+ all_modules += [
24
24
-
+ [ 'module-coreaudio-detect', 'macosx/module-coreaudio-detect.c', [], [], [coreaudio_dep] ],
25
25
-
+ [ 'module-coreaudio-device', 'macosx/module-coreaudio-device.c', [], [], [coreaudio_dep] ],
26
26
-
+ ]
27
27
-
+endif
28
28
-
+
29
29
-
if host_machine.system() == 'windows'
30
30
-
winmm_dep = meson.get_compiler('c').find_library('winmm')
31
31
-
ksuser_dep = meson.get_compiler('c').find_library('ksuser')
-18
pkgs/servers/pulseaudio/0006-Fix-libpulsecommon-sources-on-darwin.patch
···
1
1
-
diff --git a/src/meson.build b/src/meson.build
2
2
-
index 9efb561d8..d181f4867 100644
3
3
-
--- a/src/meson.build
4
4
-
+++ b/src/meson.build
5
5
-
@@ -179,6 +179,13 @@ if host_machine.system() == 'windows'
6
6
-
'pulsecore/semaphore-win32.c',
7
7
-
'pulsecore/thread-win32.c',
8
8
-
]
9
9
-
+elif host_machine.system() == 'darwin'
10
10
-
+ libpulsecommon_sources += [
11
11
-
+ 'pulsecore/mutex-posix.c',
12
12
-
+ 'pulsecore/poll-posix.c',
13
13
-
+ 'pulsecore/semaphore-osx.c',
14
14
-
+ 'pulsecore/thread-posix.c'
15
15
-
+ ]
16
16
-
else
17
17
-
libpulsecommon_sources += [
18
18
-
'pulsecore/mutex-posix.c',
-75
pkgs/servers/pulseaudio/0007-Fix-link-args-on-darwin.patch
···
1
1
-
diff --git a/meson.build b/meson.build
2
2
-
index c5135330f..1b66a1fc4 100644
3
3
-
--- a/meson.build
4
4
-
+++ b/meson.build
5
5
-
@@ -424,7 +424,7 @@ cdata.set('MESON_BUILD', 1)
6
6
-
# so we request the nodelete flag to be enabled.
7
7
-
# On other systems, we don't really know how to do that, but it's welcome if somebody can tell.
8
8
-
# Windows doesn't support this flag.
9
9
-
-if host_machine.system() != 'windows'
10
10
-
+if host_machine.system() not in ['windows', 'darwin']
11
11
-
nodelete_link_args = ['-Wl,-z,nodelete']
12
12
-
else
13
13
-
nodelete_link_args = []
14
14
-
diff --git a/src/modules/echo-cancel/meson.build b/src/modules/echo-cancel/meson.build
15
15
-
index 641cd35e7..523bffac4 100644
16
16
-
--- a/src/modules/echo-cancel/meson.build
17
17
-
+++ b/src/modules/echo-cancel/meson.build
18
18
-
@@ -10,12 +10,17 @@ libwebrtc_util_sources = [
19
19
-
'webrtc.cc'
20
20
-
]
21
21
-
22
22
-
+ignore_unresolved_symbols_link_args = ['-Wl,--unresolved-symbols=ignore-in-object-files']
23
23
-
+if meson.get_compiler('c').get_linker_id() == 'ld64'
24
24
-
+ ignore_unresolved_symbols_link_args = [ '-Wl,-undefined,dynamic_lookup' ]
25
25
-
+endif
26
26
-
+
27
27
-
libwebrtc_util = shared_library('webrtc-util',
28
28
-
libwebrtc_util_sources,
29
29
-
cpp_args : [pa_c_args, server_c_args],
30
30
-
include_directories : [configinc, topinc],
31
31
-
dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libatomic_ops_dep, webrtc_dep, libintl_dep],
32
32
-
- link_args : [nodelete_link_args, '-Wl,--unresolved-symbols=ignore-in-object-files'],
33
33
-
+ link_args : [nodelete_link_args, ignore_unresolved_symbols_link_args],
34
34
-
install : true,
35
35
-
install_rpath : privlibdir,
36
36
-
install_dir : modlibexecdir,
37
37
-
diff --git a/src/modules/meson.build b/src/modules/meson.build
38
38
-
index 1e12569dc..66f3e46a4 100644
39
39
-
--- a/src/modules/meson.build
40
40
-
+++ b/src/modules/meson.build
41
41
-
@@ -298,6 +298,11 @@ all_modules += [
42
42
-
# FIXME: meson doesn't support multiple RPATH arguments currently
43
43
-
rpath_dirs = join_paths(privlibdir) + ':' + join_paths(modlibexecdir)
44
44
-
45
45
-
+no_undefined_link_args = ['-Wl,--no-undefined']
46
46
-
+if meson.get_compiler('c').get_linker_id() == 'ld64'
47
47
-
+ no_undefined_link_args = [ '-Wl,-undefined,error' ]
48
48
-
+endif
49
49
-
+
50
50
-
foreach m : all_modules
51
51
-
name = m[0]
52
52
-
sources = m[1]
53
53
-
@@ -315,7 +320,7 @@ foreach m : all_modules
54
54
-
install_rpath : rpath_dirs,
55
55
-
install_dir : modlibexecdir,
56
56
-
dependencies : [thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep, platform_dep, platform_socket_dep] + extra_deps,
57
57
-
- link_args : [nodelete_link_args, '-Wl,--no-undefined' ],
58
58
-
+ link_args : [nodelete_link_args, no_undefined_link_args ],
59
59
-
link_with : extra_libs,
60
60
-
name_prefix : '',
61
61
-
implicit_include_directories : false)
62
62
-
diff --git a/src/pulse/meson.build b/src/pulse/meson.build
63
63
-
index 1b82c807c..938e4addd 100644
64
64
-
--- a/src/pulse/meson.build
65
65
-
+++ b/src/pulse/meson.build
66
66
-
@@ -75,6 +75,9 @@ run_target('update-map-file',
67
67
-
[ libpulse_headers, 'simple.h', join_paths(meson.build_root(), 'src', 'pulse', 'version.h') ] ])
68
68
-
69
69
-
versioning_link_args = '-Wl,-version-script=' + join_paths(meson.source_root(), 'src', 'pulse', 'map-file')
70
70
-
+if meson.get_compiler('c').get_linker_id() == 'ld64'
71
71
-
+ versioning_link_args = []
72
72
-
+endif
73
73
-
74
74
-
libpulse = shared_library('pulse',
75
75
-
libpulse_sources,
+1
-8
pkgs/servers/pulseaudio/add-option-for-installation-sysconfdir.patch
···
74
74
)
75
75
76
76
system_conf = configuration_data()
77
77
-
@@ -136,12 +136,12 @@ custom_target('system.pa',
77
77
+
@@ -136,6 +136,6 @@ custom_target('system.pa',
78
78
command : [m4, '@INPUT@'],
79
79
build_by_default : true,
80
80
install : true,
81
81
- install_dir : pulsesysconfdir,
82
82
+ install_dir : pulsesysconfdir_install,
83
83
)
84
84
-
85
85
-
if dbus_dep.found()
86
86
-
install_data('pulseaudio-system.conf',
87
87
-
- install_dir : join_paths(sysconfdir, 'dbus-1', 'system.d')
88
88
-
+ install_dir : join_paths(sysconfdir_install, 'dbus-1', 'system.d')
89
89
-
)
90
90
-
endif
91
84
92
85
--- a/src/pulse/meson.build
93
86
+++ b/src/pulse/meson.build
+5
-13
pkgs/servers/pulseaudio/default.nix
···
3
3
, xorg, libcap, alsa-lib, glib, dconf
4
4
, avahi, libjack2, libasyncns, lirc, dbus
5
5
, sbc, bluez5, udev, openssl, fftwFloat
6
6
-
, soxr, speexdsp, systemd, webrtc-audio-processing
6
6
+
, soxr, speexdsp, systemd, webrtc-audio-processing_1
7
7
, gst_all_1
8
8
, check, libintl, meson, ninja, m4, wrapGAppsHook
9
9
···
37
37
38
38
stdenv.mkDerivation rec {
39
39
pname = "${lib.optionalString libOnly "lib"}pulseaudio";
40
40
-
version = "16.1";
40
40
+
version = "17.0";
41
41
42
42
src = fetchurl {
43
43
url = "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-${version}.tar.xz";
44
44
-
sha256 = "sha256-ju8yzpHUeXn5X9mpNec4zX63RjQw2rxyhjJRdR5QSuQ=";
44
44
+
hash = "sha256-BTeU1mcaPjl9hJ5HioC4KmPLnYyilr01tzMXu1zrh7U=";
45
45
};
46
46
47
47
patches = [
48
48
# Install sysconfdir files inside of the nix store,
49
49
# but use a conventional runtime sysconfdir outside the store
50
50
./add-option-for-installation-sysconfdir.patch
51
51
-
# https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/654 (merged)
52
52
-
./0001-Make-gio-2.0-optional-16.patch
53
53
-
# https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/746 (merged)
54
54
-
./0002-Ignore-SCM_CREDS-on-darwin.patch
55
55
-
./0003-Ignore-HAVE_CPUID_H-on-aarch64-darwin.patch
56
56
-
./0004-Prefer-HAVE_CLOCK_GETTIME-on-darwin.patch
57
57
-
./0005-Enable-CoreAudio-on-darwin.patch
58
58
-
./0006-Fix-libpulsecommon-sources-on-darwin.patch
59
59
-
./0007-Fix-link-args-on-darwin.patch
60
51
];
61
52
62
53
outputs = [ "out" "dev" ];
···
74
65
++ lib.optionals stdenv.isLinux [ glib dbus ]
75
66
++ lib.optionals stdenv.isDarwin [ AudioUnit Cocoa CoreServices CoreAudio libintl ]
76
67
++ lib.optionals (!libOnly) (
77
77
-
[ libasyncns webrtc-audio-processing ]
68
68
+
[ libasyncns webrtc-audio-processing_1 ]
78
69
++ lib.optional jackaudioSupport libjack2
79
70
++ lib.optionals x11Support [ xorg.libICE xorg.libSM xorg.libX11 xorg.libXi xorg.libXtst ]
80
71
++ lib.optional useSystemd systemd
···
126
117
(lib.mesonOption "systemduserunitdir" "${placeholder "out"}/lib/systemd/user")
127
118
]
128
119
++ lib.optionals stdenv.isDarwin [
120
120
+
(lib.mesonEnable "consolekit" false)
129
121
(lib.mesonEnable "dbus" false)
130
122
(lib.mesonEnable "glib" false)
131
123
(lib.mesonEnable "oss-output" false)