From patchwork Wed Apr 22 15:08:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 21417 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 4387727BBE4; Wed, 22 Apr 2020 16:10:31 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 122E427BBE1 for ; Wed, 22 Apr 2020 16:10:31 +0100 (BST) Received: from localhost ([::1]:52380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRH1C-0003GR-Kg for patchwork@mira.cbaines.net; Wed, 22 Apr 2020 11:10:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59290) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRH0m-0002pO-Vx for guix-patches@gnu.org; Wed, 22 Apr 2020 11:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRH0m-00019l-JJ for guix-patches@gnu.org; Wed, 22 Apr 2020 11:10:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jRH0m-00018x-7V for guix-patches@gnu.org; Wed, 22 Apr 2020 11:10:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jRH0m-00017x-2f for guix-patches@gnu.org; Wed, 22 Apr 2020 11:10:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40770] [PATCH 4/5] pack: Use a declarative profile. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 22 Apr 2020 15:10:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40770 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40770@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 40770-submit@debbugs.gnu.org id=B40770.15875681494207 (code B ref 40770); Wed, 22 Apr 2020 15:10:04 +0000 Received: (at 40770) by debbugs.gnu.org; 22 Apr 2020 15:09:09 +0000 Received: from localhost ([127.0.0.1]:52863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRGzt-00015n-CW for submit@debbugs.gnu.org; Wed, 22 Apr 2020 11:09:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRGzq-00014g-D9 for 40770@debbugs.gnu.org; Wed, 22 Apr 2020 11:09:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59990) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRGzl-00079Y-5B; Wed, 22 Apr 2020 11:09:01 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52530 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jRGzj-00029i-9o; Wed, 22 Apr 2020 11:08:59 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 22 Apr 2020 17:08:48 +0200 Message-Id: <20200422150849.5432-4-ludo@gnu.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200422150849.5432-1-ludo@gnu.org> References: <20200422150849.5432-1-ludo@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.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 * guix/scripts/pack.scm (guix-pack): Use a declarative profile instead of 'profile-derivation'. --- guix/scripts/pack.scm | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 6d63fb4b90..f3d1b41c6f 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -1071,7 +1071,21 @@ Create a bundle of PACKAGE.\n")) (localstatedir? (assoc-ref opts 'localstatedir?)) (entry-point (assoc-ref opts 'entry-point)) (profile-name (assoc-ref opts 'profile-name)) - (gc-root (assoc-ref opts 'gc-root))) + (gc-root (assoc-ref opts 'gc-root)) + (profile (profile + (content manifest) + + ;; Always produce relative symlinks for + ;; Singularity (see + ;; ). + (relative-symlinks? + (or relocatable? + (eq? 'squashfs pack-format))) + + (hooks (if bootstrap? + '() + %default-profile-hooks)) + (locales? (not bootstrap?))))) (define (lookup-package package) (manifest-lookup manifest (manifest-pattern (name package)))) @@ -1085,22 +1099,7 @@ Create a bundle of PACKAGE.\n")) to your package list."))) (run-with-store store - (mlet* %store-monad ((profile (profile-derivation - manifest - - ;; Always produce relative - ;; symlinks for Singularity (see - ;; ). - #:relative-symlinks? - (or relocatable? - (eq? 'squashfs pack-format)) - - #:hooks (if bootstrap? - '() - %default-profile-hooks) - #:locales? (not bootstrap?) - #:target target)) - (drv (build-image name profile + (mlet* %store-monad ((drv (build-image name profile #:target target #:compressor