-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mail-notification: init at 5.4 #20855
mail-notification: init at 5.4 #20855
Conversation
@proteansec, thanks for your PR! By analyzing the history of the files in this pull request, we identified @zimbatm, @zraexy and @edolstra to be potential reviewers. |
|
||
# copy schemas | ||
mkdir -p $out/etc/gconf/schemas/ | ||
#GCONF_CONFIG_SOURCE="xml:merged:${gnome2.GConf}/etc/gconf/gconf.xml.defaults" ${gnome2.GConf}/bin/gconftool-2 --makefile-install-rule data/mail-notification.schemas.in.in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a debug leftover?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it's a debug leftover, which was now removed
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 || die |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does die()
come from? I'd expect set -e
in the generic setup script would be sufficient, is it not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
meta = with stdenv.lib; { | ||
description = "Tray status icon, which notifies us when new email arrives"; | ||
homepage = "http://www.nongnu.org/mailnotify/"; | ||
license = "GPL-3"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that should be lib.licenses.gpl3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
The patches are too large, please fetch from an external source if possible. |
@@ -15,17 +15,16 @@ stdenv.mkDerivation rec { | |||
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 || die | |||
set -e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set -e
is already enabled by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
58cbf0f
to
082fab1
Compare
I simplified the build: diff --git a/pkgs/desktops/gnome-2/desktop/mail-notification/default.nix b/pkgs/desktops/gnome-2/desktop/mail-notification/default.nix
index 05c2384afe..36608f4294 100644
--- a/pkgs/desktops/gnome-2/desktop/mail-notification/default.nix
+++ b/pkgs/desktops/gnome-2/desktop/mail-notification/default.nix
@@ -17,57 +17,29 @@ stdenv.mkDerivation rec {
prePatch = ''
sed -i -e '/jb_rule_set_install_message/d' -e '/jb_rule_add_install_command/d' jbsrc/jb.c
- # Ensure we never append -Werror
- sed -i -e 's/ -Werror//' jb 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-5.4-remove-ubuntu-special-case.patch
./patches/mail-notification-dont-link-against-bsd-compat.patch
];
patchFlags = "-p0";
+ NIX_CFLAGS_COMPILE = "-Wno-error";
- configurePhase = ''
- ./jb configure
- runHook postConfigure
- '';
+ preConfigure = "./jb configure prefix=$out";
postConfigure = ''
- sed -i -e "/^prefix/c prefix|string|1|$out" \
- -e 's/^pkgdatadir.*/pkgdatadir|string|0|$datadir/g' \
- build/config
-
- # 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
+ 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
- '';
-
- # the "./jb install" tries to install directly to nix store, which is not
- # writable, so we have to copy the files ourselves
- installPhase = ''
- # create directories
- mkdir -p $out/{bin,lib,libexec,share,etc,var}
-
- # copy executable
- cp ./build/src/mail-notification $out/bin/
-
- # copy icons
- cp -r art/* $out/share/
-
- # copy schemas
- mkdir -p $out/etc/gconf/schemas/
- cp data/mail-notification.schemas.in.in $out/etc/gconf/schemas/
-
- # copy properties dialogs
- cp ui/* $out/share/
- '';
+ buildPhase = "./jb build";
+ installPhase = "./jb install";
enableParallelBuilding = true;
diff --git a/pkgs/desktops/gnome-2/desktop/mail-notification/patches/mail-notification-5.4-remove-ubuntu-special-case.patch b/pkgs/desktops/gnome-2/desktop/mail-notification/patches/mail-notification-5.4-remove-ubuntu-special-case.patch
deleted file mode 100644
index 4516f32c6f..0000000000
--- a/pkgs/desktops/gnome-2/desktop/mail-notification/patches/mail-notification-5.4-remove-ubuntu-special-case.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- jbsrc/lib/src/core/jb-feature.c.~1~ 2008-04-27 16:47:27.000000000 +0200
-+++ jbsrc/lib/src/core/jb-feature.c 2008-07-22 11:40:50.856886210 +0200
-@@ -164,8 +164,6 @@
- static void
- gconf_configure (void)
- {
-- JBVariable *variable;
--
- jb_require_program("gconftool-2");
-
- if (! strcmp(jb_variable_get_string("gconf-config-source"), "autodetect"))
-@@ -178,21 +176,6 @@
- jb_variable_set_string("gconf-config-source", config_source);
- g_free(config_source);
- }
--
-- /* fix the default schemas dir on Ubuntu */
-- variable = jb_variable_get_variable_or_error("gconf-schemas-dir");
-- if (! variable->user_set)
-- {
-- static const char *ubuntu_dir = "$datadir/gconf/schemas";
-- char *expanded;
--
-- expanded = jb_variable_expand(ubuntu_dir, NULL);
--
-- if (g_file_test(expanded, G_FILE_TEST_IS_DIR))
-- jb_variable_set_string("gconf-schemas-dir", ubuntu_dir);
--
-- g_free(expanded);
-- }
- }
-
- static void |
082fab1
to
f3eda7a
Compare
f3eda7a
to
6295d38
Compare
Motivation for this change
Addition of mail-notification packages.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)