help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to replace package in system configuration?


From: Marius Bakke
Subject: Re: How to replace package in system configuration?
Date: Wed, 04 Jul 2018 16:53:02 +0200
User-agent: Notmuch/0.27 (https://notmuchmail.org) Emacs/26.1 (x86_64-pc-linux-gnu)

Jone <address@hidden> writes:

> Hello. My question briefly: I want to get a compact base system, but can
> not do this by of the dependencies.
>
> Now for more details: during reconfigure installed a package A. A depend of
> B, B depend of C,
> C depend of D, .. and all of them I don't need.
> Removing package А will probably require a lot of work, but I can change
> the dependencies of the package
> and rebuild A at next reconfigure. But how to specify it in
> system_configuration.scm?
>
> Such variant:
>
>     (define-public PKG-A
>      (package (inherit PKG-A))
>      (name ...
>      (version ...
>      (arguments
>        #:tests? #f
>        #:configure-flags LIST-OF-CHANGED-CONFIGURE-OPTIONS
>        ...
>
> - probably is wrong? Then maybe so:
>
>     (define B
>      (package (inherit PKG-A))
>      ...
>     (define-public B)
>
> In my case, the unfortunate chain of dependencies is:
>     mariadb <- qtbase <- qtsvg <- python-pyqt <- hplip <- sane-backends <-
> colord
> and colord supports "--disable-sane" flag.

Hello!

The 'colord' service allows you to pass a custom package to be used
instead of the default.  So you can do something along these lines:

(define-module (local packages)
  #:use-module (guix packages)
  #:use-module (gnu packages gnome))

(define-public colord-minimal
  (package
    (inherit colord)
    (name "colord-minimal")
    (inputs '())               ;look ma, no dependencies!
    (arguments
     `(#:configure-flags '("--disable-sane")))))

(use-modules (gnu)
             (local packages))
(operating-system
  [...]
  (services (cons (colord-service
                   #:colord colord-minimal)
                   %base-services)))
Note: I haven't tested this, but hopefully it should give an idea :-)

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]