diff --git a/pkgs/desktops/gnome-2/desktop/mail-notification/default.nix b/pkgs/desktops/gnome-2/desktop/mail-notification/default.nix new file mode 100644 index 000000000000..36608f4294bd --- /dev/null +++ b/pkgs/desktops/gnome-2/desktop/mail-notification/default.nix @@ -0,0 +1,53 @@ +{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, glib, gnome2, dbus_glib, gmime, libnotify, libgnome_keyring, openssl, cyrus_sasl, gnonlin, sylpheed, gob2, gettext, intltool, libxml2, hicolor_icon_theme, tango-icon-theme }: + +stdenv.mkDerivation rec { + rev = "9ae8768"; + version = "5.4"; + name = "mail-notification-${version}"; + + src = fetchFromGitHub { + inherit rev; + owner = "epienbroek"; + repo = "mail-notification"; + sha256 = "1slb7gajn30vdaq0hf5rikwdly1npmg1cf83hpjs82xd98knl13d"; + }; + + buildInputs = [ pkgconfig glib dbus_glib gmime libnotify libgnome_keyring openssl cyrus_sasl gnonlin sylpheed gob2 gettext intltool gnome2.GConf gnome2.libgnomeui dbus_glib gmime libnotify gnome2.gnome_keyring gnome2.scrollkeeper libxml2 gnome2.gnome_icon_theme hicolor_icon_theme tango-icon-theme ]; + + prePatch = '' + sed -i -e '/jb_rule_set_install_message/d' -e '/jb_rule_add_install_command/d' jbsrc/jb.c + + # currently disable the check for missing sheme until a better solution + # is found; needed, because otherwise the application doesn't even start + # and fails saying it unable to find gconf scheme values. + sed -i -e 's/(schema_missing)/(!schema_missing)/g' src/mn-conf.c + ''; + + patches = [ + ./patches/mail-notification-dont-link-against-bsd-compat.patch + ]; + + patchFlags = "-p0"; + NIX_CFLAGS_COMPILE = "-Wno-error"; + + preConfigure = "./jb configure prefix=$out"; + + postConfigure = '' + substituteInPlace build/config \ + --replace "omf-dir|string|1|${gnome2.scrollkeeper}/share/omf" "omf-dir|string|1|$out/share/omf" \ + --replace "scrollkeeper-dir|string|1|${gnome2.scrollkeeper}/var/lib/scrollkeeper" "omf-dir|string|1|$out/var/lib/scrollkeeper" \ + ''; + + buildPhase = "./jb build"; + installPhase = "./jb install"; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Tray status icon, which notifies us when new email arrives"; + homepage = "http://www.nongnu.org/mailnotify/"; + license = with licenses; [ gpl3 ]; + platforms = platforms.unix; + maintainers = [ maintainers.eleanor ]; + }; +} diff --git a/pkgs/desktops/gnome-2/desktop/mail-notification/patches/mail-notification-dont-link-against-bsd-compat.patch b/pkgs/desktops/gnome-2/desktop/mail-notification/patches/mail-notification-dont-link-against-bsd-compat.patch new file mode 100644 index 000000000000..e246a8cc9389 --- /dev/null +++ b/pkgs/desktops/gnome-2/desktop/mail-notification/patches/mail-notification-dont-link-against-bsd-compat.patch @@ -0,0 +1,10 @@ +--- jbsrc/jb.c.orig 2014-01-19 20:06:48.525462981 +0100 ++++ jbsrc/jb.c 2014-01-19 20:07:36.087934897 +0100 +@@ -425,7 +425,6 @@ + */ + jb_compile_options_add_cflags(object->compile_options, "-std=c99"); + jb_compile_options_add_cppflags(object->compile_options, "-D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L"); +- jb_compile_options_add_libs(object->compile_options, "-lbsd-compat"); + } + + jb_compile_options_add_string_defines(object->compile_options, diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4667c90de096..910df7d74af7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13745,6 +13745,8 @@ in lyx = qt5.callPackage ../applications/misc/lyx { }; + mail-notification = callPackage ../desktops/gnome-2/desktop/mail-notification {}; + magnetophonDSP = { CharacterCompressor = callPackage ../applications/audio/magnetophonDSP/CharacterCompressor { }; CompBus = callPackage ../applications/audio/magnetophonDSP/CompBus { };