From 9d5a06cfe7160db895962815fb60d989e3705d4b Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Fri, 11 Apr 2014 00:28:15 +0200 Subject: [PATCH] gnome3: use package names for environment.gnome3.excludePackages --- lib/lists.nix | 2 -- .../modules/services/x11/desktop-managers/gnome3.nix | 12 +++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/lists.nix b/lib/lists.nix index 6c7773304def..4b5f04a67585 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -227,6 +227,4 @@ in rec { 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 be41d917792a..60a74d6c7fe9 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -5,6 +5,16 @@ with pkgs.lib; let cfg = config.services.xserver.desktopManager.gnome3; gnome3 = pkgs.gnome3; + + # 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; + res = (filter (x: !(builtins.elem (pkgName x) ysNames)) xs); + in + filter (x: !(builtins.elem (pkgName x) ysNames)) xs; + in { options = { @@ -68,7 +78,7 @@ in { gnome3.gnome_settings_daemon gnome3.gnome_shell gnome3.gnome_themes_standard - ] ++ (lists.difference [ + ] ++ (removePackagesByName [ gnome3.baobab gnome3.eog gnome3.epiphany