From 43ef7e29252faecd2e1d46c8bf7ac84b8910048e Mon Sep 17 00:00:00 2001 From: Anders Papitto Date: Wed, 3 Jun 2015 23:42:37 -0700 Subject: [PATCH] make a wrapper so that dunst can find dbus-launch Prior to this change, the following would fail nix-shell --pure -p dunst --command dunst while this would succeed nix-shell --pure -p dunst -p dbus_daemon --command dunst because dunst tries to execve 'dbus-launch'. The same issue hit if dunst was used inside a (user) systemd service (which is what I actually care about). --- pkgs/applications/misc/dunst/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/dunst/default.nix b/pkgs/applications/misc/dunst/default.nix index 33371c93b86..c398c3c43d0 100644 --- a/pkgs/applications/misc/dunst/default.nix +++ b/pkgs/applications/misc/dunst/default.nix @@ -1,6 +1,7 @@ -{ stdenv, fetchurl, coreutils , unzip, which, pkgconfig , dbus -, freetype, xdg_utils , libXext, glib, pango , cairo, libX11, libnotify -, libxdg_basedir , libXScrnSaver, xproto, libXinerama , perl, gdk_pixbuf +{ stdenv, fetchurl, coreutils, unzip, which, pkgconfig, dbus +, freetype, xdg_utils, libXext, glib, pango, cairo, libX11, libnotify +, libxdg_basedir, libXScrnSaver, xproto, libXinerama, perl, gdk_pixbuf +, dbus_daemon, makeWrapper }: stdenv.mkDerivation rec { @@ -15,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ coreutils unzip which pkgconfig dbus freetype libnotify gdk_pixbuf xdg_utils libXext glib pango cairo libX11 libxdg_basedir - libXScrnSaver xproto libXinerama perl]; + libXScrnSaver xproto libXinerama perl dbus_daemon makeWrapper ]; buildPhase = '' export VERSION=${version}; @@ -23,6 +24,11 @@ stdenv.mkDerivation rec { make dunst; ''; + postFixup = '' + wrapProgram "$out/bin/dunst" \ + --prefix PATH : '${dbus_daemon}/bin' + ''; + meta = { description = "lightweight and customizable notification daemon"; homepage = http://www.knopwob.org/dunst/;