Merge pull request #2694 from lethalman/gnome3

Gnome 3.12
This commit is contained in:
lethalman 2014-05-20 15:08:14 +02:00
commit 70bf43dcce
216 changed files with 3597 additions and 38 deletions

View File

@ -4,6 +4,9 @@
with lib;
let
gnome3 = config.environment.gnome3.packageSet;
in
{
###### interface
@ -30,9 +33,9 @@ with lib;
config = mkIf config.services.gnome3.at-spi2-core.enable {
environment.systemPackages = [ pkgs.gnome3.at_spi2_core ];
environment.systemPackages = [ gnome3.at_spi2_core ];
services.dbus.packages = [ pkgs.gnome3.at_spi2_core ];
services.dbus.packages = [ gnome3.at_spi2_core ];
};

View File

@ -4,6 +4,9 @@
with pkgs.lib;
let
gnome3 = config.environment.gnome3.packageSet;
in
{
###### interface
@ -30,9 +33,9 @@ with pkgs.lib;
config = mkIf config.services.gnome3.gnome-documents.enable {
environment.systemPackages = [ pkgs.gnome3.gnome-documents ];
environment.systemPackages = [ gnome3.gnome-documents ];
services.dbus.packages = [ pkgs.gnome3.gnome-documents ];
services.dbus.packages = [ gnome3.gnome-documents ];
services.gnome3.gnome-online-accounts.enable = true;

View File

@ -4,6 +4,9 @@
with pkgs.lib;
let
gnome3 = config.environment.gnome3.packageSet;
in
{
###### interface
@ -31,9 +34,9 @@ with pkgs.lib;
config = mkIf config.services.gnome3.gnome-keyring.enable {
environment.systemPackages = [ pkgs.gnome3.gnome_keyring ];
environment.systemPackages = [ gnome3.gnome_keyring ];
services.dbus.packages = [ pkgs.gnome3.gnome_keyring ];
services.dbus.packages = [ gnome3.gnome_keyring ];
};

View File

@ -4,6 +4,9 @@
with pkgs.lib;
let
gnome3 = config.environment.gnome3.packageSet;
in
{
###### interface
@ -30,9 +33,9 @@ with pkgs.lib;
config = mkIf config.services.gnome3.gnome-online-accounts.enable {
environment.systemPackages = [ pkgs.gnome3.gnome_online_accounts ];
environment.systemPackages = [ gnome3.gnome_online_accounts ];
services.dbus.packages = [ pkgs.gnome3.gnome_online_accounts ];
services.dbus.packages = [ gnome3.gnome_online_accounts ];
};

View File

@ -4,6 +4,9 @@
with pkgs.lib;
let
gnome3 = config.environment.gnome3.packageSet;
in
{
###### interface
@ -30,9 +33,9 @@ with pkgs.lib;
config = mkIf config.services.gnome3.gnome-online-miners.enable {
environment.systemPackages = [ pkgs.gnome3.gnome-online-miners ];
environment.systemPackages = [ gnome3.gnome-online-miners ];
services.dbus.packages = [ pkgs.gnome3.gnome-online-miners ];
services.dbus.packages = [ gnome3.gnome-online-miners ];
};

View File

@ -4,6 +4,9 @@
with pkgs.lib;
let
gnome3 = config.environment.gnome3.packageSet;
in
{
###### interface
@ -30,9 +33,9 @@ with pkgs.lib;
config = mkIf config.services.gnome3.gnome-user-share.enable {
environment.systemPackages = [ pkgs.gnome3.gnome-user-share ];
environment.systemPackages = [ gnome3.gnome-user-share ];
services.xserver.displayManager.sessionCommands = with pkgs.gnome3; ''
services.xserver.displayManager.sessionCommands = with gnome3; ''
# Don't let gnome-control-center depend upon gnome-user-share
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${gnome-user-share}/share/gsettings-schemas/${gnome-user-share.name}
'';

View File

@ -4,6 +4,9 @@
with pkgs.lib;
let
gnome3 = config.environment.gnome3.packageSet;
in
{
###### interface
@ -29,9 +32,9 @@ with pkgs.lib;
config = mkIf config.services.gnome3.seahorse.enable {
environment.systemPackages = [ pkgs.gnome3.seahorse ];
environment.systemPackages = [ gnome3.seahorse ];
services.dbus.packages = [ pkgs.gnome3.seahorse ];
services.dbus.packages = [ gnome3.seahorse ];
};

View File

@ -4,6 +4,9 @@
with lib;
let
gnome3 = config.environment.gnome3.packageSet;
in
{
###### interface
@ -29,9 +32,9 @@ with lib;
config = mkIf config.services.gnome3.sushi.enable {
environment.systemPackages = [ pkgs.gnome3.sushi ];
environment.systemPackages = [ gnome3.sushi ];
services.dbus.packages = [ pkgs.gnome3.sushi ];
services.dbus.packages = [ gnome3.sushi ];
};

View File

@ -4,6 +4,9 @@
with pkgs.lib;
let
gnome3 = config.environment.gnome3.packageSet;
in
{
###### interface
@ -30,9 +33,9 @@ with pkgs.lib;
config = mkIf config.services.gnome3.tracker.enable {
environment.systemPackages = [ pkgs.gnome3.tracker ];
environment.systemPackages = [ gnome3.tracker ];
services.dbus.packages = [ pkgs.gnome3.tracker ];
services.dbus.packages = [ gnome3.tracker ];
};

View File

@ -4,6 +4,9 @@
with lib;
let
cfg = config.services.upower;
in
{
###### interface
@ -21,6 +24,15 @@ with lib;
'';
};
package = mkOption {
type = types.package;
default = pkgs.upower;
example = lib.literalExample "pkgs.upower";
description = ''
Which upower package to use.
'';
};
};
};
@ -28,13 +40,13 @@ with lib;
###### implementation
config = mkIf config.services.upower.enable {
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.upower ];
environment.systemPackages = [ cfg.package ];
services.dbus.packages = [ pkgs.upower ];
services.dbus.packages = [ cfg.package ];
services.udev.packages = [ pkgs.upower ];
services.udev.packages = [ cfg.package ];
systemd.services.upower =
{ description = "Power Management Daemon";
@ -42,7 +54,7 @@ with lib;
serviceConfig =
{ Type = "dbus";
BusName = "org.freedesktop.UPower";
ExecStart = "@${pkgs.upower}/libexec/upowerd upowerd";
ExecStart = "@${cfg.package}/libexec/upowerd upowerd";
};
};

View File

@ -4,13 +4,13 @@ with lib;
let
cfg = config.services.xserver.desktopManager.gnome3;
gnome3 = pkgs.gnome3;
gnome3 = config.environment.gnome3.packageSet;
# Remove packages of ys from xs, based on their names
removePackagesByName = xs: ys:
let
pkgName = drv: (builtins.parseDrvName drv.name).name;
ysNames = map pkgName ys;
ysNames = map pkgName ys;
res = (filter (x: !(builtins.elem (pkgName x) ysNames)) xs);
in
filter (x: !(builtins.elem (pkgName x) ysNames)) xs;
@ -35,6 +35,12 @@ in {
description = "Enable Gnome 3 desktop manager.";
};
environment.gnome3.packageSet = mkOption {
default = pkgs.gnome3;
example = literalExample "pkgs.gnome3_12";
description = "Which Gnome 3 package set to use.";
};
environment.gnome3.excludePackages = mkOption {
default = [];
example = "[ pkgs.gnome3.totem ]";
@ -64,6 +70,7 @@ in {
services.telepathy.enable = mkDefault true;
networking.networkmanager.enable = true;
services.upower.enable = config.powerManagement.enable;
services.upower.package = gnome3.upower;
fonts.fonts = [ pkgs.dejavu_fonts ];
@ -80,7 +87,7 @@ in {
# Don't let epiphany depend upon gnome-shell
# Override default mimeapps
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${pkgs.gnome3.gnome_shell}/share/gsettings-schemas/${pkgs.gnome3.gnome_shell.name}:${mimeAppsList}/share
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${gnome3.gnome_shell}/share/gsettings-schemas/${gnome3.gnome_shell.name}:${mimeAppsList}/share
# Let gnome-control-center find gnome-shell search providers
export GNOME_SEARCH_PROVIDERS_DIR=${config.system.path}/share/gnome-shell/search-providers/

30
nixos/tests/gnome3_12.nix Normal file
View File

@ -0,0 +1,30 @@
import ./make-test.nix {
machine =
{ config, pkgs, ... }:
{ imports = [ ./common/user-account.nix ];
services.xserver.enable = true;
services.xserver.displayManager.auto.enable = true;
services.xserver.displayManager.auto.user = "alice";
services.xserver.desktopManager.gnome3.enable = true;
environment.gnome3.packageSet = pkgs.gnome3_12;
};
testScript =
''
$machine->waitForX;
$machine->sleep(15);
# Check that logging in has given the user ownership of devices.
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
$machine->waitForWindow(qr/Terminal/);
$machine->sleep(10);
$machine->screenshot("screen");
'';
}

View File

@ -1,7 +1,7 @@
{ callPackage, self, pkgs }:
rec {
inherit (pkgs) glib gtk2 gtk3 gnome2;
inherit (pkgs) glib gtk2 gtk3 gnome2 upower;
gtk = gtk3; # just to be sure
libcanberra = pkgs.libcanberra_gtk3; # just to be sure
inherit (pkgs.gnome2) ORBit2;

Some files were not shown because too many files have changed in this diff Show More