[Top][All Lists]

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

[bug#33522] [PATCH 0/3] Add the '--with-branch' package transformation o

From: Ludovic Courtès
Subject: [bug#33522] [PATCH 0/3] Add the '--with-branch' package transformation option
Date: Tue, 27 Nov 2018 16:31:47 +0100


This patch series adds a ‘git-checkout’ file-like construct along with
a ‘--with-branch’ package transformation option.

The ‘git-checkout’ construct may be used like this:

  (define-public guile-git
      (inherit guile-next)
      (version "git")
      (source (git-checkout
               (url "";)
               (branch "master")))))

Then you can do this:

--8<---------------cut here---------------start------------->8---
$ guix build -L ~/.config/guix/personal/ address@hidden
updating checkout of ''...
retrieved commit 1f6786db06fee5f0bbdbd637acc6aa46aecd4169
building /gnu/store/7l168l4lgpjjg9jq7lh2416cc884r3s9-guile-next-git.drv...
--8<---------------cut here---------------end--------------->8---

IOW, every time you build the package, it gets built off the latest
commit of the specified branch.

The next patch add ‘--with-branch’ which makes that functionality
available from the command line.  For example:

  guix build --with-branch=guile-gcrypt=master cuirass

builds the latest guile-gcrypt, guix, and cuirass, using the latest
guile-gcrypt commit on ‘master’.

The ‘--with-branch’ option only works with packages that have a
‘git-fetch’ origin or a ‘git-checkout’ as their source.

I find it rather neat.  WDYT?  :-)


Ludovic Courtès (3):
  git: 'latest-repository-commit' logs its progress.
  git: Add <git-checkout> record type.
  guix build: Add '--with-branch' transformation option.                |  1 +
 doc/guix.texi              | 27 ++++++++++++++++++
 guix/git.scm               | 41 ++++++++++++++++++++++++++--
 guix/scripts/build.scm     | 56 ++++++++++++++++++++++++++++++++++++--
 tests/ | 48 ++++++++++++++++++++++++++++++++
 5 files changed, 168 insertions(+), 5 deletions(-)
 create mode 100644 tests/


reply via email to

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