From 11b337fc7638081776f23a77c2639c61b7d07a73 Mon Sep 17 00:00:00 2001 From: Roelof Wobben Date: Sat, 7 Dec 2013 20:00:54 +0100 Subject: [PATCH 1/4] added cinnamon-session --- pkgs/desktops/cinnamon/cinnamon-session.nix | 46 +++++++++++++++++++ .../cinnamon/remove-sessionmigration.patch | 19 ++++++++ pkgs/desktops/cinnamon/timeout.patch | 26 +++++++++++ pkgs/top-level/all-packages.nix | 2 + 4 files changed, 93 insertions(+) create mode 100644 pkgs/desktops/cinnamon/cinnamon-session.nix create mode 100644 pkgs/desktops/cinnamon/remove-sessionmigration.patch create mode 100644 pkgs/desktops/cinnamon/timeout.patch diff --git a/pkgs/desktops/cinnamon/cinnamon-session.nix b/pkgs/desktops/cinnamon/cinnamon-session.nix new file mode 100644 index 000000000000..3411633a289e --- /dev/null +++ b/pkgs/desktops/cinnamon/cinnamon-session.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchurl, pkgconfig, autoreconfHook, glib, gettext, gnome_common, gtk3, dbus_glib, +upower, json_glib,intltool, systemd, hicolor_icon_theme, makeWrapper}: + +let + version = "2.0.6"; +in +stdenv.mkDerivation { + name = "cinnamon-session-${version}"; + + src = fetchurl { + url = "http://github.com/linuxmint/cinnamon-session/archive/${version}.tar.gz"; + sha256 = "0rs5w7npj3wf3gkk3sfb83awks2h7vjd6cz8mvfgbh6m3grn66l3"; + }; + + + configureFlags = "--disable-schemas-compile --enable-systemd --disable-gconf" ; + + patches = [ ./remove-sessionmigration.patch ./timeout.patch]; + + buildInputs = [ + pkgconfig autoreconfHook + glib gettext gnome_common + gtk3 dbus_glib upower json_glib + intltool systemd makeWrapper + ]; + + preBuild = "patchShebangs ./scripts"; + + installPhase = '' + wrapProgram $out/bin/cinnamon-session \ + --prefix XDG_DATA_DIRS ":" "${hicolor_icon_theme}/share" + ''; + + postInstall = '' + rm $out/share/icons/hicolor/icon-theme.cache + ''; + meta = { + homepage = "http://cinnamon.linuxmint.com"; + description = "the cinnamon session files " ; + + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.roelof ]; + }; +} + + diff --git a/pkgs/desktops/cinnamon/remove-sessionmigration.patch b/pkgs/desktops/cinnamon/remove-sessionmigration.patch new file mode 100644 index 000000000000..92e63549d964 --- /dev/null +++ b/pkgs/desktops/cinnamon/remove-sessionmigration.patch @@ -0,0 +1,19 @@ +--- a/cinnamon-session/csm-session-fill.c ++++ b/cinnamon-session/csm-session-fill.c +@@ -228,15 +228,6 @@ + load_standard_apps (CsmManager *manager, + GKeyFile *keyfile) + { +- GError *error; +- +- g_debug ("fill: *** Executing user migration"); +- error = NULL; +- if(!g_spawn_command_line_sync ("session-migration", NULL, NULL, NULL, &error)) { +- g_warning ("Error while executing session-migration: %s", error->message); +- g_error_free (error); +- } +- + g_debug ("fill: *** Adding required components"); + handle_required_components (keyfile, !csm_manager_get_failsafe (manager), + append_required_components_helper, manager); + diff --git a/pkgs/desktops/cinnamon/timeout.patch b/pkgs/desktops/cinnamon/timeout.patch new file mode 100644 index 000000000000..59d1f9ab5f37 --- /dev/null +++ b/pkgs/desktops/cinnamon/timeout.patch @@ -0,0 +1,26 @@ +diff -u -r cinnamon-session-3.4.2/cinnamon-session/csm-session-fill.c cinnamon-session-3.4.2-timeout/cinnamon-session/csm-session-fill.c +--- cinnamon-session-3.4.2/cinnamon-session/csm-session-fill.c 2012-02-02 15:33:01.000000000 +0100 ++++ cinnamon-session-3.4.2-timeout/cinnamon-session/csm-session-fill.c 2012-06-10 02:39:46.184348462 +0200 +@@ -36,7 +36,7 @@ + #define CSM_KEYFILE_DEFAULT_PROVIDER_PREFIX "DefaultProvider" + + /* See https://bugzilla.gnome.org/show_bug.cgi?id=641992 for discussion */ +-#define CSM_RUNNABLE_HELPER_TIMEOUT 3000 /* ms */ ++#define CSM_RUNNABLE_HELPER_TIMEOUT 10000 /* ms */ + + typedef void (*GsmFillHandleProvider) (const char *provides, + const char *default_provider, +diff -u -r cinnamon-session-3.4.2/tools/cinnamon-session-check-accelerated.c +cinnamon-session-3.4.2-timeout/tools/cinnamon-session-check-accelerated.c +--- cinnamon-session-3.4.2/tools/cinnamon-session-check-accelerated.c 2011-03-22 21:31:43.000000000 +0100 ++++ cinnamon-session-3.4.2-timeout/tools/cinnamon-session-check-accelerated.c 2012-06-10 02:42:08.013218006 +0200 +@@ -30,7 +30,7 @@ + #include + + /* Wait up to this long for a running check to finish */ +-#define PROPERTY_CHANGE_TIMEOUT 5000 ++#define PROPERTY_CHANGE_TIMEOUT 12000 + + /* Values used for the _GNOME_SESSION_ACCELERATED root window property */ + #define NO_ACCEL 0 + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index eccce1181dec..8b72bf7ac221 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9591,6 +9591,8 @@ let callPackage = newScope pkgs.cinnamon; inherit (gnome3) gnome_common; + cinnamon-session = callPackage ../desktop/cinnamon/cinnamon-session.nix{ } ; + cinnamon-desktop = callPackage ../desktops/cinnamon/cinnamon-desktop.nix { }; cinnamon-translations = callPackage ../desktops/cinnamon/cinnamon-translations.nix { }; From 23bacdf6ea2d30b484c71bb784f59153c346c079 Mon Sep 17 00:00:00 2001 From: Roelof Wobben Date: Sun, 8 Dec 2013 21:40:52 +0100 Subject: [PATCH 2/4] added cinnamon-session.nix --- pkgs/desktops/cinnamon/cinnamon-session.nix | 18 ++++++++---------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/pkgs/desktops/cinnamon/cinnamon-session.nix b/pkgs/desktops/cinnamon/cinnamon-session.nix index 3411633a289e..30b78ba143ad 100644 --- a/pkgs/desktops/cinnamon/cinnamon-session.nix +++ b/pkgs/desktops/cinnamon/cinnamon-session.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, autoreconfHook, glib, gettext, gnome_common, gtk3, dbus_glib, -upower, json_glib,intltool, systemd, hicolor_icon_theme, makeWrapper}: +upower, json_glib,intltool, systemd, hicolor_icon_theme, cinnamon-session}: let version = "2.0.6"; @@ -21,19 +21,17 @@ stdenv.mkDerivation { pkgconfig autoreconfHook glib gettext gnome_common gtk3 dbus_glib upower json_glib - intltool systemd makeWrapper + intltool systemd ]; preBuild = "patchShebangs ./scripts"; - installPhase = '' - wrapProgram $out/bin/cinnamon-session \ - --prefix XDG_DATA_DIRS ":" "${hicolor_icon_theme}/share" - ''; - - postInstall = '' - rm $out/share/icons/hicolor/icon-theme.cache - ''; + + postInstall = '' + ${glib}/bin/glib-compile-schemas $out/share/glib-2.0/schemas/ + rm $out/share/icons/hicolor/icon-theme.cache + ''; + meta = { homepage = "http://cinnamon.linuxmint.com"; description = "the cinnamon session files " ; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8b72bf7ac221..b3c8b784406e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9591,7 +9591,7 @@ let callPackage = newScope pkgs.cinnamon; inherit (gnome3) gnome_common; - cinnamon-session = callPackage ../desktop/cinnamon/cinnamon-session.nix{ } ; + cinnamon-session = callPackage ../desktops/cinnamon/cinnamon-session.nix{ } ; cinnamon-desktop = callPackage ../desktops/cinnamon/cinnamon-desktop.nix { }; From f144a3b963e4b577574fa3eedfcb1c6af27c7e21 Mon Sep 17 00:00:00 2001 From: Roelof Wobben Date: Mon, 9 Dec 2013 10:37:07 +0100 Subject: [PATCH 3/4] changed gnome-desktop --- pkgs/desktops/cinnamon/cinnamon-desktop.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/desktops/cinnamon/cinnamon-desktop.nix b/pkgs/desktops/cinnamon/cinnamon-desktop.nix index d3cf04e835d1..b38098b33d0f 100644 --- a/pkgs/desktops/cinnamon/cinnamon-desktop.nix +++ b/pkgs/desktops/cinnamon/cinnamon-desktop.nix @@ -22,6 +22,10 @@ stdenv.mkDerivation { xkeyboard_config libxkbfile libX11 libXrandr libXext ]; + postInstall = '' + ${glib}/bin/glib-compile-schemas $out/share/glib-2.0/schemas/ + ''; + meta = { homepage = "http://cinnamon.linuxmint.com"; description = "Library and data for various Cinnamon modules"; From 4f8e940c403650e0514e4b01fba6fb33a2086dfd Mon Sep 17 00:00:00 2001 From: Roelof Wobben Date: Mon, 9 Dec 2013 10:38:59 +0100 Subject: [PATCH 4/4] changed gnome-desktop --- pkgs/desktops/cinnamon/cinnamon-desktop.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/desktops/cinnamon/cinnamon-desktop.nix b/pkgs/desktops/cinnamon/cinnamon-desktop.nix index b38098b33d0f..d3cf04e835d1 100644 --- a/pkgs/desktops/cinnamon/cinnamon-desktop.nix +++ b/pkgs/desktops/cinnamon/cinnamon-desktop.nix @@ -22,10 +22,6 @@ stdenv.mkDerivation { xkeyboard_config libxkbfile libX11 libXrandr libXext ]; - postInstall = '' - ${glib}/bin/glib-compile-schemas $out/share/glib-2.0/schemas/ - ''; - meta = { homepage = "http://cinnamon.linuxmint.com"; description = "Library and data for various Cinnamon modules";