unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 32759@debbugs.gnu.org
Subject: [bug#32759] [PATCH 0/8] Seamless integration of inferior packages
Date: Tue, 18 Sep 2018 14:04:08 +0200	[thread overview]
Message-ID: <20180918120408.27737-1-ludo@gnu.org> (raw)

Hello Guix!

Here comes icing for the cake: a facility that allows you to mix inferior
packages with “regular” packages in a single profile.

For now you can use it, for instance, by writing a manifest for
‘guix package -m’ along these lines:

--8<---------------cut here---------------start------------->8---
(use-modules (guix inferior) (guix channels))

(define channels
  (list (channel
         (name 'guix)
         (url
          "https://git.savannah.gnu.org/git/guix.git")
         (commit
          #;"4ab6a2f23d43f6c7e4a5a7420db613c5ba5b03b6" ;recent
          "65956ad3526ba09e1f7a40722c96c6ef7c0936fe"))))

(define inferior
  (inferior-for-channels channels))

(packages->manifest
 (list (car (lookup-inferior-packages inferior "guile-json"))
       (specification->package "guile")))
--8<---------------cut here---------------end--------------->8---

The example above gives you guile-json 1.0.1 with guile 2.2.4.

Inferior packages are “first class”, meaning that their search paths,
propagated inputs, etc. are honored, just like for regular packages.

Building Guix or even just computing its derivation takes some time
so the last patch, which implements ‘inferior-for-channels’, adds a
cache.  That way, if you frequently use a given inferior, it’s
immediately available.

There’s no documentation yet, mostly because I wanted to get it out
the door and wasn’t sure whether we should provide higher-level
interfaces.

Anyway, that’s it.  Feedback welcome!

Ludo’.

Ludovic Courtès (8):
  inferior: Add 'inferior-package-derivation'.
  inferior: Add 'lookup-inferior-packages'.
  inferior: Add 'inferior-package-inputs' & co.
  inferior: Add 'inferior-package-search-paths' & co.
  inferior: Add 'inferior-package->manifest-entry'.
  profiles: 'packages->manifest' now accepts inferior packages.
  channels: Add 'channel-instances->derivation'.
  inferior: Add 'inferior-for-channels'.

 guix/channels.scm     |  16 +-
 guix/inferior.scm     | 366 ++++++++++++++++++++++++++++++++++++++++--
 guix/profiles.scm     |  27 +++-
 tests/guix-package.sh |  15 ++
 tests/inferior.scm    | 123 +++++++++++++-
 5 files changed, 523 insertions(+), 24 deletions(-)

-- 
2.18.0

             reply	other threads:[~2018-09-18 12:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18 12:04 Ludovic Courtès [this message]
2018-09-18 12:06 ` [bug#32759] [PATCH 1/8] inferior: Add 'inferior-package-derivation' Ludovic Courtès
2018-09-18 12:06   ` [bug#32759] [PATCH 2/8] inferior: Add 'lookup-inferior-packages' Ludovic Courtès
2018-09-18 12:06   ` [bug#32759] [PATCH 3/8] inferior: Add 'inferior-package-inputs' & co Ludovic Courtès
2018-09-18 12:06   ` [bug#32759] [PATCH 4/8] inferior: Add 'inferior-package-search-paths' " Ludovic Courtès
2018-09-18 12:06   ` [bug#32759] [PATCH 5/8] inferior: Add 'inferior-package->manifest-entry' Ludovic Courtès
2018-09-18 12:06   ` [bug#32759] [PATCH 6/8] profiles: 'packages->manifest' now accepts inferior packages Ludovic Courtès
2018-09-18 12:06   ` [bug#32759] [PATCH 7/8] channels: Add 'channel-instances->derivation' Ludovic Courtès
2018-09-18 12:06   ` [bug#32759] [PATCH 8/8] inferior: Add 'inferior-for-channels' Ludovic Courtès
2018-09-21 15:05 ` bug#32759: [PATCH 0/8] Seamless integration of inferior packages Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180918120408.27737-1-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=32759@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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