Lee Thompson <lee.p.th...@gmail.com> writes:

> Hi All,
>
> Is there an analogue in Guix for NixOS's `excludePackage`? Under NixOS I
> had something like the following in my system config:
>> environment.gnome.excludePackages = with pkgs.gnome; [
>>     cheese
>>     epiphany
>>     gnome-music
>>   ];

I think it can be done with:
```
(define (exclude-some-packages lst)
  (filter (lambda (pkg)
            (not (memq pkg (list
                            gnome-terminal
                            gnome-user-docs
                            gnome-maps))))
          lst))


(service gnome-desktop-service-type
  (let ((cfg (gnome-desktop-configuration)))
   (gnome-desktop-configuration
    (core-services
     (exclude-some-packages (gnome-desktop-configuration-core-services cfg)))
    (shell
     (exclude-some-packages (gnome-desktop-configuration-shell cfg)))
    (utilities
     (exclude-some-packages (gnome-desktop-configuration-utilities cfg)))
    (extra-packages
     (exclude-some-packages (gnome-desktop-configuration-utilities cfg))))))
```

>From the its code, we can see that gnome-desktop-configuration use 4
lists for meta packages, which can be customized.

Hope it helps.

Reply via email to