[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Package variation
From: |
Chris Marusich |
Subject: |
Re: Package variation |
Date: |
Tue, 23 Oct 2018 19:33:09 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hi Brett,
Brett Gilio <address@hidden> writes:
> (define-public gnome-custom
> (package (inherit gnome)
> (name "gnome-custom")
> (inputs (alist-delete "nautilus" (package-inputs gnome)))))
The spirit of this is correct, but the implementation isn't quite
right. The gnome package has no inputs:
scheme@(guile-user)> ,use (gnu packages gnome)
scheme@(guile-user)> ,use (guix packages)
scheme@(guile-user)> (package-inputs gnome)
$1 = ()
Instead, it has many propagated inputs. So, you should probably write:
(define-public gnome-custom
(package (inherit gnome)
(name "gnome-custom")
(propagated-inputs (alist-delete
"nautilus"
(package-propagated-inputs gnome)))))
This will work as you expect. It's not incorrect to use alist-delete
here, but FYI you can also use matching to do this as follows:
(define-public gnome-custom
(package (inherit gnome)
(name "gnome-custom")
(propagated-inputs (remove
(match-lambda
;; Ignore the second value.
((name _)
(string=? name "nautilus")))
(package-propagated-inputs gnome)))))
Whether or not you like that better probably depends on whether or not
you view the value returned by (package-propagated-inputs gnome) as an
alist or a list of 2-element lists.
> (services (cons* (service gnome-desktop-service-type
> config =>
> (gnome-desktop-configuration
> (inherit config)
> (gnome-package gnome-custom)))
> %desktop-services))
It looks like you're using "config =>" from the modify-services syntax
without actually using modify-services. Try this instead:
(services (cons* (service gnome-desktop-service-type
(gnome-desktop-configuration
(inherit config)
(gnome-package gnome-custom)))
%desktop-services))
This should create and add a gnome-desktop-service-type service instance
with the configuration you've specified.
Hope that helps!
--
Chris
signature.asc
Description: PGP signature
Re: Package variation, Ludovic Courtès, 2018/10/24