From 65c46befcfc917025d8038d80ab1292c2c9b915d Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sun, 6 Apr 2014 23:59:34 +0200 Subject: [PATCH 01/16] gnome-shell: depend upon gnome-settings-daemon gsettings schemas --- pkgs/desktops/gnome-3/core/gnome-shell/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix index 519347f14c8..087b5778163 100644 --- a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix +++ b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { clutter networkmanager libstartup_notification telepathy_glib docbook_xsl docbook_xsl_ns libXtst p11_kit networkmanagerapplet gjs mutter pulseaudio caribou evolution_data_server libical libtool nss gobjectIntrospection gtk gstreamer makeWrapper gdm gnome_control_center - at_spi2_core upower ibus gnome_session gnome_desktop telepathy_logger ]; + at_spi2_core upower ibus gnome_session gnome_desktop telepathy_logger gnome3.gnome_settings_daemon ]; preBuild = '' patchShebangs src/data-to-c.pl @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ --prefix LD_LIBRARY_PATH : "${accountservice}/lib:${ibus}/lib:${gdm}/lib" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ - --prefix XDG_DATA_DIRS : "${gnome-menus}:/share:${ibus}/share:${gnome_settings_daemon}/share:${gnome_control_center}/share:${gdm}/share:${glib}/share:${gnome_themes_standard}/share:${mutter}/share:${gtk}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" + --prefix XDG_DATA_DIRS : "${gnome_themes_standard}/share:${gtk}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" wrapProgram "$out/libexec/gnome-shell-calendar-server" \ --prefix XDG_DATA_DIRS : "${evolution_data_server}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" From 06614031d634f2b4af90d87c140465cba0731275 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sun, 6 Apr 2014 21:20:45 +0200 Subject: [PATCH 02/16] accountservice: add dbus and systemd services Enable by default with gnome3. --- nixos/modules/module-list.nix | 1 + .../services/desktops/accountservice.nix | 40 +++++++++++++++++++ .../services/x11/desktop-managers/gnome3.nix | 1 + .../libraries/accountservice/default.nix | 7 +++- 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 nixos/modules/services/desktops/accountservice.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 86bb87e91de..0b482dcda1b 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -96,6 +96,7 @@ ./services/databases/postgresql.nix ./services/databases/virtuoso.nix ./services/databases/monetdb.nix + ./services/desktops/accountservice.nix ./services/games/ghost-one.nix ./services/games/minecraft-server.nix ./services/hardware/acpid.nix diff --git a/nixos/modules/services/desktops/accountservice.nix b/nixos/modules/services/desktops/accountservice.nix new file mode 100644 index 00000000000..b21207f05a1 --- /dev/null +++ b/nixos/modules/services/desktops/accountservice.nix @@ -0,0 +1,40 @@ +# AccountsService daemon. + +{ config, pkgs, ... }: + +with pkgs.lib; + +{ + + ###### interface + + options = { + + services.accounts-daemon = { + + enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to enable AccountsService, a DBus service for accessing + the list of user accounts and information attached to those accounts. + ''; + }; + + }; + + }; + + + ###### implementation + + config = mkIf config.services.accounts-daemon.enable { + + environment.systemPackages = [ pkgs.accountservice ]; + + services.dbus.packages = [ pkgs.accountservice ]; + + systemd.packages = [ pkgs.accountservice ]; + }; + +} diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index 4f876b9b111..381ebc7ad29 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -22,6 +22,7 @@ in { # Enable helpful DBus services. security.polkit.enable = true; services.udisks2.enable = true; + services.accounts-daemon.enable = true; networking.networkmanager.enable = true; services.upower.enable = config.powerManagement.enable; diff --git a/pkgs/development/libraries/accountservice/default.nix b/pkgs/development/libraries/accountservice/default.nix index 8cab9e39e19..9734a6bc980 100644 --- a/pkgs/development/libraries/accountservice/default.nix +++ b/pkgs/development/libraries/accountservice/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, glib, intltool, libtool, gobjectIntrospection, polkit }: +{ stdenv, fetchurl, pkgconfig, glib, intltool +, libtool, gobjectIntrospection, polkit, systemd }: stdenv.mkDerivation rec { name = "accountsservice-0.6.35"; @@ -8,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "0f1hzl6hw56xvwgmd4yvmdyj15xj1fafw45pzv3qarww7h0wg8b5"; }; - buildInputs = [ pkgconfig glib intltool libtool gobjectIntrospection polkit ]; + buildInputs = [ pkgconfig glib intltool libtool + gobjectIntrospection polkit systemd ]; + configureFlags = [ "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ]; } From b0d0ffc0b2231064ec0d00003a2f757bc27de414 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Mon, 7 Apr 2014 18:35:02 +0200 Subject: [PATCH 03/16] libxklavier: add gobject introspection support --- pkgs/development/libraries/libxklavier/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libxklavier/default.nix b/pkgs/development/libraries/libxklavier/default.nix index cb3c3b23e7f..18f57473fb9 100644 --- a/pkgs/development/libraries/libxklavier/default.nix +++ b/pkgs/development/libraries/libxklavier/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, libX11, libXi, xkeyboard_config, libxml2 -, libICE, glib, libxkbfile, isocodes }: +, libICE, glib, libxkbfile, isocodes, gobjectIntrospection }: let version = "5.3"; @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ gobjectIntrospection ]; + configureFlags = '' --with-xkb-base=${xkeyboard_config}/etc/X11/xkb --disable-xmodmap-support From 285d8f013c2b49401d30300b33a0bce7a3a3c501 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Mon, 7 Apr 2014 18:35:47 +0200 Subject: [PATCH 04/16] libgnomekbd: new package Keyboard management library. Used by gnome-control-center. --- .../gnome-3/core/libgnomekbd/default.nix | 24 +++++++++++++++++++ pkgs/desktops/gnome-3/default.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/desktops/gnome-3/core/libgnomekbd/default.nix diff --git a/pkgs/desktops/gnome-3/core/libgnomekbd/default.nix b/pkgs/desktops/gnome-3/core/libgnomekbd/default.nix new file mode 100644 index 00000000000..1156474e5a7 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/libgnomekbd/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, pkgconfig, file, intltool, glib, gtk3, libxklavier, makeWrapper }: + +stdenv.mkDerivation rec { + name = "libgnomekbd-3.6.0"; + + src = fetchurl { + url = "mirror://gnome/sources/libgnomekbd/3.6/${name}.tar.xz"; + sha256 = "c41ea5b0f64da470925ba09f9f1b46b26b82d4e433e594b2c71eab3da8856a09"; + }; + + buildInputs = [ pkgconfig file intltool glib gtk3 libxklavier makeWrapper ]; + + preFixup = '' + wrapProgram $out/bin/gkbd-keyboard-display \ + --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" + ''; + + meta = with stdenv.lib; { + description = "Keyboard management library"; + maintainers = with maintainers; [ lethalman ]; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index ee40ff19e71..0a9a0b39aaf 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -62,6 +62,8 @@ rec { libgnome_keyring = callPackage ./core/libgnome-keyring { }; + libgnomekbd = callPackage ./core/libgnomekbd { }; + folks = callPackage ./core/folks { }; gnome_online_accounts = callPackage ./core/gnome-online-accounts { }; From 04c2fe4cbe017277db058291e7e4c46d6427fa39 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Mon, 7 Apr 2014 18:36:23 +0200 Subject: [PATCH 05/16] gnome-control-center: propagate libgnomekbd in user env --- pkgs/desktops/gnome-3/core/gnome-control-center/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix b/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix index a3f2e2b7584..92a6b6c2c40 100644 --- a/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix +++ b/pkgs/desktops/gnome-3/core/gnome-control-center/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { sha256 = "1ac34kqkf174w0qc12p927dfhcm69xnv7fqzmbhjab56rn49wypn"; }; - propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ]; + propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard gnome3.libgnomekbd ]; propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ]; From 79cef74f4ddbbcb4affd5cafe9f693b689109a0a Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Mon, 7 Apr 2014 21:29:46 +0200 Subject: [PATCH 06/16] gnome-system-monitor: new package System Monitor shows you what programs are running and how much processor time, memory, and disk space are being used https://help.gnome.org/users/gnome-system-monitor/3.10/ --- .../core/gnome-system-monitor/default.nix | 38 +++++++++++++++++++ pkgs/desktops/gnome-3/default.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/desktops/gnome-3/core/gnome-system-monitor/default.nix diff --git a/pkgs/desktops/gnome-3/core/gnome-system-monitor/default.nix b/pkgs/desktops/gnome-3/core/gnome-system-monitor/default.nix new file mode 100644 index 00000000000..91fbe67957f --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gnome-system-monitor/default.nix @@ -0,0 +1,38 @@ +{ stdenv, intltool, fetchurl, pkgconfig, gtkmm3, libxml2 +, bash, gtk3, glib, hicolor_icon_theme, makeWrapper +, itstool, gnome3, librsvg, gdk_pixbuf, libgtop }: + +stdenv.mkDerivation rec { + name = "gnome-system-monitor-3.10.2"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-system-monitor/3.10/${name}.tar.xz"; + sha256 = "bd009e15672afe4ad3ebd7ed286cce79b9f76420fd39bc77a5826b29134b9db0"; + }; + + doCheck = true; + + propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ]; + propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg + hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ]; + + buildInputs = [ bash pkgconfig gtk3 glib intltool itstool libxml2 + gtkmm3 libgtop makeWrapper + gnome3.gsettings_desktop_schemas ]; + + preFixup = '' + wrapProgram "$out/bin/gnome-system-monitor" \ + --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ + --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + homepage = https://help.gnome.org/users/gnome-system-monitor/3.10/; + description = "System Monitor shows you what programs are running and how much processor time, memory, and disk space are being used"; + maintainers = with maintainers; [ lethalman ]; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index 0a9a0b39aaf..dac1a730eb0 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -78,6 +78,8 @@ rec { gnome-system-log = callPackage ./core/gnome-system-log { }; + gnome-system-monitor = callPackage ./core/gnome-system-monitor { }; + gnome_terminal = callPackage ./core/gnome-terminal { }; gnome_themes_standard = callPackage ./core/gnome-themes-standard { }; From 9b737eb28222f701f16d7e278f0db6c5b809e8c9 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Mon, 7 Apr 2014 23:52:40 +0200 Subject: [PATCH 07/16] libmusicbrainz5: new major version --- .../libraries/libmusicbrainz/5.x.nix | 25 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/development/libraries/libmusicbrainz/5.x.nix diff --git a/pkgs/development/libraries/libmusicbrainz/5.x.nix b/pkgs/development/libraries/libmusicbrainz/5.x.nix new file mode 100644 index 00000000000..7cdb8fb4691 --- /dev/null +++ b/pkgs/development/libraries/libmusicbrainz/5.x.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchurl, cmake, neon, libdiscid }: + +stdenv.mkDerivation rec { + name = "libmusicbrainz-5.0.1"; + + buildInputs = [ cmake neon libdiscid ]; + + src = fetchurl { + url = "https://github.com/downloads/metabrainz/libmusicbrainz/${name}.tar.gz"; + md5 = "a0406b94c341c2b52ec0fe98f57cadf3"; + }; + + dontUseCmakeBuildDir=true; + + meta = { + homepage = http://musicbrainz.org/doc/libmusicbrainz; + description = "MusicBrainz Client Library (5.x version)"; + longDescription = '' + The libmusicbrainz (also known as mb_client or MusicBrainz Client + Library) is a development library geared towards developers who wish to + add MusicBrainz lookup capabilities to their applications.''; + maintainers = [ stdenv.lib.maintainers.urkud ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d0fea1417de..9bee27b52eb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5065,6 +5065,8 @@ let libmusicbrainz3 = callPackage ../development/libraries/libmusicbrainz { }; + libmusicbrainz5 = callPackage ../development/libraries/libmusicbrainz/5.x.nix { }; + libmusicbrainz = libmusicbrainz3; libnet = callPackage ../development/libraries/libnet { }; From 3feb20356e8b82c9a3638fbda655a14ea11d6e38 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Mon, 7 Apr 2014 23:53:07 +0200 Subject: [PATCH 08/16] evince: enable gobject introspection --- pkgs/desktops/gnome-3/core/evince/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/gnome-3/core/evince/default.nix b/pkgs/desktops/gnome-3/core/evince/default.nix index 3a2688a64b9..4b50840534c 100644 --- a/pkgs/desktops/gnome-3/core/evince/default.nix +++ b/pkgs/desktops/gnome-3/core/evince/default.nix @@ -2,6 +2,7 @@ , glib, gtk3, pango, atk, gdk_pixbuf, shared_mime_info, itstool, gnome3 , poppler, ghostscriptX, djvulibre, libspectre, libsecret , makeWrapper , librsvg, recentListSize ? null # 5 is not enough, allow passing a different number +, gobjectIntrospection }: stdenv.mkDerivation rec { @@ -14,7 +15,7 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig intltool perl perlXMLParser libxml2 - glib gtk3 pango atk gdk_pixbuf + glib gtk3 pango atk gdk_pixbuf gobjectIntrospection itstool gnome3.gnome_icon_theme gnome3.gnome_icon_theme_symbolic gnome3.libgnome_keyring gnome3.gsettings_desktop_schemas poppler ghostscriptX djvulibre libspectre @@ -23,6 +24,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--disable-nautilus" # Do not use nautilus + "--enable-introspection" ]; NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0"; From ea3644cb098306fb767ae50426270491d190547a Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Mon, 7 Apr 2014 23:54:07 +0200 Subject: [PATCH 09/16] sushi: new package A quick previewer for Nautilus http://en.wikipedia.org/wiki/Sushi_(software) --- nixos/modules/module-list.nix | 1 + .../services/desktops/gnome3/sushi.nix | 38 +++++++++++++++++++ .../services/x11/desktop-managers/gnome3.nix | 1 + pkgs/desktops/gnome-3/core/sushi/default.nix | 38 +++++++++++++++++++ pkgs/desktops/gnome-3/default.nix | 2 + 5 files changed, 80 insertions(+) create mode 100644 nixos/modules/services/desktops/gnome3/sushi.nix create mode 100644 pkgs/desktops/gnome-3/core/sushi/default.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 0b482dcda1b..ecf1901d500 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -97,6 +97,7 @@ ./services/databases/virtuoso.nix ./services/databases/monetdb.nix ./services/desktops/accountservice.nix + ./services/desktops/gnome3/sushi.nix ./services/games/ghost-one.nix ./services/games/minecraft-server.nix ./services/hardware/acpid.nix diff --git a/nixos/modules/services/desktops/gnome3/sushi.nix b/nixos/modules/services/desktops/gnome3/sushi.nix new file mode 100644 index 00000000000..7fe37e26f43 --- /dev/null +++ b/nixos/modules/services/desktops/gnome3/sushi.nix @@ -0,0 +1,38 @@ +# GNOME Sushi daemon. + +{ config, pkgs, ... }: + +with pkgs.lib; + +{ + + ###### interface + + options = { + + services.gnome3.sushi = { + + enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to enable Sushi, a quick previewer for nautilus. + ''; + }; + + }; + + }; + + + ###### implementation + + config = mkIf config.services.gnome3.sushi.enable { + + environment.systemPackages = [ pkgs.gnome3.sushi ]; + + services.dbus.packages = [ pkgs.gnome3.sushi ]; + + }; + +} diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index 381ebc7ad29..985884595ab 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -23,6 +23,7 @@ in { security.polkit.enable = true; services.udisks2.enable = true; services.accounts-daemon.enable = true; + services.gnome3.sushi.enable = true; networking.networkmanager.enable = true; services.upower.enable = config.powerManagement.enable; diff --git a/pkgs/desktops/gnome-3/core/sushi/default.nix b/pkgs/desktops/gnome-3/core/sushi/default.nix new file mode 100644 index 00000000000..55729a54669 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/sushi/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, pkgconfig, file, intltool, gobjectIntrospection, glib +, clutter_gtk, clutter-gst, gnome3, gtksourceview, libmusicbrainz +, webkitgtk, libmusicbrainz5, icu, makeWrapper, gst_all_1 +, gdk_pixbuf, librsvg, hicolor_icon_theme }: + +stdenv.mkDerivation rec { + name = "sushi-3.8.1"; + + src = fetchurl { + url = "mirror://gnome/sources/sushi/3.8/${name}.tar.xz"; + sha256 = "c4f24d0961ce8fc5ef3a4fe9af178e368c7117459df2c0be12c8f953646c82dd"; + }; + + propagatedUserEnvPkgs = [ gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good ]; + + buildInputs = [ pkgconfig file intltool gobjectIntrospection glib + clutter_gtk clutter-gst gnome3.gjs gtksourceview gdk_pixbuf librsvg + gnome3.gnome_icon_theme hicolor_icon_theme gnome3.gnome_icon_theme_symbolic + libmusicbrainz5 webkitgtk gnome3.evince icu makeWrapper ]; + + enableParallelBuilding = true; + + preFixup = '' + wrapProgram $out/libexec/sushi-start \ + --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ + --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ + --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" \ + --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" + ''; + + meta = with stdenv.lib; { + homepage = "http://en.wikipedia.org/wiki/Sushi_(software)"; + description = "A quick previewer for Nautilus"; + maintainers = with maintainers; [ lethalman ]; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index dac1a730eb0..fb92cd80998 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -114,6 +114,8 @@ rec { rest = callPackage ./core/rest { }; + sushi = callPackage ./core/sushi { }; + totem = callPackage ./core/totem { }; totem-pl-parser = callPackage ./core/totem-pl-parser { }; From 2bc0f7b701a41aaf2e2f4615ab3dbe66e38573c8 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Tue, 8 Apr 2014 13:23:12 +0200 Subject: [PATCH 10/16] evolution-data-server: fix gsettings schemas and add dbus service --- nixos/modules/module-list.nix | 1 + .../desktops/gnome3/evolution-data-server.nix | 39 +++++++++++++++++++ .../services/x11/desktop-managers/gnome3.nix | 1 + .../core/evolution-data-server/default.nix | 10 ++++- 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 nixos/modules/services/desktops/gnome3/evolution-data-server.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index ecf1901d500..7e69eabdeac 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -97,6 +97,7 @@ ./services/databases/virtuoso.nix ./services/databases/monetdb.nix ./services/desktops/accountservice.nix + ./services/desktops/gnome3/evolution-data-server.nix ./services/desktops/gnome3/sushi.nix ./services/games/ghost-one.nix ./services/games/minecraft-server.nix diff --git a/nixos/modules/services/desktops/gnome3/evolution-data-server.nix b/nixos/modules/services/desktops/gnome3/evolution-data-server.nix new file mode 100644 index 00000000000..64592133666 --- /dev/null +++ b/nixos/modules/services/desktops/gnome3/evolution-data-server.nix @@ -0,0 +1,39 @@ +# Evolution Data Server daemon. + +{ config, pkgs, ... }: + +with pkgs.lib; + +{ + + ###### interface + + options = { + + services.gnome3.evolution-data-server = { + + enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to enable Evolution Data Server, a collection of services for + storing addressbooks and calendars. + ''; + }; + + }; + + }; + + + ###### implementation + + config = mkIf config.services.gnome3.evolution-data-server.enable { + + environment.systemPackages = [ pkgs.evolution_data_server ]; + + services.dbus.packages = [ pkgs.evolution_data_server ]; + + }; + +} diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index 985884595ab..626c683f9dc 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -23,6 +23,7 @@ in { security.polkit.enable = true; services.udisks2.enable = true; services.accounts-daemon.enable = true; + services.gnome3.evolution-data-server.enable = true; services.gnome3.sushi.enable = true; networking.networkmanager.enable = true; services.upower.enable = config.powerManagement.enable; diff --git a/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix b/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix index 0ded30b11ab..9e7d0cb3da0 100644 --- a/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix +++ b/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix @@ -1,5 +1,5 @@ { fetchurl, stdenv, pkgconfig, gnome3, python, intltool, libsoup, libxml2, libsecret -, p11_kit, db, nspr, nss, libical, gperf, valaSupport ? true, vala }: +, p11_kit, db, nspr, nss, libical, gperf, makeWrapper, valaSupport ? true, vala }: stdenv.mkDerivation rec { @@ -12,13 +12,19 @@ stdenv.mkDerivation rec { buildInputs = with gnome3; [ pkgconfig glib python intltool libsoup libxml2 gtk gnome_online_accounts libsecret - gcr p11_kit db nspr nss libgweather libical libgdata gperf ] + gcr p11_kit db nspr nss libgweather libical libgdata gperf makeWrapper ] ++ stdenv.lib.optional valaSupport vala; # uoa irrelevant for now configureFlags = ["--disable-uoa" "--with-nspr-includes=${nspr}/include/nspr" "--with-nss-includes=${nss}/include/nss"] ++ stdenv.lib.optional valaSupport "--enable-vala-bindings"; + preFixup = '' + for f in "$out/libexec/evolution-addressbook-factory" "$out/libexec/evolution-calendar-factory"; do + wrapProgram $f --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" + done + ''; + meta = with stdenv.lib; { platforms = platforms.linux; }; From f88597d6e4feb5bb11e8e84f7c396d02a245cb44 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Tue, 8 Apr 2014 13:24:56 +0200 Subject: [PATCH 11/16] gnome-contacts: new package Contacts is GNOME's integrated address book https://wiki.gnome.org/Apps/Contacts --- .../gnome-contacts/configure_dbus_glib.patch | 10 ++++ .../gnome-3/core/gnome-contacts/default.nix | 51 +++++++++++++++++++ .../gnome-contacts/fix_row_selected.patch | 11 ++++ pkgs/desktops/gnome-3/default.nix | 2 + 4 files changed, 74 insertions(+) create mode 100644 pkgs/desktops/gnome-3/core/gnome-contacts/configure_dbus_glib.patch create mode 100644 pkgs/desktops/gnome-3/core/gnome-contacts/default.nix create mode 100644 pkgs/desktops/gnome-3/core/gnome-contacts/fix_row_selected.patch diff --git a/pkgs/desktops/gnome-3/core/gnome-contacts/configure_dbus_glib.patch b/pkgs/desktops/gnome-3/core/gnome-contacts/configure_dbus_glib.patch new file mode 100644 index 00000000000..926762defbd --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gnome-contacts/configure_dbus_glib.patch @@ -0,0 +1,10 @@ +--- configure.ac.orig 2014-04-08 10:25:49.497620879 +0200 ++++ configure.ac 2014-04-08 10:26:36.639440950 +0200 +@@ -43,6 +43,7 @@ + folks-telepathy + folks-eds + libnotify ++ dbus-glib-1 + telepathy-glib >= 0.17.5 + libebook-1.2 >= 3.5.3 + libedataserver-1.2 >= 3.5.3 diff --git a/pkgs/desktops/gnome-3/core/gnome-contacts/default.nix b/pkgs/desktops/gnome-3/core/gnome-contacts/default.nix new file mode 100644 index 00000000000..f8059f952e6 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gnome-contacts/default.nix @@ -0,0 +1,51 @@ +{ stdenv, intltool, fetchurl, evolution_data_server, db +, pkgconfig, gtk3, glib, hicolor_icon_theme, libsecret +, bash, makeWrapper, itstool, folks, libnotify, libxml2 +, gnome3, librsvg, gdk_pixbuf, file, telepathy_glib, nspr, nss +, libsoup, vala, dbus_glib, automake114x, autoconf }: + +stdenv.mkDerivation rec { + name = "gnome-contacts-3.10.1"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-contacts/3.10/${name}.tar.xz"; + sha256 = "e119c32bb10136e7190f11f79334fa82ed56468cff5bb7836da0ebf7b572779b"; + }; + + doCheck = true; + + propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard evolution_data_server ]; + propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg + hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ]; + + # force build from vala + preBuild = '' + touch src/*.vala + ''; + + buildInputs = [ pkgconfig gtk3 glib intltool itstool evolution_data_server + gnome3.gsettings_desktop_schemas makeWrapper file libnotify + folks gnome3.gnome_desktop telepathy_glib libsecret dbus_glib + libxml2 libsoup gnome3.gnome_online_accounts nspr nss + vala automake114x autoconf db ]; + + preFixup = '' + for f in "$out/bin/gnome-contacts" "$out/libexec/gnome-contacts-search-provider"; do + wrapProgram $f \ + --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ + --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" + done + ''; + + patches = [ ./configure_dbus_glib.patch ./fix_row_selected.patch ]; + + patchFlags = "-p0"; + + meta = with stdenv.lib; { + homepage = https://wiki.gnome.org/Apps/Contacts; + description = "Contacts is GNOME's integrated address book"; + maintainers = with maintainers; [ lethalman ]; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome-3/core/gnome-contacts/fix_row_selected.patch b/pkgs/desktops/gnome-3/core/gnome-contacts/fix_row_selected.patch new file mode 100644 index 00000000000..b379b4b8ee9 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gnome-contacts/fix_row_selected.patch @@ -0,0 +1,11 @@ +--- src/contacts-view.vala.orig 2014-04-08 11:35:36.302252460 +0200 ++++ src/contacts-view.vala 2014-04-08 11:37:37.045343221 +0200 +@@ -265,7 +265,7 @@ + data.destroy (); + } + +- public override void row_selected (ListBoxRow row) { ++ public override void row_selected (ListBoxRow? row) { + var data = row as ContactDataRow; + var contact = data != null ? data.contact : null; + selection_changed (contact); diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index fb92cd80998..73a3843bad2 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -40,6 +40,8 @@ rec { gnome-backgrounds = callPackage ./core/gnome-backgrounds { }; + gnome-contacts = callPackage ./core/gnome-contacts { }; + gnome_control_center = callPackage ./core/gnome-control-center { }; gnome-calculator = callPackage ./core/gnome-calculator { }; From 8553993887fcb821c06f91e43b0a5ca3b6c3111e Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Tue, 8 Apr 2014 15:02:15 +0200 Subject: [PATCH 12/16] telepathy-mission-control: add dbus service, enabled by default on gnome3 --- nixos/modules/module-list.nix | 1 + nixos/modules/services/desktops/telepathy.nix | 39 +++++++++++++++++++ .../services/x11/desktop-managers/gnome3.nix | 1 + .../telepathy/mission-control/default.nix | 9 ++++- 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 nixos/modules/services/desktops/telepathy.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 7e69eabdeac..867cedacaec 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -99,6 +99,7 @@ ./services/desktops/accountservice.nix ./services/desktops/gnome3/evolution-data-server.nix ./services/desktops/gnome3/sushi.nix + ./services/desktops/telepathy.nix ./services/games/ghost-one.nix ./services/games/minecraft-server.nix ./services/hardware/acpid.nix diff --git a/nixos/modules/services/desktops/telepathy.nix b/nixos/modules/services/desktops/telepathy.nix new file mode 100644 index 00000000000..bd417db88af --- /dev/null +++ b/nixos/modules/services/desktops/telepathy.nix @@ -0,0 +1,39 @@ +# Telepathy daemon. + +{ config, pkgs, ... }: + +with pkgs.lib; + +{ + + ###### interface + + options = { + + services.telepathy = { + + enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to enable Telepathy service, a communications framework + that enables real-time communication via pluggable protocol backends. + ''; + }; + + }; + + }; + + + ###### implementation + + config = mkIf config.services.telepathy.enable { + + environment.systemPackages = [ pkgs.telepathy_mission_control ]; + + services.dbus.packages = [ pkgs.telepathy_mission_control ]; + + }; + +} diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index 626c683f9dc..dffa82437c8 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -25,6 +25,7 @@ in { services.accounts-daemon.enable = true; services.gnome3.evolution-data-server.enable = true; services.gnome3.sushi.enable = true; + services.telepathy.enable = true; networking.networkmanager.enable = true; services.upower.enable = config.powerManagement.enable; diff --git a/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix b/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix index 5d44f97a1be..a8142fc1e5c 100644 --- a/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix +++ b/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, telepathy_glib, libxslt }: +{ stdenv, fetchurl, pkgconfig, telepathy_glib, libxslt, makeWrapper }: stdenv.mkDerivation rec { name = "${pname}-5.16.0"; @@ -9,7 +9,12 @@ stdenv.mkDerivation rec { sha256 = "1l61w6j04mbrjsbcfrlc0safh9nlsjnj0z6lszal64r9bhkcghzd"; }; - buildInputs = [ telepathy_glib ]; + buildInputs = [ telepathy_glib makeWrapper ]; nativeBuildInputs = [ pkgconfig libxslt ]; + + preFixup = '' + wrapProgram "$out/libexec/mission-control-5" \ + --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" + ''; } From 9219c503c940e87806139fed4d9c94ca20fe726c Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Tue, 8 Apr 2014 20:27:37 +0200 Subject: [PATCH 13/16] file-roller: fix gsettings schemas --- pkgs/desktops/gnome-3/desktop/file-roller/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/gnome-3/desktop/file-roller/default.nix b/pkgs/desktops/gnome-3/desktop/file-roller/default.nix index 0f48103c93d..41f1fb0097f 100644 --- a/pkgs/desktops/gnome-3/desktop/file-roller/default.nix +++ b/pkgs/desktops/gnome-3/desktop/file-roller/default.nix @@ -18,9 +18,9 @@ stdenv.mkDerivation rec { buildInputs = [ glib pkgconfig gnome3.gtk intltool itstool libxml2 libarchive attr bzip2 acl makeWrapper ]; - postInstall = '' + preFixup = '' wrapProgram "$out/bin/file-roller" \ - --prefix XDG_DATA_DIRS : "${gnome3.gtk}/share:$out/share" + --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" ''; meta = with stdenv.lib; { From c56af6102a53dd6463483b968cf82d14646f03b7 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Tue, 8 Apr 2014 22:44:22 +0200 Subject: [PATCH 14/16] at-spi2-core: add dbus module, enabled on gnome3 by default --- nixos/modules/module-list.nix | 1 + .../services/desktops/gnome3/at-spi2-core.nix | 39 +++++++++++++++++++ .../services/x11/desktop-managers/gnome3.nix | 1 + 3 files changed, 41 insertions(+) create mode 100644 nixos/modules/services/desktops/gnome3/at-spi2-core.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 867cedacaec..b9da7786d2c 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -97,6 +97,7 @@ ./services/databases/virtuoso.nix ./services/databases/monetdb.nix ./services/desktops/accountservice.nix + ./services/desktops/gnome3/at-spi2-core.nix ./services/desktops/gnome3/evolution-data-server.nix ./services/desktops/gnome3/sushi.nix ./services/desktops/telepathy.nix diff --git a/nixos/modules/services/desktops/gnome3/at-spi2-core.nix b/nixos/modules/services/desktops/gnome3/at-spi2-core.nix new file mode 100644 index 00000000000..7a25a794c2e --- /dev/null +++ b/nixos/modules/services/desktops/gnome3/at-spi2-core.nix @@ -0,0 +1,39 @@ +# at-spi2-core daemon. + +{ config, pkgs, ... }: + +with pkgs.lib; + +{ + + ###### interface + + options = { + + services.gnome3.at-spi2-core = { + + enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to enable at-spi2-core, a service for the Assistive Technologies + available on the GNOME platform. + ''; + }; + + }; + + }; + + + ###### implementation + + config = mkIf config.services.gnome3.at-spi2-core.enable { + + environment.systemPackages = [ pkgs.gnome3.at_spi2_core ]; + + services.dbus.packages = [ pkgs.gnome3.at_spi2_core ]; + + }; + +} diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index dffa82437c8..0a4afcd81a3 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -23,6 +23,7 @@ in { security.polkit.enable = true; services.udisks2.enable = true; services.accounts-daemon.enable = true; + services.gnome3.at-spi2-core.enable = true; services.gnome3.evolution-data-server.enable = true; services.gnome3.sushi.enable = true; services.telepathy.enable = true; From ba200a2c3cfe1e122eec30e588f37430a50feff7 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Tue, 8 Apr 2014 23:09:57 +0200 Subject: [PATCH 15/16] gnome-dictionary: remove the duplicated entry under desktop/ --- pkgs/desktops/gnome-3/default.nix | 2 -- .../desktop/gnome-dictionary/default.nix | 20 ------------------- 2 files changed, 22 deletions(-) delete mode 100644 pkgs/desktops/gnome-3/desktop/gnome-dictionary/default.nix diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index 73a3843bad2..d9a673fb4c7 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -139,8 +139,6 @@ rec { file-roller = callPackage ./desktop/file-roller { }; - gnome_dictionary = callPackage ./desktop/gnome-dictionary { }; - gnome_desktop = callPackage ./desktop/gnome-desktop { }; gtksourceview = callPackage ./desktop/gtksourceview { }; diff --git a/pkgs/desktops/gnome-3/desktop/gnome-dictionary/default.nix b/pkgs/desktops/gnome-3/desktop/gnome-dictionary/default.nix deleted file mode 100644 index 3e952f99eb0..00000000000 --- a/pkgs/desktops/gnome-3/desktop/gnome-dictionary/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, gnome3, gnome_doc_utils, intltool, which -, libxml2, libxslt, itstool }: - -stdenv.mkDerivation rec { - version = "3.10.0"; - name = "gnome-dictionary-${version}"; - - src = fetchurl { - url = "mirror://gnome/sources/gnome-dictionary/3.10/${name}.tar.xz"; - sha256 = "1mqf6ln0cgrw12n9fg81sjbhavrgzvvq7fy3gl55il7pa3z612r5"; - }; - - buildInputs = [ gnome3.gtk ]; - nativeBuildInputs = [ pkgconfig intltool gnome_doc_utils which libxml2 libxslt itstool ]; - - meta = with stdenv.lib; { - platforms = platforms.linux; - }; - -} From a3115707dd1563cfdab75ae716a33aeba4c651ce Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Wed, 9 Apr 2014 00:02:20 +0200 Subject: [PATCH 16/16] Add environment.gnome3.excludePackages Give the user a full desktop, and the possibility to exclude non-base packages from the default list of packages. --- lib/lists.nix | 3 ++ .../services/x11/desktop-managers/gnome3.nix | 47 +++++++++++++------ 2 files changed, 35 insertions(+), 15 deletions(-) diff --git a/lib/lists.nix b/lib/lists.nix index 71a89702796..6c7773304de 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -226,4 +226,7 @@ in rec { deepSeqList = xs: y: if any (x: deepSeq x false) xs then y else y; crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [f]; + + # List difference, xs - ys. Removes elements of ys from xs. + difference = xs: ys: filter (y: !(builtins.elem y ys)) xs; } diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index 0a4afcd81a3..bebda772352 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -15,6 +15,13 @@ in { description = "Enable Gnome 3 desktop manager."; }; + environment.gnome3.excludePackages = mkOption { + default = []; + example = "[ pkgs.gnome3.totem ]"; + type = types.listOf types.package; + description = "Which packages gnome should exclude from the default environment"; + }; + }; config = mkIf cfg.enable { @@ -51,25 +58,35 @@ in { environment.variables.GIO_EXTRA_MODULES = [ "${gnome3.dconf}/lib/gio/modules" "${pkgs.glib_networking}/lib/gio/modules" ]; environment.systemPackages = - [ gnome3.evince - gnome3.eog - gnome3.dconf - gnome3.vino - gnome3.epiphany - gnome3.baobab - gnome3.gucharmap - gnome3.nautilus - gnome3.yelp + [ gnome3.dconf pkgs.glib_networking pkgs.ibus gnome3.gnome-backgrounds - gnome3.gnome_shell - gnome3.gnome_settings_daemon - gnome3.gnome_terminal - gnome3.gnome_icon_theme - gnome3.gnome_themes_standard gnome3.gnome_control_center - ]; + gnome3.gnome_icon_theme + gnome3.gnome_settings_daemon + gnome3.gnome_shell + gnome3.gnome_themes_standard + ] ++ (lists.difference [ + gnome3.baobab + gnome3.eog + gnome3.epiphany + gnome3.evince + gnome3.gucharmap + gnome3.nautilus + gnome3.totem + gnome3.vino + gnome3.yelp + gnome3.gnome-calculator + gnome3.gnome-contacts + gnome3.gnome-font-viewer + gnome3.gnome-screenshot + gnome3.gnome-system-log + gnome3.gnome-system-monitor + gnome3.gnome_terminal + + gnome3.file-roller + ] config.environment.gnome3.excludePackages); };