all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 33522@debbugs.gnu.org
Subject: [bug#33522] [PATCH 0/3] Add the '--with-branch' package transformation option
Date: Tue, 27 Nov 2018 16:31:47 +0100	[thread overview]
Message-ID: <20181127153147.21247-1-ludo@gnu.org> (raw)

Hello,

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
    (package
      (inherit guile-next)
      (version "git")
      (source (git-checkout
               (url "https://git.savannah.gnu.org/git/guile.git")
               (branch "master")))))

Then you can do this:

--8<---------------cut here---------------start------------->8---
$ guix build -L ~/.config/guix/personal/ guile-next@git
updating checkout of 'https://git.savannah.gnu.org/git/guile.git'...
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?  :-)

Ludo’.

Ludovic Courtès (3):
  git: 'latest-repository-commit' logs its progress.
  git: Add <git-checkout> record type.
  guix build: Add '--with-branch' transformation option.

 Makefile.am                |  1 +
 doc/guix.texi              | 27 ++++++++++++++++++
 guix/git.scm               | 41 ++++++++++++++++++++++++++--
 guix/scripts/build.scm     | 56 ++++++++++++++++++++++++++++++++++++--
 tests/guix-build-branch.sh | 48 ++++++++++++++++++++++++++++++++
 5 files changed, 168 insertions(+), 5 deletions(-)
 create mode 100644 tests/guix-build-branch.sh

-- 
2.19.2

             reply	other threads:[~2018-11-27 15:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 15:31 Ludovic Courtès [this message]
2018-11-27 15:34 ` [bug#33522] [PATCH 1/3] git: 'latest-repository-commit' logs its progress Ludovic Courtès
2018-11-27 15:34   ` [bug#33522] [PATCH 2/3] git: Add <git-checkout> record type Ludovic Courtès
2018-11-27 15:34   ` [bug#33522] [PATCH 3/3] guix build: Add '--with-branch' transformation option Ludovic Courtès
2018-11-30 16:04 ` bug#33522: [PATCH 0/3] Add the '--with-branch' package " 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

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

  git send-email \
    --in-reply-to=20181127153147.21247-1-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=33522@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.