From patchwork Tue Nov 27 15:31:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 328 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8C5DA16826; Tue, 27 Nov 2018 15:33:07 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) by mira.cbaines.net (Postfix) with ESMTPS id 216BD167A5 for ; Tue, 27 Nov 2018 15:33:07 +0000 (GMT) Received: from localhost ([::1]:43002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRfMI-0003Cf-9o for patchwork@mira.cbaines.net; Tue, 27 Nov 2018 10:33:06 -0500 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 X-Loop: help-debbugs@gnu.org Subject: [bug#33522] [PATCH 0/3] Add the '--with-branch' package transformation option Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 27 Nov 2018 15:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33522 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33522@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.154333274123810 (code B ref -1); Tue, 27 Nov 2018 15:33:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Nov 2018 15:32:21 +0000 Received: from localhost ([127.0.0.1]:52407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRfLZ-0006By-6x for submit@debbugs.gnu.org; Tue, 27 Nov 2018 10:32:21 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRfLX-0006Bm-4I for submit@debbugs.gnu.org; Tue, 27 Nov 2018 10:32:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRfLQ-0003HB-UK for submit@debbugs.gnu.org; Tue, 27 Nov 2018 10:32:13 -0500 Received: from lists.gnu.org ([2001:4830:134:3::11]:60348) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRfLQ-0003H1-Rp for submit@debbugs.gnu.org; Tue, 27 Nov 2018 10:32:12 -0500 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 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRfLG-0002xV-2B; Tue, 27 Nov 2018 10:32:02 -0500 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=53680 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gRfLF-0000fE-1h; Tue, 27 Nov 2018 10:32:01 -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> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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