help-guix
[Top][All Lists]
Advanced

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

Re: Building and installing packages with modifications


From: Wayne
Subject: Re: Building and installing packages with modifications
Date: Sun, 24 Feb 2019 14:30:18 -0500
User-agent: Horde Application Framework 5

Quoting ison <address@hidden>:

Since this hasn't received any replies I'll give my solution, although I
apologize in advance if this isn't the "best" way to do it.

When I want to modify a package that I install via "guix package -i" (as opposed to using the GuixSD system configuration) I just create a new file for each such package that inherits the default package and then override any options I need.
For example, in the case of curl you could make a file with the contents:
--------------------
(use-modules ((guix licences) #:prefix license:)
              (gnu packages)
              (gnu packages curl)
              (guix packages)
              (guix utils)))

(package
  (inherit curl)
  (substitute-keyword-arguments (package-arguments curl)
    ((#:tests? #f #f)
      #f)))
--------------------
which will just inherit curl and only modify the flag "tests?" to disable tests.
Everything else will be kept the same. Then if you save that to a file called
my-curl.scm you could install it to your guix profile with
"guix package -f my-curl.scm"

thank you for sharing, a good clear example of the power of using Guile for package descriptions. i am very interested in this as a long time Gentoo user and had assumed that in Guix there was a nice way to achieve something similar to Gentoo's handy USE flag feature [1], as hinted at by this reddit post [2]. this helps :)

my follow up question is whether there is (or a plan for) any support for sharing these derived custom build binaries with other users, especially given the reproducability and verification of these builds already built into Guix e.g. if my custom package, architecture, etc. matches one already built and shared, substitute with that binary instead of rebuilding? while as useful (pun intended!) as USE flags can be, the never-ending compilation of packages in Gentoo (and its associated waste of time, CPU and most importantly energy) has me looking for alternatives which has led to GuixSD, seeminglyg a good compromise .. with lots of added features! currently in Gentoo there is little support for sharing binaries, particularly when not using the default USE flags of a package .. though the feature is there to support sharing of even these custom USE flag binaries [3].

thus basically are there any plans for sharing custom package definition binaries, perhaps even peer-to-peer? i thought that i had read something about this on this list but cannot find it currently in the archives.

thanks, w

PS: kudos to all the FOSDEM presenters! i just finished watching quite a few lectures and found them all not only informative but enjoyable :)


[1] https://wiki.gentoo.org/wiki/USE_flag
[2] https://www.reddit.com/r/GUIX/comments/58xvjx/guixsd_vs_gentoo/
[3] https://bugs.gentoo.org/150031


--
https://waynedpj.ingiro.xyz




reply via email to

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