From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRfMF-0003CV-R4 for guix-patches@gnu.org; Tue, 27 Nov 2018 10:33:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRfME-0004m5-Ow for guix-patches@gnu.org; Tue, 27 Nov 2018 10:33:03 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:48149) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRfME-0004kq-Ll for guix-patches@gnu.org; Tue, 27 Nov 2018 10:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gRfME-0006Cv-GO for guix-patches@gnu.org; Tue, 27 Nov 2018 10:33:02 -0500 Subject: [bug#33522] [PATCH 0/3] Add the '--with-branch' package transformation option Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRfLL-00021i-WD for guix-patches@gnu.org; Tue, 27 Nov 2018 10:32:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRfLL-00035j-1l for guix-patches@gnu.org; Tue, 27 Nov 2018 10:32:07 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Tue, 27 Nov 2018 16:31:47 +0100 Message-Id: <20181127153147.21247-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33522@debbugs.gnu.org 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 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