summary refs log tree commit diff
path: root/pkgs/servers/pulseaudio
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-04-26 12:09:52 -0700
committerWilliam A. Kennington III <william@wkennington.com>2015-04-26 12:12:54 -0700
commit308429c6be02a5e6152d0981eb3c5a147a752134 (patch)
treece4ad5b69dca3db1ecb43cde9e22ee35fc425174 /pkgs/servers/pulseaudio
parent52b47982ff3e7530d304748e45433494a78214eb (diff)
downloadnixpkgs-308429c6be02a5e6152d0981eb3c5a147a752134.tar
nixpkgs-308429c6be02a5e6152d0981eb3c5a147a752134.tar.gz
nixpkgs-308429c6be02a5e6152d0981eb3c5a147a752134.tar.bz2
nixpkgs-308429c6be02a5e6152d0981eb3c5a147a752134.tar.lz
nixpkgs-308429c6be02a5e6152d0981eb3c5a147a752134.tar.xz
nixpkgs-308429c6be02a5e6152d0981eb3c5a147a752134.tar.zst
nixpkgs-308429c6be02a5e6152d0981eb3c5a147a752134.zip
pulseaudio: Fix propagation of libcap
Diffstat (limited to 'pkgs/servers/pulseaudio')
-rw-r--r--pkgs/servers/pulseaudio/caps-fix.patch13
-rw-r--r--pkgs/servers/pulseaudio/default.nix17
2 files changed, 25 insertions, 5 deletions
diff --git a/pkgs/servers/pulseaudio/caps-fix.patch b/pkgs/servers/pulseaudio/caps-fix.patch
new file mode 100644
index 00000000000..1d69a16982f
--- /dev/null
+++ b/pkgs/servers/pulseaudio/caps-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 3c71472..71b5c3d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -620,6 +620,8 @@ AC_ARG_WITH([caps],
+ 
+ if test "x${with_caps}" != "xno"; then
+     AC_SEARCH_LIBS([cap_init], [cap], [], [])
++    AS_IF([test "x${with_caps}" != "xyes" -a "x${with_caps}" != "x"],
++          LIBS="-L${with_caps}/lib $LIBS")
+ 
+     # Only give an error on hosts that we know could support capabilities
+     AC_CHECK_HEADERS([sys/capability.h], [], [
diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix
index 31c32fd7222..3ce3f73b424 100644
--- a/pkgs/servers/pulseaudio/default.nix
+++ b/pkgs/servers/pulseaudio/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, pkgconfig, gnum4, libtool
-, json_c, libsndfile, gettext, intltool, check
+{ stdenv, fetchurl, pkgconfig, intltool, automake, autoconf, libtool
+, json_c, libsndfile, gettext, check
 
 # Optional Dependencies
 , xlibs ? null, libcap ? null, valgrind ? null, oss ? null, coreaudio ? null
@@ -75,9 +75,11 @@ stdenv.mkDerivation rec {
     sha256 = "1xpnfxa0d8pgf6b4qdgnkcvrvdxbbbjd5ync19h0f5hbp3h401mm";
   };
 
-  nativeBuildInputs = [ pkgconfig gnum4 libtool ];
+  patches = [ ./caps-fix.patch ];
+
+  nativeBuildInputs = [ pkgconfig intltool automake autoconf libtool ];
   buildInputs = [
-    json_c libsndfile gettext intltool check database
+    json_c libsndfile gettext check database
 
     optLibcap valgrind optOss optCoreaudio optAlsaLib optEsound optGlib
     optGtk3 optGconf optAvahi optLibjack2 optLibasyncns optLirc optDbus optUdev
@@ -87,6 +89,11 @@ stdenv.mkDerivation rec {
     ]) ++ stdenv.lib.optionals (optBluez5 != null) [ optBluez5 optSbc ];
 
   preConfigure = ''
+    # Performs and autoreconf
+    export NOCONFIGURE="yes"
+    patchShebangs bootstrap.sh
+    ./bootstrap.sh
+
     # Move the udev rules under $(prefix).
     sed -i "src/Makefile.in" \
         -e "s|udevrulesdir[[:blank:]]*=.*$|udevrulesdir = $out/lib/udev/rules.d|g"
@@ -104,7 +111,7 @@ stdenv.mkDerivation rec {
     (mkEnable false                   "atomic-arm-memory-barrier"  null)         # TODO: Enable on armv8
     (mkEnable false                   "neon-opt"                   null)         # TODO: Enable on armv8
     (mkEnable hasXlibs                "x11"                        null)
-    (mkWith   hasCaps                 "caps"                       null)
+    (mkWith   hasCaps                 "caps"                       optLibcap)
     (mkEnable true                    "tests"                      null)
     (mkEnable false                   "samplerate"                 null)         # Deprecated
     (mkWith   true                    "database"                   databaseName)