[Top][All Lists]

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

Replacing a package system-wide

From: Dominic Martinez
Subject: Replacing a package system-wide
Date: Tue, 15 Mar 2022 00:29:59 -0400
User-agent: mu4e 1.6.10; emacs 27.2

One of the things I love about Guix is how easy it is to modify dependencies, a feature I use fairly often on individual packages or manifests. However, I'm struggling to get a similar effect system-wide.

Grafts do exactly what I want, but since they are defined in the upstream package definition I can't set them for my personal system. Package rewriting lets me do this on a plain list of packages, but it's really difficult to do the same for services and not possible for guix shell/other command line usage.
#+begin_src scheme
;; Package rewriting makes this fairly straight-forward
(packages (fix-pkg %my-packages))

;; But for packages deep in the dependency tree, you have to
;; track down every service that has this package as a transient
;; dependency and fix it.
 (service some-pkg-service-type
           (some-pkg-service (fix-pkg pkg))))

 ;; Repeat ad-nauseum

If you're attempting to customize, say, Xorg, this results in a very-not-fun-time.

My ideal solution is something like the following:
#+begin_src scheme
;; When installed in a profile, replaces pkg for everything in the
;; profile
(replaces pkg)

Or if that's infeasible, at least something like this:
#+begin_src scheme
(list (channel
       (name 'guix)
       (url "";)
       (replacements `((,pkg . ,fixed-pkg)))

I'm thinking this falls into one of the following:
1. I'm dumb and there's an obvious solution
2. I should be using a local checkout for this type of work and not the upstream Guix channel 3. There's no good mechanism for this, and a patch would be welcomed

I'd appreciate any advice here, as this feels so much like something Guix should do surely others have stumbled on this before. Thank you!

Attachment: signature.asc
Description: PGP signature

reply via email to

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