unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* How to replace package in system configuration?
@ 2018-07-04 13:21 Jone
  2018-07-04 14:53 ` Marius Bakke
  0 siblings, 1 reply; 6+ messages in thread
From: Jone @ 2018-07-04 13:21 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 981 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 1564 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to replace package in system configuration?
  2018-07-04 13:21 How to replace package in system configuration? Jone
@ 2018-07-04 14:53 ` Marius Bakke
  2018-07-04 16:26   ` Jone
  2018-07-09 12:17   ` Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Marius Bakke @ 2018-07-04 14:53 UTC (permalink / raw)
  To: Jone, help-guix


[-- Attachment #1.1: Type: text/plain, Size: 1228 bytes --]

Jone <yeger9@gmail.com> 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:


[-- Attachment #1.2: config.scm --]
[-- Type: text/plain, Size: 498 bytes --]

(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)))

[-- Attachment #1.3: Type: text/plain, Size: 71 bytes --]


Note: I haven't tested this, but hopefully it should give an idea :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to replace package in system configuration?
  2018-07-04 14:53 ` Marius Bakke
@ 2018-07-04 16:26   ` Jone
  2018-07-04 19:53     ` Jone
  2018-07-09 12:17   ` Ludovic Courtès
  1 sibling, 1 reply; 6+ messages in thread
From: Jone @ 2018-07-04 16:26 UTC (permalink / raw)
  To: Marius Bakke; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 543 bytes --]

> Note: I haven't tested this, but hopefully it should give an idea :-)

Perfect!
You reminded about services and there is an idea even easier: just remove
colord-service.
How? This issue has already been discussed in *"Deleting services from
%desktop-services in operating system declaration"*
thread.

How much I understand, it will give the same effect?
I just do not work with physical documents, and so I absolutely don't need
either scanning or printing. And I would be glad
to completely get rid of Samba, CUPS and Sane in my system =)

[-- Attachment #2: Type: text/html, Size: 663 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to replace package in system configuration?
  2018-07-04 16:26   ` Jone
@ 2018-07-04 19:53     ` Jone
  0 siblings, 0 replies; 6+ messages in thread
From: Jone @ 2018-07-04 19:53 UTC (permalink / raw)
  Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

I was able to remove colord only like this:

(remove (lambda (service)
          (eq? (service-value service) colord))  ;; colord-service-type not
exported
        %desktop-services)

and after removing, the login to Xfce freezes for some time. In short,
something goes wrong =)
Where to see logs?

[-- Attachment #2: Type: text/html, Size: 399 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to replace package in system configuration?
  2018-07-04 14:53 ` Marius Bakke
  2018-07-04 16:26   ` Jone
@ 2018-07-09 12:17   ` Ludovic Courtès
  2018-08-20  1:34     ` Maxim Cournoyer
  1 sibling, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2018-07-09 12:17 UTC (permalink / raw)
  To: Marius Bakke; +Cc: help-guix

Marius Bakke <mbakke@fastmail.com> skribis:

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

Isn’t that insane?

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to replace package in system configuration?
  2018-07-09 12:17   ` Ludovic Courtès
@ 2018-08-20  1:34     ` Maxim Cournoyer
  0 siblings, 0 replies; 6+ messages in thread
From: Maxim Cournoyer @ 2018-08-20  1:34 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

ludo@gnu.org (Ludovic Courtès) writes:

> Marius Bakke <mbakke@fastmail.com> skribis:
>
>>     (name "colord-minimal")
>>     (inputs '())               ;look ma, no dependencies!
>>     (arguments
>>      `(#:configure-flags '("--disable-sane")))))
>
> Isn’t that insane?
>
> Ludo’.

(laughs, 5 weeks later :)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-20  1:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-04 13:21 How to replace package in system configuration? Jone
2018-07-04 14:53 ` Marius Bakke
2018-07-04 16:26   ` Jone
2018-07-04 19:53     ` Jone
2018-07-09 12:17   ` Ludovic Courtès
2018-08-20  1:34     ` Maxim Cournoyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).