about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/dbus
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-09-11 15:24:55 +0000
committerAlyssa Ross <hi@alyssa.is>2019-09-16 22:14:45 +0000
commit89c4dccbd5f33f71808d4b1baafe619696af1162 (patch)
treefb1b8d3a2f171164a05d404ab2340cfb1a9d3e21 /nixpkgs/pkgs/development/libraries/dbus
parent8920a0e4d962a919238bab69ddc607d7f3396f70 (diff)
parente19054ab3cd5b7cc9a01d0efc71c8fe310541065 (diff)
downloadnixlib-89c4dccbd5f33f71808d4b1baafe619696af1162.tar
nixlib-89c4dccbd5f33f71808d4b1baafe619696af1162.tar.gz
nixlib-89c4dccbd5f33f71808d4b1baafe619696af1162.tar.bz2
nixlib-89c4dccbd5f33f71808d4b1baafe619696af1162.tar.lz
nixlib-89c4dccbd5f33f71808d4b1baafe619696af1162.tar.xz
nixlib-89c4dccbd5f33f71808d4b1baafe619696af1162.tar.zst
nixlib-89c4dccbd5f33f71808d4b1baafe619696af1162.zip
Merge commit 'e19054ab3cd5b7cc9a01d0efc71c8fe310541065'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/dbus')
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus/default.nix191
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus/make-dbus-conf.nix2
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus/make-session-conf.xsl1
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus/systemd.patch14
4 files changed, 104 insertions, 104 deletions
diff --git a/nixpkgs/pkgs/development/libraries/dbus/default.nix b/nixpkgs/pkgs/development/libraries/dbus/default.nix
index abc32b90c6b8..616ad869d57c 100644
--- a/nixpkgs/pkgs/development/libraries/dbus/default.nix
+++ b/nixpkgs/pkgs/development/libraries/dbus/default.nix
@@ -1,92 +1,105 @@
-{ stdenv, lib, fetchurl, pkgconfig, expat, systemd
-, libX11 ? null, libICE ? null, libSM ? null, x11Support ? (stdenv.isLinux || stdenv.isDarwin) }:
+{ stdenv
+, lib
+, fetchurl
+, pkgconfig
+, expat
+, systemd
+, libX11 ? null
+, libICE ? null
+, libSM ? null
+, x11Support ? (stdenv.isLinux || stdenv.isDarwin)
+, dbus
+}:
+
+assert
+  x11Support ->
+    libX11 != null && libICE != null && libSM != null;
+
+stdenv.mkDerivation rec {
+  pname = "dbus";
+  version = "1.12.16";
 
-assert x11Support -> libX11 != null
-                  && libICE != null
-                  && libSM != null;
+  src = fetchurl {
+    url = "https://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz";
+    sha256 = "107ckxaff1cv4q6kmfdi2fb1nlsv03312a7kf6lb4biglhpjv8jl";
+  };
 
-let
-  version = "1.12.16";
-  sha256 = "107ckxaff1cv4q6kmfdi2fb1nlsv03312a7kf6lb4biglhpjv8jl";
-
-self = stdenv.mkDerivation {
-    name = "dbus-${version}";
-    inherit version;
-
-    src = fetchurl {
-      url = "https://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz";
-      inherit sha256;
-    };
-
-    patches = lib.optional stdenv.isSunOS ./implement-getgrouplist.patch;
-    postPatch = ''
-      substituteInPlace tools/Makefile.in \
-        --replace 'install-localstatelibDATA:' 'disabled:' \
-        --replace 'install-data-local:' 'disabled:' \
-        --replace 'installcheck-local:' 'disabled:'
-      substituteInPlace bus/Makefile.in \
-        --replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus' ':'
-    '' + /* cleanup of runtime references */ ''
-      substituteInPlace ./dbus/dbus-sysdeps-unix.c \
-        --replace 'DBUS_BINDIR "/dbus-launch"' "\"$lib/bin/dbus-launch\""
-      substituteInPlace ./tools/dbus-launch.c \
-        --replace 'DBUS_DAEMONDIR"/dbus-daemon"' '"/run/current-system/sw/bin/dbus-daemon"'
-    '';
-
-    outputs = [ "out" "dev" "lib" "doc" ];
-
-    nativeBuildInputs = [ pkgconfig ];
-    propagatedBuildInputs = [ expat ];
-    buildInputs = lib.optional stdenv.isLinux systemd
-      ++ lib.optionals x11Support [ libX11 libICE libSM ];
-    # ToDo: optional selinux?
-
-    configureFlags = [
-      "--localstatedir=/var"
-      "--sysconfdir=/etc"
-      "--with-session-socket-dir=/tmp"
-      "--with-system-pid-file=/run/dbus/pid"
-      "--with-system-socket=/run/dbus/system_bus_socket"
-      "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
-      "--with-systemduserunitdir=$(out)/etc/systemd/user"
-      "--enable-user-session"
-      "--datadir=/etc"
-      "--libexecdir=$(out)/libexec"
-    ] ++ lib.optional (!x11Support) "--without-x";
-
-    # Enable X11 autolaunch support in libdbus. This doesn't actually depend on X11
-    # (it just execs dbus-launch in dbus.tools), contrary to what the configure script demands.
-    # problems building without x11Support so disabled in that case for now
-    NIX_CFLAGS_COMPILE = lib.optionalString x11Support "-DDBUS_ENABLE_X11_AUTOLAUNCH=1";
-    NIX_CFLAGS_LINK = lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed";
-
-    enableParallelBuilding = true;
-
-    doCheck = true;
-
-    installFlags = [ "sysconfdir=$(out)/etc" "datadir=$(out)/share" ];
-
-    postInstall = ''
-      mkdir -p "$out/share/xml/dbus"
-      cp doc/*.dtd "$out/share/xml/dbus"
-    '';
-
-    # it's executed from $lib by absolute path
-    postFixup = ''
-      moveToOutput bin/dbus-launch "$lib"
-      ln -s "$lib/bin/dbus-launch" "$out/bin/"
-    '';
-
-    passthru = {
-      dbus-launch = "${self.lib}/bin/dbus-launch";
-      daemon = self.out;
-    };
-
-    meta = with stdenv.lib; {
-      description = "Simple interprocess messaging system";
-      homepage = http://www.freedesktop.org/wiki/Software/dbus/;
-      license = licenses.gpl2Plus; # most is also under AFL-2.1
-      platforms = platforms.unix;
-    };
+  patches = lib.optional stdenv.isSunOS ./implement-getgrouplist.patch;
+
+  postPatch = ''
+    substituteInPlace tools/Makefile.in \
+      --replace 'install-localstatelibDATA:' 'disabled:' \
+      --replace 'install-data-local:' 'disabled:' \
+      --replace 'installcheck-local:' 'disabled:'
+    substituteInPlace bus/Makefile.in \
+      --replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus' ':'
+  '' + /* cleanup of runtime references */ ''
+    substituteInPlace ./dbus/dbus-sysdeps-unix.c \
+      --replace 'DBUS_BINDIR "/dbus-launch"' "\"$lib/bin/dbus-launch\""
+    substituteInPlace ./tools/dbus-launch.c \
+      --replace 'DBUS_DAEMONDIR"/dbus-daemon"' '"/run/current-system/sw/bin/dbus-daemon"'
+  '';
+
+  outputs = [ "out" "dev" "lib" "doc" ];
+
+  nativeBuildInputs = [
+    pkgconfig
+  ];
+
+  propagatedBuildInputs = [
+    expat
+  ];
+
+  buildInputs = lib.optionals x11Support [
+    libX11
+    libICE
+    libSM
+  ] ++ lib.optional stdenv.isLinux systemd;
+  # ToDo: optional selinux?
+
+  configureFlags = [
+    "--enable-user-session"
+    "--libexecdir=${placeholder ''out''}/libexec"
+    "--localstatedir=/var"
+    "--runstatedir=/run"
+    "--sysconfdir=/etc"
+    "--with-session-socket-dir=/tmp"
+    "--with-system-pid-file=/run/dbus/pid"
+    "--with-system-socket=/run/dbus/system_bus_socket"
+    "--with-systemdsystemunitdir=${placeholder ''out''}/etc/systemd/system"
+    "--with-systemduserunitdir=${placeholder ''out''}/etc/systemd/user"
+  ] ++ lib.optional (!x11Support) "--without-x";
+
+  # Enable X11 autolaunch support in libdbus. This doesn't actually depend on X11
+  # (it just execs dbus-launch in dbus.tools), contrary to what the configure script demands.
+  # problems building without x11Support so disabled in that case for now
+  NIX_CFLAGS_COMPILE = lib.optionalString x11Support "-DDBUS_ENABLE_X11_AUTOLAUNCH=1";
+  NIX_CFLAGS_LINK = lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed";
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  installFlags = [
+    "sysconfdir=${placeholder ''out''}/etc"
+    "datadir=${placeholder ''out''}/share"
+  ];
+
+  # it's executed from $lib by absolute path
+  postFixup = ''
+    moveToOutput bin/dbus-launch "$lib"
+    ln -s "$lib/bin/dbus-launch" "$out/bin/"
+  '';
+
+  passthru = {
+    dbus-launch = "${dbus.lib}/bin/dbus-launch";
+    daemon = dbus.out;
+  };
+
+  meta = with stdenv.lib; {
+    description = "Simple interprocess messaging system";
+    homepage = http://www.freedesktop.org/wiki/Software/dbus/;
+    license = licenses.gpl2Plus; # most is also under AFL-2.1
+    platforms = platforms.unix;
   };
-in self
+}
diff --git a/nixpkgs/pkgs/development/libraries/dbus/make-dbus-conf.nix b/nixpkgs/pkgs/development/libraries/dbus/make-dbus-conf.nix
index 5d441c5d1331..e714b96b7e9f 100644
--- a/nixpkgs/pkgs/development/libraries/dbus/make-dbus-conf.nix
+++ b/nixpkgs/pkgs/development/libraries/dbus/make-dbus-conf.nix
@@ -22,7 +22,7 @@ runCommand "dbus-1"
       <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
         <rewriteSystem
           systemIdStartString="http://www.freedesktop.org/standards/dbus/1.0/"
-          rewritePrefix="file://${dbus}/share/xml/dbus/"/>
+          rewritePrefix="file://${dbus}/share/xml/dbus-1/"/>
       </catalog>
     '';
     nativeBuildInputs = [ libxslt.bin ];
diff --git a/nixpkgs/pkgs/development/libraries/dbus/make-session-conf.xsl b/nixpkgs/pkgs/development/libraries/dbus/make-session-conf.xsl
index 9544aa13db56..6a19ee14a22c 100644
--- a/nixpkgs/pkgs/development/libraries/dbus/make-session-conf.xsl
+++ b/nixpkgs/pkgs/development/libraries/dbus/make-session-conf.xsl
@@ -24,6 +24,7 @@
       <xsl:for-each select="str:tokenize($serviceDirectories)">
         <servicedir><xsl:value-of select="." />/share/dbus-1/services</servicedir>
         <includedir><xsl:value-of select="." />/etc/dbus-1/session.d</includedir>
+        <includedir><xsl:value-of select="." />/share/dbus-1/session.d</includedir>
       </xsl:for-each>
     </busconfig>
   </xsl:template>
diff --git a/nixpkgs/pkgs/development/libraries/dbus/systemd.patch b/nixpkgs/pkgs/development/libraries/dbus/systemd.patch
deleted file mode 100644
index 7e6cb1f87d07..000000000000
--- a/nixpkgs/pkgs/development/libraries/dbus/systemd.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index 24fcc9e..98e0459 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1167,7 +1167,8 @@ else
-     PKG_CHECK_MODULES(SYSTEMD,
-         [libsystemd-login >= 32, libsystemd-daemon >= 32],
-         have_systemd=yes,
--        have_systemd=no)
-+        have_systemd=yes)
-+    AC_MSG_NOTICE([NixOS: do not care whether we found systemd or not])
- fi
- 
- if test x$have_systemd = xyes; then