From unknown Fri Jun 20 07:19:49 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#54393 <54393@debbugs.gnu.org> To: bug#54393 <54393@debbugs.gnu.org> Subject: Status: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests Reply-To: bug#54393 <54393@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:19:49 +0000 retitle 54393 [PATCH 0/2] Add 'guix manifest' to "translate" commands to ma= nifests reassign 54393 guix-patches submitter 54393 Ludovic Court=C3=A8s severity 54393 normal tag 54393 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 14 17:50:33 2022 Received: (at submit) by debbugs.gnu.org; 14 Mar 2022 21:50:33 +0000 Received: from localhost ([127.0.0.1]:46645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTsaH-00031e-3b for submit@debbugs.gnu.org; Mon, 14 Mar 2022 17:50:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:60616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTsaF-00031T-03 for submit@debbugs.gnu.org; Mon, 14 Mar 2022 17:50:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTsaE-0001aN-Ko for guix-patches@gnu.org; Mon, 14 Mar 2022 17:50:30 -0400 Received: from [2001:470:142:3::e] (port=52416 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTsaE-0000h4-Bc; Mon, 14 Mar 2022 17:50:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=VzkW+RpHsYH58LnVYAJRFCZ+Kljy1hlzckTCHCHPRIw=; b=kwEkFz6Kci0TAB aCTSzd1IDXm6Cw4TkTCFfrVdVvLqEzuP89SL3KwGkUjXxlN7MwFisiTG3f33THg98RepVMZ5d3vDY o6kbhGLkrSeTE8ndy1ef6yInbS5ZDagnIDecLNrxl5IgqYjxRFz4p0Gh25rYf0aWPfIEcHhcsKRO0 1vqS4qKOYKbTZz2q7ryezAV2eG4SmUhvnzWYsdRQQhx2VxcOuKEphW30faOZ0hk+UG4plRsgGK+/U GZGlO9jty4PGVTPBcCfg6CKk/SMwcZHXy+D1QtevP79TM/z7y2zXcHGQR3MQ7T7CDPrLl1NKjC4Us l3sKfGQsZddaFzeCKo+Q==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:53604 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTsa7-0008Cp-KI; Mon, 14 Mar 2022 17:50:30 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests Date: Mon, 14 Mar 2022 22:50:15 +0100 Message-Id: <20220314215015.24435-1-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello Guix! Writing manifests can be intimidating: in part because it’s not well documented, and in part because it’s always hard to start from a blank page. We have ‘guix package --export-manifest’ to help with that, but I realized that colleagues of mine often use ‘guix shell’ more than ‘guix package’, and ‘--export-manifest’ is awkward to use: $ guix shell a b c d --transform=whatever=else [env]$ guix package --export-manifest -p $GUIX_ENVIRONMENT I figured that instead of documenting this, we might as well provide a command that does it in one go: guix manifest a b c d --transform=whatever=else > manifest.scm Voilà! Thoughts? Next up: adding a “Writing Manifests” section. Ludo’. Ludovic Courtès (2): packages: Add 'package-unique-version-prefix'. Add 'guix manifest'. Makefile.am | 2 + doc/guix.texi | 146 +++++++++++++++++++++++++++++++- gnu/packages.scm | 21 +++++ guix/scripts/manifest.scm | 174 ++++++++++++++++++++++++++++++++++++++ guix/scripts/package.scm | 20 +---- po/guix/POTFILES.in | 1 + tests/guix-manifest.sh | 76 +++++++++++++++++ tests/packages.scm | 13 +++ 8 files changed, 434 insertions(+), 19 deletions(-) create mode 100644 guix/scripts/manifest.scm create mode 100644 tests/guix-manifest.sh base-commit: 857e5ab22292fe7c2ba5b9855c0829a2ef942d38 -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 14 17:52:03 2022 Received: (at 54393) by debbugs.gnu.org; 14 Mar 2022 21:52:03 +0000 Received: from localhost ([127.0.0.1]:46653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTsbi-00034t-HQ for submit@debbugs.gnu.org; Mon, 14 Mar 2022 17:52:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTsbg-00034L-Ec for 54393@debbugs.gnu.org; Mon, 14 Mar 2022 17:52:00 -0400 Received: from [2001:470:142:3::e] (port=52430 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTsbb-000196-4l; Mon, 14 Mar 2022 17:51:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=VbmHdSNoON7ONn6RYGDw0+W9fSMQBHI6apFbj3QU7UM=; b=isxgfvCFXzIDLa mKGqrbFZA1uBR5iPQZ6oYO+ybbiyhdxEp18YtHUfquJ80hocYvTiUJz1kVXnFVvcD0aOM+LnDFiBV kuRUbhHWG0lgsuNcZtt1J+BecedDzLiLzI/m4pbQNeb4LXuHoF7X3O1nUA0FuW0rzS+aAcWAMEKze +dxATUjVxKQfYWo2CxDHEiaa3V9xIDK7Y13s2BzZYsY8m+jNpeg4YPiiH17Qww/jvi4Fv+GPkqn6G q8eTw+VZVtGLIbA2NveJ3tGfreBSYFmIBA5T4LclBxkEeTLfoV7izxH2ZjA/TEjSbMZnuH2+2OPYi lfUqGQ4VDOt+q61gl1zQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:62373 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTsba-00006I-Oh; Mon, 14 Mar 2022 17:51:54 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 54393@debbugs.gnu.org Subject: [PATCH 1/2] packages: Add 'package-unique-version-prefix'. Date: Mon, 14 Mar 2022 22:51:45 +0100 Message-Id: <20220314215146.24490-1-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages.scm (package-unique-version-prefix): New procedure. * guix/scripts/package.scm (manifest-entry-version-prefix): Use it. * tests/packages.scm ("package-unique-version-prefix, gcc@8") ("package-unique-version-prefix, grep"): New tests. --- gnu/packages.scm | 21 +++++++++++++++++++++ guix/scripts/package.scm | 20 ++------------------ tests/packages.scm | 13 +++++++++++++ 3 files changed, 36 insertions(+), 18 deletions(-) diff --git a/gnu/packages.scm b/gnu/packages.scm index 65ab7a7c1e..2ba838fd0a 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -66,6 +66,8 @@ (define-module (gnu packages) specification->location specifications->manifest + package-unique-version-prefix + generate-package-cache)) ;;; Commentary: @@ -559,3 +561,22 @@ (define (specifications->manifest specs) ;; fiddle with multiple-value returns. (packages->manifest (map (compose list specification->package+output) specs))) + +(define (package-unique-version-prefix name version) + "Search among all the versions of package NAME that are available, and +return the shortest unambiguous version prefix to designate VERSION. If only +one version of the package is available, return the empty string." + (match (map package-version (find-packages-by-name name)) + ((_) + ;; A single version of NAME is available, so do not specify the version + ;; number, even if the available version doesn't match VERSION. + "") + (versions + ;; If VERSION is the latest version, don't specify any version. + ;; Otherwise return the shortest unique version prefix. Note that this + ;; is based on the currently available packages so the result may vary + ;; over time. + (if (every (cut version>? version <>) + (delete version versions)) + "" + (version-unique-prefix version versions))))) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 9699c70c6d..22ee8a2485 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -334,24 +334,8 @@ (define (manifest-entry-version-prefix entry) "Search among all the versions of ENTRY's package that are available, and return the shortest unambiguous version prefix for this package. If only one version of ENTRY's package is available, return the empty string." - (let ((name (manifest-entry-name entry))) - (match (map package-version (find-packages-by-name name)) - ((_) - ;; A single version of NAME is available, so do not specify the - ;; version number, even if the available version doesn't match ENTRY. - "") - (versions - ;; If ENTRY uses the latest version, don't specify any version. - ;; Otherwise return the shortest unique version prefix. Note that - ;; this is based on the currently available packages, which could - ;; differ from the packages available in the revision that was used - ;; to build MANIFEST. - (let ((current (manifest-entry-version entry))) - (if (every (cut version>? current <>) - (delete current versions)) - "" - (version-unique-prefix (manifest-entry-version entry) - versions))))))) + (package-unique-version-prefix (manifest-entry-name entry) + (manifest-entry-version entry))) (define* (export-manifest manifest #:optional (port (current-output-port))) diff --git a/tests/packages.scm b/tests/packages.scm index 02bdba5f98..b228c9fc3b 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -1923,6 +1923,19 @@ (define (list->set* lst) (package-location (specification->package "guile@2")) (specification->location "guile@2")) +(test-equal "package-unique-version-prefix, gcc@8" + "8" + (let ((gcc (specification->package "gcc-toolchain@8"))) + (package-unique-version-prefix (package-name gcc) + (package-version gcc)))) + +(test-equal "package-unique-version-prefix, grep" + "" + (let ((grep (specification->package "grep"))) + (package-unique-version-prefix (package-name grep) + (package-version grep)))) + + (test-eq "this-package-input, exists" hello (package-arguments -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 14 17:52:16 2022 Received: (at 54393) by debbugs.gnu.org; 14 Mar 2022 21:52:16 +0000 Received: from localhost ([127.0.0.1]:46655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTsbl-00035H-7x for submit@debbugs.gnu.org; Mon, 14 Mar 2022 17:52:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTsbh-00034N-93 for 54393@debbugs.gnu.org; Mon, 14 Mar 2022 17:52:03 -0400 Received: from [2001:470:142:3::e] (port=52432 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTsbb-00019J-NT; Mon, 14 Mar 2022 17:51:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=6zqjGpniIhydCdbvKDp7LwPDK+N2lWYYWJy4s0/FHg0=; b=hRRMjPbtvUrUz5+a6rFe YrWzOjbQi9nmU6OM5g4Hzh/0eN/wFU0+ycfzCSJvVZ5ndQbhRlq+njkG9WxES+c/4o0gHiP/ky8ud jk6ptFQJNl95ctdMgYLqn9zOD1HelZnn9B905qjZcLz+5/clRcfzt0s8rbdcGZ2xBCzD5WZvG8NZE 25aT+jN9I7SlRKIFAIenWKC3JwsN4rkU7evjp4NZ0ZRP7BBQbuQ/b64yp9sqs/IdmbkKZBuB3U7xs qAA7w9B3PsNrr9NJRD8+qnSXFaeRVdlf9boLU+1Y+cYPbQe/luiIAZs9KolIr8fm4+GtbjWhZnxHj 67J4TS88MRCc5Q==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:62373 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTsbb-00006I-BF; Mon, 14 Mar 2022 17:51:55 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 54393@debbugs.gnu.org Subject: [PATCH 2/2] Add 'guix manifest'. Date: Mon, 14 Mar 2022 22:51:46 +0100 Message-Id: <20220314215146.24490-2-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220314215146.24490-1-ludo@gnu.org> References: <20220314215146.24490-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) From: Ludovic Courtès * guix/scripts/manifest.scm: New file. * po/guix/POTFILES.in: Add it. * tests/guix-manifest.sh: New file. * Makefile.am (MODULES, SH_TESTS): Add them. * doc/guix.texi (Invoking guix manifest): New section. (Invoking guix package): Refer to it. (Invoking guix shell): Likewise. (Invoking guix environment): Likewise. (Invoking guix pack): Likewise. --- Makefile.am | 2 + doc/guix.texi | 146 +++++++++++++++++++++++++++++++- guix/scripts/manifest.scm | 174 ++++++++++++++++++++++++++++++++++++++ po/guix/POTFILES.in | 1 + tests/guix-manifest.sh | 76 +++++++++++++++++ 5 files changed, 398 insertions(+), 1 deletion(-) create mode 100644 guix/scripts/manifest.scm create mode 100644 tests/guix-manifest.sh diff --git a/Makefile.am b/Makefile.am index 7402c89b62..40b6c75e23 100644 --- a/Makefile.am +++ b/Makefile.am @@ -318,6 +318,7 @@ MODULES = \ guix/scripts/import/pypi.scm \ guix/scripts/import/stackage.scm \ guix/scripts/import/texlive.scm \ + guix/scripts/manifest.scm \ guix/scripts/environment.scm \ guix/scripts/shell.scm \ guix/scripts/publish.scm \ @@ -568,6 +569,7 @@ SH_TESTS = \ tests/guix-environment.sh \ tests/guix-environment-container.sh \ tests/guix-shell.sh \ + tests/guix-manifest.sh \ tests/guix-graph.sh \ tests/guix-describe.sh \ tests/guix-repl.sh \ diff --git a/doc/guix.texi b/doc/guix.texi index dbe281ead7..4dc3c8b1fc 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -233,6 +233,7 @@ Package Management * Invoking guix package:: Package installation, removal, etc. * Substitutes:: Downloading pre-built binaries. * Packages with Multiple Outputs:: Single source package, multiple outputs. +* Invoking guix manifest:: Producing environment declarations. * Invoking guix gc:: Running the garbage collector. * Invoking guix pull:: Fetching the latest Guix and distribution. * Invoking guix time-machine:: Running an older revision of Guix. @@ -3042,6 +3043,7 @@ guix install emacs-guix * Invoking guix package:: Package installation, removal, etc. * Substitutes:: Downloading pre-built binaries. * Packages with Multiple Outputs:: Single source package, multiple outputs. +* Invoking guix manifest:: Producing environment declarations. * Invoking guix gc:: Running the garbage collector. * Invoking guix pull:: Fetching the latest Guix and distribution. * Invoking guix time-machine:: Running an older revision of Guix. @@ -3412,7 +3414,9 @@ The example above gives you all the software required to develop Emacs, similar to what @command{guix environment emacs} provides. @xref{export-manifest, @option{--export-manifest}}, to learn how to -obtain a manifest file from an existing profile. +obtain a manifest file from an existing profile, and @pxref{Invoking +guix manifest} on how to generate a manifest file from a list of package +specs and command-line options. @item --roll-back @cindex rolling back @@ -4159,6 +4163,137 @@ Files}). The outputs of a packages are listed in the third column of the output of @command{guix package --list-available} (@pxref{Invoking guix package}). +@node Invoking guix manifest +@section Invoking @command{guix manifest} + +@cindex manifest, generating +The @command{guix manifest} command outputs a @dfn{manifest} +corresponding to the packages and options specified on the command line. +Manifests are code snippets that @emph{declare} the set of packages you +want to deploy---you can view them as a more expressive form of what you +pass on the command line to @command{guix install}, @command{guix +shell}, etc. All these commands accept a @option{--manifest} (or +@option{-m}) option that allows you to pass them a manifest. For +non-trivial package sets and customizations, you'll find that using a +manifest rather than a long command line is often more convenient. + +But how do you go from that long command line you're familiar with to +that appealing but possibly intimidating ``manifest'' thing? The +@command{guix manifest} command is your companion on this journey: it +essentially ``translates'' command-line arguments into manifests. + +Let's look at a few examples. What's a manifest corresponding to a +basic list of package specifications? We can figure out by running, +say: + +@example +guix manifest coreutils grep sed +@end example + +@noindent +... which outputs this manifest: + +@lisp +(specifications->manifest + (list "coreutils" "grep" "sed")) +@end lisp + +The manifest constructs a list containing the three @dfn{package specs} +and passes it to the @code{specifications->manifest} procedure, which +returns a manifest corresponding of the three designated packages. + +@quotation Note +Manifests are @emph{symbolic}: they refer to packages by their +specification (name and optionally version), which denote different +packages over time---@code{coreutils} above might refer to version 8.32 +today and to 9.0 six months from now. + +To ``pin'' a package set to a specific revision, you will additionally +need a @dfn{channel file} as produced by @command{guix describe -f +channels} (@pxref{Invoking guix describe}). +@end quotation + +That one was easy, but @command{guix manifest} can also handle more +complex cases. For example, consider the manifest for the development +environment of Guile, with the addition of Git: + +@example +guix manifest -D guile git +@end example + +@noindent +This gives us: + +@example +(concatenate-manifests + (list (specifications->manifest (list "git")) + (package->development-manifest + (specification->package "guile")))) +@end example + +The @command{guix manifest} command also takes care package +transformation options, producing a manifest that faithfully reapplies +them (@pxref{Package Transformation Options}): + +@example +guix manifest intel-mpi-benchmarks --with-input=openmpi=mpich +@end example + +@noindent +... yields: + +@lisp +(use-modules (guix transformations)) + +(define transform1 + (options->transformation + '((with-input . "openmpi=mpich")))) + +(packages->manifest + (list (transform1 + (specification->package "intel-mpi-benchmarks")))) +@end lisp + +Convenient, no? You can take the output of @command{guix manifest} +as-is, store it in a file, and enjoy it. But you can also view it as +raw material that you can modify to refine the expression of the +environment you want to deploy. + +The general syntax is: + +@example +guix manifest [@var{options}] @var{spec}@dots{} +@end example + +@noindent +... where each @var{spec} denotes a package and (optionally) its output, +such as @code{emacs}, @code{gcc-toolchain@@8}, or +@code{git:send-email}. The available options are: + +@table @option +@item --development +@itemx -D +Consider the environment needed to @emph{develop} the following package +rather than the package itself. + +For instance, to obtain a manifest representing the environment to +develop Elixir (and not Elixir itself), with the addition of Nano, run: + +@example +guix manifest -D elixir nano +@end example + +In this example, @option{-D} affects @code{elixir}, not @code{nano}. + +@item --manifest=@var{file} +@itemx -m @var{file} +Read the manifest in @var{file} and combine it with other options to +produce the resulting manifest. +@end table + +Additionally, @command{guix manifest} understands all the package +transformation options (@pxref{Package Transformation Options}). + @node Invoking guix gc @section Invoking @command{guix gc} @@ -5847,6 +5982,9 @@ This is similar to the same-named option in @command{guix package} (@pxref{profile-manifest, @option{--manifest}}) and uses the same manifest files. +@xref{Invoking guix manifest}, for information on how to ``convert'' +command-line options into a manifest. + @item --profile=@var{profile} @itemx -p @var{profile} Create an environment containing the packages installed in @var{profile}. @@ -6234,6 +6372,9 @@ This is similar to the same-named option in @command{guix package} (@pxref{profile-manifest, @option{--manifest}}) and uses the same manifest files. +@xref{Invoking guix manifest}, for information on how to ``convert'' +command-line options into a manifest. + @item --ad-hoc Include all specified packages in the resulting environment, as if an @i{ad hoc} package were defined with them as inputs. This option is @@ -6692,6 +6833,9 @@ for use on machines that do not have Guix installed. Note that you can specify @emph{either} a manifest file @emph{or} a list of packages, but not both. +@xref{Invoking guix manifest}, for information on how to ``convert'' +command-line options into a manifest. + @item --system=@var{system} @itemx -s @var{system} Attempt to build for @var{system}---e.g., @code{i686-linux}---instead of diff --git a/guix/scripts/manifest.scm b/guix/scripts/manifest.scm new file mode 100644 index 0000000000..fea5d130c3 --- /dev/null +++ b/guix/scripts/manifest.scm @@ -0,0 +1,174 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Ludovic Courtès +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix scripts manifest) + #:use-module (guix ui) + #:use-module ((guix diagnostics) #:select (location)) + #:use-module (guix scripts environment) + #:use-module (guix transformations) + #:use-module (guix scripts) + #:use-module (guix packages) + #:use-module (guix profiles) + #:autoload (gnu packages) (specifications->manifest + specification->package + package-unique-version-prefix) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-37) + #:use-module (srfi srfi-71) + #:use-module (ice-9 match) + #:autoload (ice-9 pretty-print) (pretty-print) + #:export (guix-manifest)) + +(define (show-help) + (display (G_ "Usage: guix manifest [OPTION] SPECS... +Print a manifest corresponding to the given package SPECS.\n")) + (newline) + + (display (G_ " + -D, --development include the development inputs of the next package")) + (display (G_ " + -m, --manifest=FILE create environment with the manifest from FILE")) + + (newline) + (show-transformation-options-help) + (newline) + (display (G_ " + -h, --help display this help and exit")) + (display (G_ " + -V, --version display version information and exit")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specification of the command-line options. + (cons* (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix manifest"))) + + (option '(#\D "development") #f #f + (lambda (opt name arg result) + (alist-cons 'development? #t result))) + (option '(#\m "manifest") #t #f + (lambda (opt name arg result) + (alist-cons 'manifest arg result))) + + %transformation-options)) + +(define %default-options + ;; Default option alist. + '()) + +(define (load-manifest file) ;TODO: factorize + "Load the user-profile manifest (Scheme code) from FILE and return it." + (let ((user-module (make-user-module '((guix profiles) (gnu))))) + (load* file user-module))) + +(define (manifest-entry-version-prefix entry) + "Search among all the versions of ENTRY's package that are available, and +return the shortest unambiguous version prefix for this package." + (package-unique-version-prefix (manifest-entry-name entry) + (manifest-entry-version entry))) + +(define (manifest->code* manifest extra-manifests) + "Like 'manifest->code', but insert a 'concatenate-manifests' call that +concatenates MANIFESTS, a list of expressions." + (if (null? (manifest-entries manifest)) + (match extra-manifests + ((one) one) + (lst `(concatenate-manifests ,@extra-manifests))) + (match (manifest->code manifest + #:entry-package-version + manifest-entry-version-prefix) + (('begin exp ... last) + `(begin + ,@exp + ,(match extra-manifests + (() last) + (_ `(concatenate-manifests + (list ,last ,@extra-manifests))))))))) + + +(define-command (guix-manifest . args) + (category development) + (synopsis "turn command-line arguments into a manifest") + + (define (manifest-lift proc) + (lambda (entry) + (match (manifest-entry-item entry) + ((? package? p) + (manifest-entry + (inherit (package->manifest-entry (proc p))) + (output (manifest-entry-output entry)))) + (_ + entry)))) + + (define (handle-argument arg result) + (if (assoc-ref result 'development?) + (alist-cons 'development-inputs arg + (alist-delete 'development? result)) + (alist-cons 'argument arg result))) + + (with-error-handling + (let* ((opts (parse-command-line args %options (list %default-options) + #:build-options? #f + #:argument-handler handle-argument)) + (transform (options->transformation opts)) + (specs (reverse + (filter-map (match-lambda + (('argument . spec) spec) + (_ #f)) + opts))) + (extras (reverse + (filter-map (match-lambda + (('development-inputs . spec) + ;; Make sure SPEC is valid. + (specification->package spec) + + ;; XXX: This is an approximation: + ;; transformation options are not + ;; applied. + `(package->development-manifest + (specification->package ,spec))) + (_ #f)) + opts))) + (manifest (concatenate-manifests + (cons (map-manifest-entries + (manifest-lift transform) + (specifications->manifest specs)) + (filter-map (match-lambda + (('manifest . file) + (load-manifest file)) + (_ #f)) + opts))))) + (display (G_ "\ +;; What follows is a \"manifest\" equivalent to the command line you gave. +;; You can store it in a file that you may then pass to any 'guix' command +;; that accepts a '--manifest' (or '-m') option.\n")) + (match (manifest->code* manifest extras) + (('begin exp ...) + (for-each (lambda (exp) + (newline) + (pretty-print exp)) + exp)) + (exp + (pretty-print exp)))))) diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in index d97ba8c209..5b8eadf884 100644 --- a/po/guix/POTFILES.in +++ b/po/guix/POTFILES.in @@ -99,6 +99,7 @@ guix/scripts/weather.scm guix/scripts/describe.scm guix/scripts/processes.scm guix/scripts/deploy.scm +guix/scripts/manifest.scm guix/gexp.scm guix/gnu-maintenance.scm guix/scripts/container.scm diff --git a/tests/guix-manifest.sh b/tests/guix-manifest.sh new file mode 100644 index 0000000000..de82815ba0 --- /dev/null +++ b/tests/guix-manifest.sh @@ -0,0 +1,76 @@ +# GNU Guix --- Functional package management for GNU +# Copyright © 2022 Ludovic Courtès +# +# This file is part of GNU Guix. +# +# GNU Guix is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# GNU Guix is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Guix. If not, see . + +# +# Test 'guix manifest'. +# + +guix manifest --version + +tmpdir="t-guix-manifest-$$" +trap 'rm -r "$tmpdir"' EXIT +mkdir "$tmpdir" + +manifest="$tmpdir/manifest.scm" + +# Basics. +guix manifest guile-bootstrap > "$manifest" +test "$(guix build -m "$manifest")" = "$(guix build guile-bootstrap)" + +guix shell -m "$manifest" --bootstrap -- \ + "$SHELL" -c 'guix package --export-manifest -p "$GUIX_ENVIRONMENT"' > \ + "$manifest.second" +for m in "$manifest" "$manifest.second" +do + grep -v '^;' < "$m" > "$m.new" # filter out comments + mv "$m.new" "$m" +done + +cat "$manifest" +cat "$manifest.second" + +cmp "$manifest" "$manifest.second" + +# Package transformation option. +guix manifest guile guix --with-latest=guile-json > "$manifest" +grep 'options->transformation' "$manifest" +grep '(with-latest . "guile-json")' "$manifest" + +# Development manifest. +guix manifest -D guile git > "$manifest" +grep 'package->development-manifest' "$manifest" +grep '"guile"' "$manifest" +guix build -m "$manifest" -d | \ + grep "$(guix build -e '(@@ (gnu packages commencement) gcc-final)' -d)" +guix build -m "$manifest" -d | \ + grep "$(guix build git -d)" + +# Test various combinations to make sure generated code uses interfaces +# correctly. +for options in \ + "coreutils grep sed" \ + "gsl openblas gcc-toolchain --tune" \ + "guile -m $manifest.previous" \ + "git:send-email gdb guile:debug" \ + "git -D coreutils" +do + guix manifest $options > "$manifest" + cat "$manifest" + guix shell -m "$manifest" -n + mv "$manifest" "$manifest.previous" +done -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 15 03:19:03 2022 Received: (at 54393) by debbugs.gnu.org; 15 Mar 2022 07:19:03 +0000 Received: from localhost ([127.0.0.1]:47358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU1SR-00049e-7y for submit@debbugs.gnu.org; Tue, 15 Mar 2022 03:19:03 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:63171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU1SO-00049D-GQ for 54393@debbugs.gnu.org; Tue, 15 Mar 2022 03:19:01 -0400 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4KHlBn1YDmz1LZWS; Tue, 15 Mar 2022 08:18:57 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4KHlBn1YDmz1LZWS DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1647328737; bh=YA3eHjgZDVzH89Xk31sA3iHdOnxcIWtnNahcSlNu39g=; h=Subject:From:To:Date:In-Reply-To:References:From; b=oGXKZ0FGAHx9f89IEwvuOf6yP4Ph9TQFaCYtl8fsCb4tXGbGSynXbTkbYCLB1Uv9I J5UfTxuTW2e7jDVKSas6DvTpjafkiizLRHvAYuYc15S4bqi9O3keUjxjV7dT10t2gL IUGuBTRV7d5daeZqNfFvTE6uxVryDd88b8jhzfGM= Message-ID: Subject: Re: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests From: Liliana Marie Prikler To: Ludovic =?ISO-8859-1?Q?Court=E8s?= , 54393@debbugs.gnu.org Date: Tue, 15 Mar 2022 08:18:57 +0100 In-Reply-To: <20220314215015.24435-1-ludo@gnu.org> References: <20220314215015.24435-1-ludo@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Am Montag, dem 14.03.2022 um 22:50 +0100 schrieb Ludovic Courtès: > Hello Guix! > > Writing manifests can be intimidating: in part because it’s not > well documented, and in part because it’s always hard to start from > a blank page. > > We have ‘guix package --export-manifest’ to help with that, but I > realized that colleagues of mine often use ‘guix shell’ more than > ‘guix package’, and ‘--export-manifest’ is awkward to use: > >   $ guix shell a b c d --transform=whatever=else >   [env]$ guix package --export-manifest -p $GUIX_ENVIRONMENT > > I figured that instead of documenting this, we might as well provide > a command that does it in one go: > >   guix manifest a b c d --transform=whatever=else > manifest.scm > > Voilà! > > Thoughts? The current implementation is missing the most important feature, which would be ‘guix manifest --profile $GUIX_PROFILE’ :) I think if we are to introduce a new command, we should make it handle existing use cases as well. If people then prefer ‘guix manifest’ over ‘guix package --export-manifest’, we can deprecate the old command in favor of the new one. Furthermore, one issue I have with both the existing and proposed approaches is that both mandate the specification style, whereas for operating system configs we typically prefer the variable style of referencing a package. Adding an option to choose between the two would be much appreciated from my side. Cheers From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 15 05:01:18 2022 Received: (at 54393) by debbugs.gnu.org; 15 Mar 2022 09:01:18 +0000 Received: from localhost ([127.0.0.1]:47511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU33N-00073r-S4 for submit@debbugs.gnu.org; Tue, 15 Mar 2022 05:01:18 -0400 Received: from mail-io1-f50.google.com ([209.85.166.50]:44943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU33I-00073W-Nx for 54393@debbugs.gnu.org; Tue, 15 Mar 2022 05:01:16 -0400 Received: by mail-io1-f50.google.com with SMTP id e22so21355663ioe.11 for <54393@debbugs.gnu.org>; Tue, 15 Mar 2022 02:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=K8M60spZuI2Cu5Pzsy1k3Lr7K46Yy+Y5GQDyZfLlUSQ=; b=iCkKbxqfW79Y28ELAgLcounxwZT1K7Ae/VPqWtHvC7qXvHS+CY3QIBcaSzXWm0i0ru QQqZ0H72XH8BlGUh5ioAhUyp7UjEGvKF9ZU47Yoh6iUmIovJHs+i2qBM+4rbsWX/x/7S snJ/gRjyZSFyr4ITHYeAz1bsCnMdiM8XZ1YsUpHauzL0AeqM7gZ/NyDXIIK7f+4Jy0XP LgwX1ZF4eJZzxIfxIlfBYATCUjUtTzPaBEGBXjeKdWi7dDatJaExnSLoscOJP27pqMab EDRswWDSHf2yRWrmdHSQAV4GUTFHlO0HOZCbaEYIT11XIC/bqumNESHuOV/SoDT63DS5 jH+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=K8M60spZuI2Cu5Pzsy1k3Lr7K46Yy+Y5GQDyZfLlUSQ=; b=XsQVsaIAPJBBN17EKYngJIiatdVVleC08ijxF8koJ7Z1LyjcCO5EbaBsYuAyFD2W9a 0DIz3v6AkCCxQ9Bq0CLtlFXdpO5UHZqEjDjV1QemEAcMGJvCKPCoE2kjt7ZKHx75CW5Y DKI4hu8MvjJG1VfgDzQm7LLIFTwrECvj66CCZf9jY8ShOCmtgINiL8LLi2Qfs6Vx193G DfLevHaEG1zA1+5xns27s7GFHEW1T7k6+3wZSkIw8NCgh+vte2kjUiKBaODmBKfYiox8 gyzqMV1i4AtdBGOmaFYFSoQInWu2LWXo2mkLIFwvi5LqHIIAsBTcEbwv6o2nymJ+LWBR 50fA== X-Gm-Message-State: AOAM530XeLi9rGgC+XjfaVNBHbI0QOad4TF6p4rnLUue5G3rN/RCOOQG pNNTx7pxVfiZoltlnxVdZSoEe9GJeHnDg0Xgt0U= X-Google-Smtp-Source: ABdhPJxR2kCl1PtQFTfrBaakFhWz+Wee3SnttgbuXWXxTX3tkz9DgQyC3q8GtWVbyDKlW6yXSCTvdFaelwyONbYnocE= X-Received: by 2002:a05:6602:150a:b0:632:c10c:55ff with SMTP id g10-20020a056602150a00b00632c10c55ffmr21811156iow.16.1647334866803; Tue, 15 Mar 2022 02:01:06 -0700 (PDT) MIME-Version: 1.0 References: <20220314215015.24435-1-ludo@gnu.org> In-Reply-To: <20220314215015.24435-1-ludo@gnu.org> From: zimoun Date: Tue, 15 Mar 2022 10:00:55 +0100 Message-ID: Subject: Re: [bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54393 Cc: 54393@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, On Mon, 14 Mar 2022 at 22:53, Ludovic Court=C3=A8s wrote: > $ guix shell a b c d --transform=3Dwhatever=3Delse > [env]$ guix package --export-manifest -p $GUIX_ENVIRONMENT > > I figured that instead of documenting this, we might as well provide > a command that does it in one go: > > guix manifest a b c d --transform=3Dwhatever=3Delse > manifest.scm >From my opinion, a complete subcommand for only one use case does not seem the right thing. Instead, IMHO, it would be better to have an extension for that. Because once we introduce a subcommand, it is hard to change (see 'guix environment') and since Guix provides this great extension mechanism, I think it is the path for this kind of niche use cases: start with an extension and depending on the "popularity" and interest then upstream. Well, if you think this feature is great to have in Guix proper, personally I would find more coherent: guix package --create-manifest a b c --transform=3Dwhatever=3Delse > manifest.scm Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 15 05:23:22 2022 Received: (at 54393) by debbugs.gnu.org; 15 Mar 2022 09:23:22 +0000 Received: from localhost ([127.0.0.1]:47567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU3Ok-0007gC-HS for submit@debbugs.gnu.org; Tue, 15 Mar 2022 05:23:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU3Oh-0007fz-VL for 54393@debbugs.gnu.org; Tue, 15 Mar 2022 05:23:20 -0400 Received: from [2001:470:142:3::e] (port=33218 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU3Oc-0002yg-OH; Tue, 15 Mar 2022 05:23:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=yLVSe/2A9rFGSoFwBlUMuQGI9VS8UIfj9rBGxnqTH50=; b=KPlIblIYMxxVzqrvsnhs NKEGFDNDnbr7a8Zp98D1u9t3u9iICmt71C2cfieipUTy1+14I9qMktSTfOZqVB2lk5s0p4Ft+iKH9 RHCoiu9E/mnZBQdUrUsMLHUIZzWLHHRxhRFBjw72ynt196kl62+XGq8kTFabi8SpWF8B+cvQTgdgv 1RyYFEzzWNCrwgGqWgXyPTXLplcfszq6nVKMEWBd4dPpIc4RAY49p6fzf1NowgjggxACMUBudkJFA 48TDtuVRZC3N6G+sC3EPZnhCRnvH0CmjAmszu7ubZ0jg2XyHEd8xmfgQzHbyt85WFP3IIHz7ty7DU 3mTRPykPOS/JMw==; Received: from [193.50.110.182] (port=59358 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU3Oc-0005qz-32; Tue, 15 Mar 2022 05:23:14 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#54393: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests References: <20220314215015.24435-1-ludo@gnu.org> Date: Tue, 15 Mar 2022 10:23:11 +0100 In-Reply-To: (zimoun's message of "Tue, 15 Mar 2022 10:00:55 +0100") Message-ID: <87czinmuww.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 Cc: 54393@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi zimoun, zimoun skribis: > On Mon, 14 Mar 2022 at 22:53, Ludovic Court=C3=A8s wrote: > >> $ guix shell a b c d --transform=3Dwhatever=3Delse >> [env]$ guix package --export-manifest -p $GUIX_ENVIRONMENT >> >> I figured that instead of documenting this, we might as well provide >> a command that does it in one go: >> >> guix manifest a b c d --transform=3Dwhatever=3Delse > manifest.scm > >>>From my opinion, a complete subcommand for only one use case does not > seem the right thing. Instead, IMHO, it would be better to have an > extension for that. > > Because once we introduce a subcommand, it is hard to change (see > 'guix environment') and since Guix provides this great extension > mechanism, I think it is the path for this kind of niche use cases: > start with an extension and depending on the "popularity" and interest > then upstream. > > Well, if you think this feature is great to have in Guix proper, > personally I would find more coherent: > > guix package --create-manifest a b c --transform=3Dwhatever=3Delse > > manifest.scm OTOH, sub-commands as just as cheap (and as expensive!) as command-line options. That is, one way or another, we=E2=80=99ll have to maintain the t= hing, whether it=E2=80=99s called =E2=80=98--create-manifest=E2=80=99 or =E2=80= =98manifest=E2=80=99. To me, the argument in favor of the sub-command is that that it=E2=80=99s m= ore discoverable, clearer, and easier to use. A user who has a =E2=80=98guix s= hell=E2=80=99 command line can replace =E2=80=98shell=E2=80=99 by =E2=80=98manifest=E2=80= =99 and get their manifest. Thinking about it, another option would be to add an =E2=80=98--export-mani= fest=E2=80=99 option to =E2=80=98guix shell=E2=80=99 instead. Thoughts? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 15 05:28:03 2022 Received: (at 54393) by debbugs.gnu.org; 15 Mar 2022 09:28:03 +0000 Received: from localhost ([127.0.0.1]:47572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU3TH-0007oD-4e for submit@debbugs.gnu.org; Tue, 15 Mar 2022 05:28:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU3TG-0007nl-8a for 54393@debbugs.gnu.org; Tue, 15 Mar 2022 05:28:02 -0400 Received: from [2001:470:142:3::e] (port=33254 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU3T9-0003jV-Gd; Tue, 15 Mar 2022 05:27:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=oB6R0gt5gf41cRkZ+x8E4ss/dKLX2N3EgQhYeSfBNgM=; b=Vo5tnm42X625YzDUMndn UOFu3CQpraZJsHMflYj1SssCgovcZTAcGdfS5Em1O8CYzR641MOL9LW1METK+lPxKM24Hc5fgxyXQ k1+c0QegAj9tfTiQUX9mDmkGgcB8GQbORUuXfmtkNho+iToUFMlnJ2olgjMM5fErAGOdibkKvGbVN NZLjhmkj0AvEHgXsKKTP/7OG2F5q7W/PHxkKCVxs9kBWCS+zGRc7Myl6Y76XJBl23kKvMXEZlpxTo TgAY47Y5Bk1IVEqZHryzRRgh11gOAWlBru70WQ/8nTWrZOoSwQ1guKs2TKkq8kV/LH/z89GuTVKUo UWZOEiDzsD2CPg==; Received: from [193.50.110.182] (port=59360 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU3T8-0006bv-Uz; Tue, 15 Mar 2022 05:27:55 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: bug#54393: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests References: <20220314215015.24435-1-ludo@gnu.org> Date: Tue, 15 Mar 2022 10:27:53 +0100 In-Reply-To: (Liliana Marie Prikler's message of "Tue, 15 Mar 2022 08:18:57 +0100") Message-ID: <874k3zmup2.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 Cc: 54393@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Liliana Marie Prikler skribis: > The current implementation is missing the most important feature, which > would be =E2=80=98guix manifest --profile $GUIX_PROFILE=E2=80=99 :) True, we could add =E2=80=98-p=E2=80=99 and make it equivalent to =E2=80=98= guix package --export-manifest=E2=80=99. I think lack of =E2=80=98-p=E2=80=99 is not a showstopper though since =E2= =80=98guix package --export-manifest=E2=80=99 remains available. [...] > Furthermore, one issue I have with both the existing and proposed > approaches is that both mandate the specification style, The reasons for the specification style are: 1. That it=E2=80=99s easier to implement reliably, since you just need to= rely on package specs. 2. The resulting code is future-proof: if packages are moved from one module to another, or if their variables are renamed, it still works. 3. It=E2=80=99s a one-to-one mapping compared to the command line, which hopefully makes it clearer. However, =E2=80=98manifest->code=E2=80=99 existed before this patch series,= so I think it=E2=80=99s beyond the scope of this review. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 15 05:53:57 2022 Received: (at 54393) by debbugs.gnu.org; 15 Mar 2022 09:53:57 +0000 Received: from localhost ([127.0.0.1]:47600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU3sF-00006B-43 for submit@debbugs.gnu.org; Tue, 15 Mar 2022 05:53:57 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:34770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU3sC-000061-GZ for 54393@debbugs.gnu.org; Tue, 15 Mar 2022 05:53:49 -0400 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4KHpdN6jTgz3wGM; Tue, 15 Mar 2022 10:53:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1647338025; bh=szRx74vNpYFATDRGx6IS8L/meTnO/V2NzHXnNPBIrNE=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=RbfC7GF4qRC9q4QjYiVpV2fy9rX0n4xIdPFeUwQ4LRAwpgYpKWvDfv4MDX3/VQ3Ji YOXHhj9sN1xQvfp1eZDHlRBwoWgWJxPTg4AGc60B46Ez1oPqlOnO6zzOXXTlkMd4+g 4ySRjqldBVYBPFc6Vnyn4GqashXnRLE5iH8RmX0Q= Message-ID: Subject: Re: bug#54393: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests From: Liliana Marie Prikler To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Tue, 15 Mar 2022 10:53:44 +0100 In-Reply-To: <874k3zmup2.fsf_-_@gnu.org> References: <20220314215015.24435-1-ludo@gnu.org> <874k3zmup2.fsf_-_@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 Cc: 54393@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Am Dienstag, dem 15.03.2022 um 10:27 +0100 schrieb Ludovic Courtès: > Hi, > > Liliana Marie Prikler skribis: > > > The current implementation is missing the most important feature, > > which would be ‘guix manifest --profile $GUIX_PROFILE’ :) > > True, we could add ‘-p’ and make it equivalent to ‘guix package > --export-manifest’. > > I think lack of ‘-p’ is not a showstopper though since ‘guix package > --export-manifest’ remains available. True, but implementing it as part of ‘guix manifest’ would open up a way to easily declare a manifest for “merged” profiles. These could be applied in integration testing, e.g. you could merge multiple profiles together and watch for intended and unintended side effects, for instance regarding search paths. > > Furthermore, one issue I have with both the existing and proposed > > approaches is that both mandate the specification style, > > The reasons for the specification style are: > >   1. That it’s easier to implement reliably, since you just need to > rely on package specs. > >   2. The resulting code is future-proof: if packages are moved from > one module to another, or if their variables are renamed, it > still works. > >   3. It’s a one-to-one mapping compared to the command line, which >      hopefully makes it clearer. > > However, ‘manifest->code’ existed before this patch series, so I > think it’s beyond the scope of this review. It's true that it's out of scope, but I don't want this to be forgotten. I can see the rationale of specification style for user profiles, but for version-controlled package development manifests, there are different incentives in play. For example, you might want to make sure that a package uses gcc-toolchain from (gnu packages commencement) and not (google monorepo cc). Cheers From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 15 06:21:26 2022 Received: (at 54393) by debbugs.gnu.org; 15 Mar 2022 10:21:26 +0000 Received: from localhost ([127.0.0.1]:47624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU4Iw-0000sM-4w for submit@debbugs.gnu.org; Tue, 15 Mar 2022 06:21:26 -0400 Received: from mail-il1-f172.google.com ([209.85.166.172]:40832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU4Iu-0000s9-3t for 54393@debbugs.gnu.org; Tue, 15 Mar 2022 06:21:24 -0400 Received: by mail-il1-f172.google.com with SMTP id h21so5031393ila.7 for <54393@debbugs.gnu.org>; Tue, 15 Mar 2022 03:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=qPlCU0ydoMZ2pja9VwP96TbqCxtBh78xLCuXLplCgAQ=; b=gxnMp7li1o2qsaLf5Qwj7dcAMMVkOjv7dYZuIj7LDE8Jp/LzVP0paN3c2qqccREDLF dh0HDRJcN9essDweHlpWqxA2KlHowm4pc5GqurObPr3+Qatl6qz4bTT7idmIjzgSvhTc OtxCN8Hdai7QtFV90syq6cxn5pSh9tAhRl+rAyjD9fjZKHlgjgEDmZyFMUvfu3o7Qxao fQHbjDpWv3NebO+wzo7QQ8Wta66oHVlIRWpeBbXfdhPVDAUGV5mToK9+y++3VkQH6Cpm bCbHYNRz2JZjRtc6szRy2qztYtndA9wxFEQgQnXHDTA7OPd6nj/Sgf24UHmN4Dp1+hdQ mRjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=qPlCU0ydoMZ2pja9VwP96TbqCxtBh78xLCuXLplCgAQ=; b=cD1fZ1X0yUSfyAOdYW6iy5ufgsRZo50lfVGtBSQDfahWJ35mCSrGmbNqw/65/cYmAF wrupu/d4PpesRdeZ73h1KMIgUjK3uIbLIgZ1Jf38z8/DSaoDFSxsvvrKkahvxh8qnxL/ kK7eseGcr4jWLrcAUEBGdSPNaIBdpTRV9hG3UGSkNzSnIjvMXY3E8F0ZD0wydhTzM7VE L4uTsVCO4dWobZIfdpwUqeZTzJ4Fvcee77OJCc22Vt7f/2WkYUR89RPUyc4OCs/NbZ8P ZeO5ekWJp9gxsAV9NhGu6SOfMh1iXL1WFzXOJ9j92lSZxfwhW/FaRg8dRw6mFnovZymk M4Xw== X-Gm-Message-State: AOAM533LuCVMiBFM7EM2N1tRVgKPWAkcmYDkfxCXPzouOugzmqcKGs4z UfGgcGA6vpruMjvbzZYHO/MzVGsArA1F0jSWbYddGIeP X-Google-Smtp-Source: ABdhPJyMyUDPw9i75c7+RYJTsMU3V/WSozWl68SgY5hGhuWBNa5fTtaTgzdab251uxgHQrjo8YCS/dqQAKGmpOGseAc= X-Received: by 2002:a05:6e02:d49:b0:2c7:8ae9:baea with SMTP id h9-20020a056e020d4900b002c78ae9baeamr11318189ilj.202.1647339678353; Tue, 15 Mar 2022 03:21:18 -0700 (PDT) MIME-Version: 1.0 References: <20220314215015.24435-1-ludo@gnu.org> <87czinmuww.fsf_-_@gnu.org> In-Reply-To: <87czinmuww.fsf_-_@gnu.org> From: zimoun Date: Tue, 15 Mar 2022 11:21:07 +0100 Message-ID: Subject: Re: bug#54393: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54393 Cc: 54393@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Tue, 15 Mar 2022 at 10:23, Ludovic Court=C3=A8s wrote: > OTOH, sub-commands as just as cheap (and as expensive!) as command-line > options. That is, one way or another, we=E2=80=99ll have to maintain the= thing, > whether it=E2=80=99s called =E2=80=98--create-manifest=E2=80=99 or =E2=80= =98manifest=E2=80=99. I agree... > To me, the argument in favor of the sub-command is that that it=E2=80=99s= more > discoverable, clearer, and easier to use. A user who has a =E2=80=98guix= shell=E2=80=99 > command line can replace =E2=80=98shell=E2=80=99 by =E2=80=98manifest=E2= =80=99 and get their manifest. ...but I am not convinced. :-) For instance, about discoverability, assuming "guix install / remove" would not be an alias of "guix package", then I would go va "guix help" then "guix install --help" then probably via "guix help" again, then "guix remove --help" etc. An extreme counter-example to your "clearer" point about subcommands is Git: I do not consider such many subcommands more discoverable because it gives the impression of a scattered mess. Subcommands provide a thematic hierarchy. For sure, it is a balance. :-) Because Guix is doing many many things, it is hard for people to understand, IMHO, therefore a sub-command hierarchy helps for catching the Guix features... I digress. :-) Well, my point is, for example, the logic of "guix system" then "guix system <--options>" appears to me easier to grasp and discover. Idem with "guix import". I think "guix vm" or "guix image" would not ease the discoverability. What is unfortunate with "guix package" is that and <--option> are both using dash-dash. Another story. :-) I am not convinced that promoting a niche use-case would be a good idea. For what my opinion is worth. Well, I trust your experience if you think it is better. > Thinking about it, another option would be to add an =E2=80=98--export-ma= nifest=E2=80=99 > option to =E2=80=98guix shell=E2=80=99 instead. Thinking about it, it would be the most coherent from my point of view. And idem for --export-channels, no? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 15 11:17:31 2022 Received: (at 54393) by debbugs.gnu.org; 15 Mar 2022 15:17:31 +0000 Received: from localhost ([127.0.0.1]:49339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU8vT-0007wF-Lv for submit@debbugs.gnu.org; Tue, 15 Mar 2022 11:17:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU8vR-0007w1-Jr for 54393@debbugs.gnu.org; Tue, 15 Mar 2022 11:17:30 -0400 Received: from [2001:470:142:3::e] (port=39704 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU8vL-0007MK-DJ; Tue, 15 Mar 2022 11:17:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=/lU71nSOZtQlSj/YosYzeGCse2qTjeRoppUeUAM6kl4=; b=Vumiiv/vkUXRp7wLjYzF p9zt3I+Zl0wpwq8KZUp0zR7eNb7EGG8sliHDpFRLOMasjsGP1XSjKo5JH/L2IudnUvtabzcPgnosv CNOt4He9lRMF3BuF1X9PkCNnDLyV3hzpueqFwl+ZCiPEnAt2Q9t0xVvX/VUNd5WRTBaVJH7aq0inl z9pcP2CrlKl9fnQe0YGnAMYYHcs/8f8v6XKPSV7YVUY43kNy1mSojfOJLEZPQD/iN9g78qEuSHBCn 9xI4dXY47BOES3WGKYuHAWRBY9Twb+01IrjjGxWP2SPbERZ4pEpyNkaR3pA5gpLGNYPZjKe8TqpJk qvqRiJnY+zuoTA==; Received: from [193.50.110.182] (port=59946 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU8vK-0004hd-Nz; Tue, 15 Mar 2022 11:17:23 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: bug#54393: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests References: <20220314215015.24435-1-ludo@gnu.org> <874k3zmup2.fsf_-_@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Vent=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 15 Mar 2022 16:17:20 +0100 In-Reply-To: (Liliana Marie Prikler's message of "Tue, 15 Mar 2022 10:53:44 +0100") Message-ID: <87bky7jldr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 Cc: 54393@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Liliana Marie Prikler skribis: > Am Dienstag, dem 15.03.2022 um 10:27 +0100 schrieb Ludovic Court=C3=A8s: >> Hi, >>=20 >> Liliana Marie Prikler skribis: >>=20 >> > The current implementation is missing the most important feature, >> > which would be =E2=80=98guix manifest --profile $GUIX_PROFILE=E2=80=99= :) >>=20 >> True, we could add =E2=80=98-p=E2=80=99 and make it equivalent to =E2=80= =98guix package >> --export-manifest=E2=80=99. >>=20 >> I think lack of =E2=80=98-p=E2=80=99 is not a showstopper though since = =E2=80=98guix package >> --export-manifest=E2=80=99 remains available. > True, but [...] What I meant is that I agree this is a useful addition, though one that could possibly come after. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 15 12:50:26 2022 Received: (at 54393) by debbugs.gnu.org; 15 Mar 2022 16:50:26 +0000 Received: from localhost ([127.0.0.1]:49471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUANN-0004M5-Mh for submit@debbugs.gnu.org; Tue, 15 Mar 2022 12:50:26 -0400 Received: from mail-pf1-f169.google.com ([209.85.210.169]:36584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUANL-0004Ln-Tc for 54393@debbugs.gnu.org; Tue, 15 Mar 2022 12:50:24 -0400 Received: by mail-pf1-f169.google.com with SMTP id z16so20663549pfh.3 for <54393@debbugs.gnu.org>; Tue, 15 Mar 2022 09:50:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greghogan-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DaqRAqJWwuzi72c98aZkpdgnqtGC59OD4VfhSX4DqPk=; b=frzHrkJkroI8FyjFyOemG38wRpFwb1b7jWqgaX+bXzFOY1pf8ZQ6X8rR9wZ2E+ysPM hygIxywSOhwcqf+yUYfnuNCuVVc5TJMTaB3A+KAIKdKNhktnP+occQAWGdFbG+mvj1Q2 9acTlViP8mzY8BeFmwO9Xgq64saOGpZvcnEGazklgqE9xfRE9HgOE6wQQNtyGjukXanH MAHLxUvUbcI4MmrSBwHJLo2oIl29OwOfg73S4wI8RoV1h2PG33OBnk2Tszb2Ju1jcBZd s/E/wMvUucgRXh8BZCwO/mNadVzWIS7/N+0XcpMt+xSs3v7V21fsyWiY/pxjKKt7qE7R eoTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DaqRAqJWwuzi72c98aZkpdgnqtGC59OD4VfhSX4DqPk=; b=O0QB8GoOqrrJfLVBqt95jhaHEdNHJ6GXW4MQsxtzkY+7tCtGuBzSNbZdYIHU8Kt/Zv cmkrPQoyitedSmdOq7QLpq6ltnSnPKESEa92S6Y/CHLsQDo2aRt2tqmDX4c5wmLkgus9 J8tJpbNN0nWYPIDkyP/Bqb7wGJHYLiAdPAv2rMiZM0iQHd2Uqkm9HUsqTqmWocQhUzWe 5zfRTGMsiF2YLInJarGoI8HqTr26VOo8aNfmqjp+3Imsi3VnhzM4Q08C1L0g+Aoabsyx sJ7s643XVfrC2U/ylW1tKIg8D7/tUsCFgXTtlKlJ9ZBZRFRPAseL3wMT/Bu73MYN9zL5 +mEQ== X-Gm-Message-State: AOAM530MsvT8JvS11h83CjCCvInCkwC+sPOYQYF5yE2dG/Tbf+sdluiU +3Mb9OWnWONjhpXhRvEvITgz2LpIDNc3oYGUi8ds22PSg5eKOQ== X-Google-Smtp-Source: ABdhPJwhSb5F56GoGma+9XbvHL+sP/Ye2RLLj/ajNLEsFyhq5kRyEA75sSo28hs5SpFwEd0vqohGdGZ+/zBtayyVXLY= X-Received: by 2002:a65:5941:0:b0:375:9bfd:473d with SMTP id g1-20020a655941000000b003759bfd473dmr24650340pgu.348.1647363017862; Tue, 15 Mar 2022 09:50:17 -0700 (PDT) MIME-Version: 1.0 References: <20220314215015.24435-1-ludo@gnu.org> In-Reply-To: <20220314215015.24435-1-ludo@gnu.org> From: Greg Hogan Date: Tue, 15 Mar 2022 12:50:06 -0400 Message-ID: Subject: Re: [bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: multipart/alternative; boundary="0000000000007f080b05da4497fd" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54393 Cc: 54393@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000007f080b05da4497fd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 14, 2022 at 5:53 PM Ludovic Court=C3=A8s wrote: > Next up: adding a =E2=80=9CWriting Manifests=E2=80=9D section. > Ludo', I would find this quite helpful. The current "basic setup with manifests" only documents the trivial case. It would be quite nice to document best practices for custom UTF-8 profiles, system-dependent inclusion (should we silently skip packages on unsupported systems?), and updating package versions, inputs, and/or toolchain. And for the latter, what are the limits of the manifest as compared with cloning, modifying, building, and executing with "./pre-inst-env guix ..." (which loses reproducibility)? Some background on that last thought: as Guix grows it becomes increasingly difficult to upgrade popular dependencies. I looked at upgrading 'fmt' and there was one dependent package that could not be upgraded, though not a package I needed. I'd like to be able to define an upgraded version of 'fmt' or 'boost' in my manifest and have it apply to the entire installation (profile or pack) rather than needing to modify specific packages with a with-input. Same for the toolchain, I think it would be nice to simply say "create this installation using gcc-toolchain" (the user default @11 rather than the system default @10) without needing any package transformations. And could one specify global build flags such as "-march=3Dnative"? Can one reach down into and modify commencement packages? Greg --0000000000007f080b05da4497fd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Mar 14, 2022 at 5:53 PM Ludovic C= ourt=C3=A8s <ludo@gnu.org> wrote:=
Next up: adding a =E2=80=9CWriting Manifests=E2=80=9D section.<= br>

Ludo',

I w= ould find this quite helpful. The current "basic setup with manifests&= quot; only documents the trivial case. It would be quite nice to document b= est practices for custom UTF-8 profiles, system-dependent inclusion (should= we silently skip packages on unsupported systems?), and updating package v= ersions, inputs, and/or toolchain. And for the latter, what are the limits = of the manifest as compared with cloning, modifying, building, and executin= g with "./pre-inst-env guix ..." (which loses reproducibility)?

Some background on that last thought: as Guix grows= it becomes increasingly=C2=A0difficult to upgrade popular dependencies. I = looked at upgrading 'fmt' and there was one dependent package that = could not be upgraded,=C2=A0though not a package I needed. I'd like to = be able to define an upgraded version of 'fmt' or 'boost' i= n my manifest and have it apply to the entire installation (profile or pack= ) rather than needing to modify specific packages with a with-input. Same f= or the toolchain, I think it would be nice to simply say "create this = installation using gcc-toolchain" (the user default=C2=A0@11 rather th= an the system default=C2=A0@10) without needing any package transformations= . And could one specify global build flags such as "-march=3Dnative&qu= ot;? Can one reach down into and modify commencement packages?
Greg
--0000000000007f080b05da4497fd-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 15 15:39:02 2022 Received: (at 54393) by debbugs.gnu.org; 15 Mar 2022 19:39:02 +0000 Received: from localhost ([127.0.0.1]:49669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUD0X-0000UG-Mc for submit@debbugs.gnu.org; Tue, 15 Mar 2022 15:39:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUD0V-0000Tx-Jh for 54393@debbugs.gnu.org; Tue, 15 Mar 2022 15:38:59 -0400 Received: from [2001:470:142:3::e] (port=44924 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUD0Q-00072z-C5; Tue, 15 Mar 2022 15:38:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=7nvcmEp67JWtOp+6hpk27lRC3Wx5avaLr8caQTGqimc=; b=qY5vcGPiI9UHRCu7eC+d lTLBvJ+ogs+mkiKeEBW9U5hkqlGqehV+Gff9k4VSRV8n/o68+e7ck4oc0GY/LdHh5UGydrxbuBT5E YMh+BQf0NSP1GXDnsspb29jO0qlM8DdHZkYzDt655ultfJIPXScEj7plXtKtXsE5ZnlKezsXAoQ/f UPeOfzz/X6wWju+oF2TzFCHzpAoiK60khW3J3HC1+yDDbcacU63YHsDmd7nEeJe/52SrgaNv2OGiF HQHEaPu+V/3OiS7SRz0DiL3FftpC0IOuIuGAJrFZVpK4yE0SHtf7MS2t98zZhUqnsl2cebQjI7oBW z3SjWg22FksMAw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:65338 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUD0P-0005Qn-T2; Tue, 15 Mar 2022 15:38:54 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#54393: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests References: <20220314215015.24435-1-ludo@gnu.org> <87czinmuww.fsf_-_@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Vent=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 15 Mar 2022 20:38:50 +0100 In-Reply-To: (zimoun's message of "Tue, 15 Mar 2022 11:21:07 +0100") Message-ID: <87r173huph.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 Cc: 54393@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, zimoun skribis: > Well, my point is, for example, the logic of "guix system" then "guix > system <--options>" appears to me easier to grasp and > discover. Idem with "guix import". I think "guix vm" or "guix image" > would not ease the discoverability. What is unfortunate with "guix > package" is that and <--option> are both using dash-dash. > Another story. :-) I agree, =E2=80=98guix system=E2=80=99 and =E2=80=98guix import=E2=80=99 ar= e pretty logical, consistent, and discoverable; =E2=80=98guix package=E2=80=99 less so=E2=80=A6 > I am not convinced that promoting a niche use-case would be a good > idea. For what my opinion is worth. Well, I trust your experience if > you think it is better. There have been proposals in the past to follow a similar three-level command scheme, such as =E2=80=98guix profile install=E2=80=99, etc. While= this would be more =E2=80=9Clogical=E2=80=9D in terms of categorization, it=E2=80=99s = also less intuitive, requires more typing, and overall may well be less ergonomic than shorthands like =E2=80=98guix install=E2=80=99 or =E2=80=98guix edit=E2=80= =99. For =E2=80=98guix install=E2=80=99, we were guided by the rule of least sur= prise. But it=E2=80=99s true that in the case of =E2=80=98guix manifest=E2=80=99, it= =E2=80=99s less obvious because other package managers for instance don=E2=80=99t have such a command. >> Thinking about it, another option would be to add an =E2=80=98--export-m= anifest=E2=80=99 >> option to =E2=80=98guix shell=E2=80=99 instead. > > Thinking about it, it would be the most coherent from my point of > view. And idem for --export-channels, no? For =E2=80=98guix shell=E2=80=99 that would be strictly equivalent to =E2= =80=98guix describe=E2=80=99. I=E2=80=99m not convinced having =E2=80=98--export-channels=E2=80=99 would = bring anything. Thanks for your feedback! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 16 05:58:29 2022 Received: (at 54393) by debbugs.gnu.org; 16 Mar 2022 09:58:29 +0000 Received: from localhost ([127.0.0.1]:50268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUQQH-0001FP-Il for submit@debbugs.gnu.org; Wed, 16 Mar 2022 05:58:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUQQG-0001FA-BL for 54393@debbugs.gnu.org; Wed, 16 Mar 2022 05:58:28 -0400 Received: from [2001:470:142:3::e] (port=56632 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUQQA-0008UR-Pm; Wed, 16 Mar 2022 05:58:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=hCbhJSkV+DRv+ox6o75rNxRhic0lsZ58ccDPl2qT4sg=; b=Lx9Uq3dhmcqYCwyYT5KK epHM/CTlHqwfTEv9TZuiKfwLanXcX4cu2VXTH+BrLPFKqM12fC3LNmYYsjVNkxhNrVAappW4JnNHe l8WXtyvdd5K9pzljn7WhVqpc2CQEihgHIdmx2lCXnvrcvebfytwI+ciidhvyKStOOzWPl6Rrf7VEt tdyXSW1r3anK2H3cZOfWLtCoxdKlNwsUrAAqWSxWjsyCqANi+StQryOb3RU9k8fVAfgrlTILjLlQ2 uj/oyX6tINPD6ZoMPYFJuJCmgRYziVetuqdbrnzSMOM4KJFrEBjQD2ClMmgeCN9aljSTl9VvciDbp JnO3HfYBMxquBQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:60514 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUQQ6-0003aM-W2; Wed, 16 Mar 2022 05:58:20 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Greg Hogan Subject: Re: [bug#54393] [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests References: <20220314215015.24435-1-ludo@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 =?utf-8?Q?Vent=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 16 Mar 2022 10:58:16 +0100 In-Reply-To: (Greg Hogan's message of "Tue, 15 Mar 2022 12:50:06 -0400") Message-ID: <87sfrigqx3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 Cc: 54393@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Greg Hogan skribis: > I would find this quite helpful. The current "basic setup with manifests" > only documents the trivial case. It would be quite nice to document best > practices for custom UTF-8 profiles, system-dependent inclusion (should we > silently skip packages on unsupported systems?), and updating package > versions, inputs, and/or toolchain. OK. > And for the latter, what are the limits of the manifest as compared > with cloning, modifying, building, and executing with "./pre-inst-env > guix ..." (which loses reproducibility)? > > Some background on that last thought: as Guix grows it becomes > increasingly difficult to upgrade popular dependencies. I looked at > upgrading 'fmt' and there was one dependent package that could not be > upgraded, though not a package I needed. I'd like to be able to define an > upgraded version of 'fmt' or 'boost' in my manifest and have it apply to > the entire installation (profile or pack) rather than needing to modify > specific packages with a with-input. Same for the toolchain, I think it > would be nice to simply say "create this installation using gcc-toolchain" > (the user default @11 rather than the system default @10) without needing > any package transformations. And could one specify global build flags such > as "-march=3Dnative"? Can one reach down into and modify commencement > packages? This=E2=80=94switching compiler tool chains and tuning for a CPU=E2=80=94is= available as package transformations: https://guix.gnu.org/manual/devel/en/html_node/Package-Transformation-Opt= ions.html You can take advantage of those in your manifest using =E2=80=98option->transformations=E2=80=99: https://guix.gnu.org/manual/devel/en/html_node/Defining-Package-Variants.= html#index-options_002d_003etransformation The tentative =E2=80=98guix manifest=E2=80=99 and =E2=80=98guix package --e= xport-manifest=E2=80=99 create that code snippet for you, as in this example: https://issues.guix.gnu.org/54393#2-lineno134 That=E2=80=99s the kind of thing I=E2=80=99d like to show in the =E2=80=9CW= riting Manifests=E2=80=9D section. Tuning and switching tool chains will always happen through package transformations. In Guix, things have to be specified explicitly; there=E2=80=99s no way you can stealthily change the meaning of the depende= ncy graph without changing it=E2=80=94unlike other tools in this area. But tha= t=E2=80=99s a strength! Now, we have to make it so that such changes can be done conveniently, and package transformation options were introduced in this spirit. I hope that makes sense! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 07:10:42 2022 Received: (at 54393) by debbugs.gnu.org; 31 Mar 2022 11:10:42 +0000 Received: from localhost ([127.0.0.1]:38018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZshB-00029q-Pm for submit@debbugs.gnu.org; Thu, 31 Mar 2022 07:10:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZsh9-00029W-Qn for 54393@debbugs.gnu.org; Thu, 31 Mar 2022 07:10:28 -0400 Received: from [2001:470:142:3::e] (port=54754 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZsh0-0003As-Fc; Thu, 31 Mar 2022 07:10:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=UnX/f/npe2jrnWpzxE1xCApRW4evuVDDsHpuKcxiCog=; b=H1iYXogn4KfmVoKqshUA p7nUgEh/QfAC1qIaQMz45Iw0WJ8q2SXLCqk0voU7V0NBUMEp15bUIhCDAMwKUHaY3Mp2agD9K2+5c lNsSTQpq1u7U2rbXbajIE+k78sgdlfAr6rcYJD3GvsYHp3HyNFIfcXOBPofBoa2PeHQCCIoSM6mlP lsq6jPUC++Xm4Wad9kJgy4ShiA3OzXkuy/1oW7BJthebcqbGUaY8BkUX04y0LJIKfICZPRgM8XQhl t6TjGY4yoMOe9/EYvxG0SSsJ2aEyKBT50CeTNDBQ96rmXbWF1tixvoALqeEey4V5Dg4QCgTEe1vEg hwC3UJJ7ZazNVQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:61384 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZsgu-0002dj-Lx; Thu, 31 Mar 2022 07:10:16 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 54393@debbugs.gnu.org Subject: [PATCH v2 1/3] packages: Add 'package-unique-version-prefix'. Date: Thu, 31 Mar 2022 13:09:55 +0200 Message-Id: <20220331110957.31829-1-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <87r173huph.fsf@gnu.org> References: <87r173huph.fsf@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages.scm (package-unique-version-prefix): New procedure. * guix/scripts/package.scm (manifest-entry-version-prefix): Use it. * tests/packages.scm ("package-unique-version-prefix, gcc@8") ("package-unique-version-prefix, grep"): New tests. --- gnu/packages.scm | 21 +++++++++++++++++++++ guix/scripts/package.scm | 20 ++------------------ tests/packages.scm | 13 +++++++++++++ 3 files changed, 36 insertions(+), 18 deletions(-) diff --git a/gnu/packages.scm b/gnu/packages.scm index 65ab7a7c1e..2ba838fd0a 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -66,6 +66,8 @@ (define-module (gnu packages) specification->location specifications->manifest + package-unique-version-prefix + generate-package-cache)) ;;; Commentary: @@ -559,3 +561,22 @@ (define (specifications->manifest specs) ;; fiddle with multiple-value returns. (packages->manifest (map (compose list specification->package+output) specs))) + +(define (package-unique-version-prefix name version) + "Search among all the versions of package NAME that are available, and +return the shortest unambiguous version prefix to designate VERSION. If only +one version of the package is available, return the empty string." + (match (map package-version (find-packages-by-name name)) + ((_) + ;; A single version of NAME is available, so do not specify the version + ;; number, even if the available version doesn't match VERSION. + "") + (versions + ;; If VERSION is the latest version, don't specify any version. + ;; Otherwise return the shortest unique version prefix. Note that this + ;; is based on the currently available packages so the result may vary + ;; over time. + (if (every (cut version>? version <>) + (delete version versions)) + "" + (version-unique-prefix version versions))))) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 9699c70c6d..22ee8a2485 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -334,24 +334,8 @@ (define (manifest-entry-version-prefix entry) "Search among all the versions of ENTRY's package that are available, and return the shortest unambiguous version prefix for this package. If only one version of ENTRY's package is available, return the empty string." - (let ((name (manifest-entry-name entry))) - (match (map package-version (find-packages-by-name name)) - ((_) - ;; A single version of NAME is available, so do not specify the - ;; version number, even if the available version doesn't match ENTRY. - "") - (versions - ;; If ENTRY uses the latest version, don't specify any version. - ;; Otherwise return the shortest unique version prefix. Note that - ;; this is based on the currently available packages, which could - ;; differ from the packages available in the revision that was used - ;; to build MANIFEST. - (let ((current (manifest-entry-version entry))) - (if (every (cut version>? current <>) - (delete current versions)) - "" - (version-unique-prefix (manifest-entry-version entry) - versions))))))) + (package-unique-version-prefix (manifest-entry-name entry) + (manifest-entry-version entry))) (define* (export-manifest manifest #:optional (port (current-output-port))) diff --git a/tests/packages.scm b/tests/packages.scm index 710eace6dc..6cbc34ba0b 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -1923,6 +1923,19 @@ (define (list->set* lst) (package-location (specification->package "guile@2")) (specification->location "guile@2")) +(test-equal "package-unique-version-prefix, gcc@8" + "8" + (let ((gcc (specification->package "gcc-toolchain@8"))) + (package-unique-version-prefix (package-name gcc) + (package-version gcc)))) + +(test-equal "package-unique-version-prefix, grep" + "" + (let ((grep (specification->package "grep"))) + (package-unique-version-prefix (package-name grep) + (package-version grep)))) + + (test-eq "this-package-input, exists" hello (package-arguments -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 07:10:43 2022 Received: (at 54393) by debbugs.gnu.org; 31 Mar 2022 11:10:43 +0000 Received: from localhost ([127.0.0.1]:38022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZshO-0002BM-J2 for submit@debbugs.gnu.org; Thu, 31 Mar 2022 07:10:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZsh9-00029X-Qu for 54393@debbugs.gnu.org; Thu, 31 Mar 2022 07:10:29 -0400 Received: from [2001:470:142:3::e] (port=54756 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZsh1-0003Ax-2O; Thu, 31 Mar 2022 07:10:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=ftje0oZhs3dbyxdssEuCqh3SAJIOifxIjLCBnxr9k2M=; b=W8l0/GAq1xbVKiXa5DP0 ZLKBjnZ93jA1yLRBs7qH8EEybaeGlX8bFDrVEhb5hfTE2FPhbEpzoIXPBmLGVQTDEKWO6pHMOQpis yu39Xm6fCLA57XLR4XeQ6MU9sGhoaAh1+wswZJgpUFO6tdxYaFK4ky62ByxxedJ2V6rCg4rkx/fGj 1CrVoOBM436eNe4PAG5OouG1/c4QOzFE8LyMT46Txmz66nV/9D0PdNpxNRYDuV5r37Wp2b2ao8AZF ah0dAVQLXypwAZM6L6JnM+KlLoGozV5S59CJCuAFezB/9pyQ/CFOFKhk/1jEpcIn1gV7w+Q8b+YDn PFCX+vWG1ompzw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:61384 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZsh0-0002dj-Js; Thu, 31 Mar 2022 07:10:18 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 54393@debbugs.gnu.org Subject: [PATCH v2 2/3] environment: Export 'load-manifest'. Date: Thu, 31 Mar 2022 13:09:56 +0200 Message-Id: <20220331110957.31829-2-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220331110957.31829-1-ludo@gnu.org> References: <87r173huph.fsf@gnu.org> <20220331110957.31829-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/scripts/environment.scm (load-manifest): New procedure. (options/resolve-packages): Use it. --- guix/scripts/environment.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index ec071402f4..07b54cd89b 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -56,6 +56,7 @@ (define-module (guix scripts environment) #:use-module (srfi srfi-37) #:use-module (srfi srfi-98) #:export (assert-container-features + load-manifest guix-environment guix-environment* show-environment-options-help @@ -285,6 +286,11 @@ (define same-key? (cut eq? key <>)) (_ memo))) '() alist)) +(define (load-manifest file) ;TODO: factorize + "Load the user-profile manifest (Scheme code) from FILE and return it." + (let ((user-module (make-user-module '((guix profiles) (gnu))))) + (load* file user-module))) + (define (options/resolve-packages store opts) "Return OPTS with package specification strings replaced by manifest entries for the corresponding packages." @@ -331,8 +337,7 @@ (define (packages->outputs packages mode) (let ((module (make-user-module '()))) (packages->outputs (load* file module) mode))) (('manifest . file) - (let ((module (make-user-module '((guix profiles) (gnu))))) - (manifest-entries (load* file module)))) + (manifest-entries (load-manifest file))) (_ '())) opts) manifest-entry=?))) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 07:10:50 2022 Received: (at 54393) by debbugs.gnu.org; 31 Mar 2022 11:10:51 +0000 Received: from localhost ([127.0.0.1]:38024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZshS-0002Bn-1d for submit@debbugs.gnu.org; Thu, 31 Mar 2022 07:10:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZsh9-00029V-Oz for 54393@debbugs.gnu.org; Thu, 31 Mar 2022 07:10:32 -0400 Received: from [2001:470:142:3::e] (port=54758 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZsh2-0003B8-7Y; Thu, 31 Mar 2022 07:10:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=zMtQau/T4yno5/RcDHSy26kiWvX4+EEuHFFVjRyOOf4=; b=i6W7WBHwCkff/+6MrOro s92bLs84nfKUc6XE4zlDtXkw4EygEpVYYiUD2efE11BqVAqWWyvayyuNgjq4JWQz91RiysogndZSF cwpSkK68uNkCOZ2xKtNx+8v56VfqwZOBwzIZFZfTaeM3TOvUo5oIWuBEjU7A9dDWIBwi9QVcPZTWx fHGbMo/KHHuSNFJq95wYQr/B17UveUU+tWV9zOD387dytlOdUS+OqDAux4QhidtqlahgHk58kNx2e JF0iNiKtVCvjjcUnQWNUnSaVIw6NqGt7IMAjmntSMnjiWoBQKmSOpiAlFjOrjfBLSMIWnsQ9Z2+8n HNGcu9gehOz+zA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:61384 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZsh1-0002dj-8d; Thu, 31 Mar 2022 07:10:20 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 54393@debbugs.gnu.org Subject: [PATCH v2 3/3] shell: Add '--export-manifest'. Date: Thu, 31 Mar 2022 13:09:57 +0200 Message-Id: <20220331110957.31829-3-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220331110957.31829-1-ludo@gnu.org> References: <87r173huph.fsf@gnu.org> <20220331110957.31829-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/scripts/shell.scm (show-help, %options): Add '--export-manifest'. (manifest-entry-version-prefix, manifest->code*) (export-manifest): New procedures. (guix-shell): Honor '--export-manifest'. * tests/guix-shell-export-manifest.sh: New file. * Makefile.am (SH_TESTS): Add it. * doc/guix.texi (Invoking guix shell): Document '--export-manifest'. (Invoking guix environment): Link to it. (Invoking guix pack): Likewise. --- Makefile.am | 1 + doc/guix.texi | 57 +++++++++++++++ guix/scripts/shell.scm | 109 +++++++++++++++++++++++++++- tests/guix-shell-export-manifest.sh | 84 +++++++++++++++++++++ 4 files changed, 248 insertions(+), 3 deletions(-) create mode 100644 tests/guix-shell-export-manifest.sh diff --git a/Makefile.am b/Makefile.am index 91243f2cad..20ab7dd5f0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -572,6 +572,7 @@ SH_TESTS = \ tests/guix-environment.sh \ tests/guix-environment-container.sh \ tests/guix-shell.sh \ + tests/guix-shell-export-manifest.sh \ tests/guix-graph.sh \ tests/guix-describe.sh \ tests/guix-repl.sh \ diff --git a/doc/guix.texi b/doc/guix.texi index e8ef4286be..85a91019be 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5848,6 +5848,55 @@ This is similar to the same-named option in @command{guix package} (@pxref{profile-manifest, @option{--manifest}}) and uses the same manifest files. +See @option{--export-manifest} below on how to obtain a first manifest. + +@cindex manifest, exporting +@anchor{shell-export-manifest} +@item --export-manifest +Write to standard output a manifest suitable for @option{--manifest} +corresponding to given command-line options. + +This is a way to ``convert'' command-line arguments into a manifest. +For example, imagine you are tired of typing long lines and would like +to get a manifest equivalent to this command line: + +@example +guix shell -D guile git emacs emacs-geiser emacs-geiser-guile +@end example + +Just add @option{--export-manifest} to the command line above: + +@example +guix shell --export-manifest \ + -D guile git emacs emacs-geiser emacs-geiser-guile +@end example + +@noindent +... and you get a manifest along these lines: + +@lisp +(concatenate-manifests + (list (specifications->manifest + (list "git" + "emacs" + "emacs-geiser" + "emacs-geiser-guile")) + (package->development-manifest + (specification->package "guile")))) +@end lisp + +You can store it into a file, say @file{manifest.scm}, and from there +pass it to @command{guix shell} or indeed pretty much any @command{guix} +command: + +@example +guix shell -m manifest.scm +@end example + +Voilà, you've converted a long command line into a manifest! That +conversion process honors package transformation options (@pxref{Package +Transformation Options}) so it should be lossless. + @item --profile=@var{profile} @itemx -p @var{profile} Create an environment containing the packages installed in @var{profile}. @@ -6235,6 +6284,10 @@ This is similar to the same-named option in @command{guix package} (@pxref{profile-manifest, @option{--manifest}}) and uses the same manifest files. +@xref{shell-export-manifest, @command{guix shell --export-manifest}}, +for information on how to ``convert'' command-line options into a +manifest. + @item --ad-hoc Include all specified packages in the resulting environment, as if an @i{ad hoc} package were defined with them as inputs. This option is @@ -6693,6 +6746,10 @@ for use on machines that do not have Guix installed. Note that you can specify @emph{either} a manifest file @emph{or} a list of packages, but not both. +@xref{shell-export-manifest, @command{guix shell --export-manifest}}, +for information on how to ``convert'' command-line options into a +manifest. + @item --system=@var{system} @itemx -s @var{system} Attempt to build for @var{system}---e.g., @code{i686-linux}---instead of diff --git a/guix/scripts/shell.scm b/guix/scripts/shell.scm index 1eab05d737..5e7f454f4c 100644 --- a/guix/scripts/shell.scm +++ b/guix/scripts/shell.scm @@ -21,7 +21,8 @@ (define-module (guix scripts shell) #:use-module ((guix diagnostics) #:select (location)) #:use-module (guix scripts environment) #:autoload (guix scripts build) (show-build-options-help) - #:autoload (guix transformations) (transformation-option-key? + #:autoload (guix transformations) (options->transformation + transformation-option-key? show-transformation-options-help) #:use-module (guix scripts) #:use-module (guix packages) @@ -41,7 +42,12 @@ (define-module (guix scripts shell) #:use-module ((guix build utils) #:select (mkdir-p)) #:use-module (guix cache) #:use-module ((ice-9 ftw) #:select (scandir)) - #:autoload (gnu packages) (cache-is-authoritative?) + #:autoload (ice-9 pretty-print) (pretty-print) + #:autoload (gnu packages) (cache-is-authoritative? + package-unique-version-prefix + specification->package + specification->package+output + specifications->manifest) #:export (guix-shell)) (define (show-help) @@ -55,10 +61,13 @@ (define (show-help) -D, --development include the development inputs of the next package")) (display (G_ " -f, --file=FILE add to the environment the package FILE evaluates to")) + (display (G_ " -q inhibit loading of 'guix.scm' and 'manifest.scm'")) (display (G_ " --rebuild-cache rebuild cached environment, if any")) + (display (G_ " + --export-manifest print a manifest for the given options")) (show-environment-options-help) (newline) @@ -112,6 +121,10 @@ (define %options ;; 'wrapped-option'. (alist-delete 'ad-hoc? result))) + (option '("export-manifest") #f #f + (lambda (opt name arg result) + (alist-cons 'export-manifest? #t result))) + ;; For consistency with 'guix package', support '-f' rather than ;; '-l' like 'guix environment' does. (option '(#\f "file") #t #f @@ -380,6 +393,94 @@ (define (key->file key) (loop rest system file specs)) ((_ . rest) (loop rest system file specs))))) + +;;; +;;; Exporting a manifest. +;;; + +(define (manifest-entry-version-prefix entry) + "Search among all the versions of ENTRY's package that are available, and +return the shortest unambiguous version prefix for this package." + (package-unique-version-prefix (manifest-entry-name entry) + (manifest-entry-version entry))) + +(define (manifest->code* manifest extra-manifests) + "Like 'manifest->code', but insert a 'concatenate-manifests' call that +concatenates MANIFESTS, a list of expressions." + (if (null? (manifest-entries manifest)) + (match extra-manifests + ((one) one) + (lst `(concatenate-manifests ,@extra-manifests))) + (match (manifest->code manifest + #:entry-package-version + manifest-entry-version-prefix) + (('begin exp ... last) + `(begin + ,@exp + ,(match extra-manifests + (() last) + (_ `(concatenate-manifests + (list ,last ,@extra-manifests))))))))) + +(define (export-manifest opts port) + "Write to PORT a manifest corresponding to OPTS." + (define (manifest-lift proc) + (lambda (entry) + (match (manifest-entry-item entry) + ((? package? p) + (manifest-entry + (inherit (package->manifest-entry (proc p))) + (output (manifest-entry-output entry)))) + (_ + entry)))) + + (define (validated-spec spec) + ;; Return SPEC if it's validate package spec. + (specification->package+output spec) + spec) + + (let* ((transform (options->transformation opts)) + (specs (reverse + (filter-map (match-lambda + (('package 'ad-hoc-package spec) + (validated-spec spec)) + (_ #f)) + opts))) + (extras (reverse + (filter-map (match-lambda + (('package 'package spec) + ;; Make sure SPEC is valid. + (specification->package spec) + + ;; XXX: This is an approximation: + ;; transformation options are not applied. + `(package->development-manifest + (specification->package ,spec))) + (_ #f)) + opts))) + (manifest (concatenate-manifests + (cons (map-manifest-entries + (manifest-lift transform) + (specifications->manifest specs)) + (filter-map (match-lambda + (('manifest . file) + (load-manifest file)) + (_ #f)) + opts))))) + (display (G_ "\ +;; What follows is a \"manifest\" equivalent to the command line you gave. +;; You can store it in a file that you may then pass to any 'guix' command +;; that accepts a '--manifest' (or '-m') option.\n") + port) + (match (manifest->code* manifest extras) + (('begin exp ...) + (for-each (lambda (exp) + (newline port) + (pretty-print exp port)) + exp)) + (exp + (pretty-print exp port))))) + ;;; ;;; One-time hints. @@ -445,4 +546,6 @@ (define interactive? cache-entries #:entry-expiration entry-expiration))) - (guix-environment* opts)) + (if (assoc-ref opts 'export-manifest?) + (export-manifest opts (current-output-port)) + (guix-environment* opts))) diff --git a/tests/guix-shell-export-manifest.sh b/tests/guix-shell-export-manifest.sh new file mode 100644 index 0000000000..cbb90f04bf --- /dev/null +++ b/tests/guix-shell-export-manifest.sh @@ -0,0 +1,84 @@ +# GNU Guix --- Functional package management for GNU +# Copyright © 2022 Ludovic Courtès +# +# This file is part of GNU Guix. +# +# GNU Guix is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# GNU Guix is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Guix. If not, see . + +# +# Test 'guix shell --export-manifest'. +# + +guix shell --version + +tmpdir="t-guix-manifest-$$" +trap 'rm -r "$tmpdir"' EXIT +mkdir "$tmpdir" + +manifest="$tmpdir/manifest.scm" + +# Basics. +guix shell --export-manifest guile-bootstrap > "$manifest" +test "$(guix build -m "$manifest")" = "$(guix build guile-bootstrap)" + +guix shell -m "$manifest" --bootstrap -- \ + "$SHELL" -c 'guix package --export-manifest -p "$GUIX_ENVIRONMENT"' > \ + "$manifest.second" +for m in "$manifest" "$manifest.second" +do + grep -v '^;' < "$m" > "$m.new" # filter out comments + mv "$m.new" "$m" +done + +cat "$manifest" +cat "$manifest.second" + +cmp "$manifest" "$manifest.second" + +# Combining manifests. +guix shell --export-manifest -m "$manifest" gash gash-utils \ + > "$manifest.second" +guix build -m "$manifest.second" -d | \ + grep "$(guix build guile-bootstrap -d)" +guix build -m "$manifest.second" -d | \ + grep "$(guix build gash -d)" + +# Package transformation option. +guix shell --export-manifest guile guix --with-latest=guile-json > "$manifest" +grep 'options->transformation' "$manifest" +grep '(with-latest . "guile-json")' "$manifest" + +# Development manifest. +guix shell --export-manifest -D guile git > "$manifest" +grep 'package->development-manifest' "$manifest" +grep '"guile"' "$manifest" +guix build -m "$manifest" -d | \ + grep "$(guix build -e '(@@ (gnu packages commencement) gcc-final)' -d)" +guix build -m "$manifest" -d | \ + grep "$(guix build git -d)" + +# Test various combinations to make sure generated code uses interfaces +# correctly. +for options in \ + "coreutils grep sed" \ + "gsl openblas gcc-toolchain --tune" \ + "guile -m $manifest.previous" \ + "git:send-email gdb guile:debug" \ + "git -D coreutils" +do + guix shell --export-manifest $options > "$manifest" + cat "$manifest" + guix shell -m "$manifest" -n + mv "$manifest" "$manifest.previous" +done -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 07:10:51 2022 Received: (at 54393) by debbugs.gnu.org; 31 Mar 2022 11:10:51 +0000 Received: from localhost ([127.0.0.1]:38026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZshW-0002C1-P7 for submit@debbugs.gnu.org; Thu, 31 Mar 2022 07:10:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZshL-0002A1-I7 for 54393@debbugs.gnu.org; Thu, 31 Mar 2022 07:10:40 -0400 Received: from [2001:470:142:3::e] (port=54766 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZshG-0003LB-Cr; Thu, 31 Mar 2022 07:10:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=myYwJo5ugJDuCoRtCWXqHaVD4jt4FxC5Bm7I7AZSJAI=; b=HF2KmgHqvxraZmpcw6Rz 8EbG+26USvTLd5V+uMzlu9jXeog2/+lQwcsjW5K2PJYj0tPoikVqFx/07qe98Li4+kpEXlyzQdmVd 2iihGO5nScU4v+Ld+81jh3pyne8Ks7ndlkOPZ5ZZ70yri+8YOB7KXXLw0FWQJH3m22+xoBckHT2oG sgYR/fLL1IyStyyG9O4Xk/xoUiALhe2vN6Qi7Kpc8hRclQwjy2Iitz9HIKrt0pOxMUiLS6zpSFzFk 0vZwqzPkWlXi2mn1RVvFBtzomCUmaJGXCHvSReXkT6Tn03eq+x42HUFbl3W96YU3jT4DMoDcrJ8GD 0HwBUuDq1E7omA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51264 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZshF-000370-V1; Thu, 31 Mar 2022 07:10:34 -0400 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 54393@debbugs.gnu.org Subject: [PATCH v2 0/3] Add '--export-manifest' to 'guix shell' Date: Thu, 31 Mar 2022 13:10:27 +0200 Message-Id: <20220331111027.31890-1-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <87r173huph.fsf@gnu.org> References: <87r173huph.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! Here’s a v2 of the patch: instead of introducing a new command, this version adds an ‘--export-manifest’ option to ‘guix shell’, as suggested by zimoun and others. The behavior is the same as that of the previously-proposed ‘guix manifest’ command. Thoughts? Ludo’. Ludovic Courtès (3): packages: Add 'package-unique-version-prefix'. environment: Export 'load-manifest'. shell: Add '--export-manifest'. Makefile.am | 1 + doc/guix.texi | 57 +++++++++++++++ gnu/packages.scm | 21 ++++++ guix/scripts/environment.scm | 9 ++- guix/scripts/package.scm | 20 +---- guix/scripts/shell.scm | 109 +++++++++++++++++++++++++++- tests/guix-shell-export-manifest.sh | 84 +++++++++++++++++++++ tests/packages.scm | 13 ++++ 8 files changed, 291 insertions(+), 23 deletions(-) create mode 100644 tests/guix-shell-export-manifest.sh base-commit: 53b04339fe521f486d3017930a419d5ca8a6cffd -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 04 10:37:36 2022 Received: (at 54393) by debbugs.gnu.org; 4 Apr 2022 14:37:37 +0000 Received: from localhost ([127.0.0.1]:52606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbNpo-0000JY-Jc for submit@debbugs.gnu.org; Mon, 04 Apr 2022 10:37:36 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:37881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbNpm-0000JG-Pj for 54393@debbugs.gnu.org; Mon, 04 Apr 2022 10:37:35 -0400 Received: by mail-qk1-f180.google.com with SMTP id d142so7772984qkc.4 for <54393@debbugs.gnu.org>; Mon, 04 Apr 2022 07:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=c5Dvt+V7/tR3Zz5s3b5JBpYuhrpKXhlrSUkS2978UbA=; b=A8UQ/2bm91ktAOQ7lRqQQmLt/GDe00Kf2QS6tsSTr7GlgaBAgj5hzRWd+Kl81+HvI+ ofT/75hriK6wxKd7HTITUmU5PwxR7hxUxHGOmCPjJuSGFabb3uPkumoM7Scs4Z8+lLsu b/4pFANU1MmebNZr04HhC4A3JPr/Va01xAL1k99ZoIwmb2E7JvCghXQGv3yeKmYcij4V L1ghp8TLmZ5jRo/t0BRFit+He4y3nVIL77IlybYH/ubid51x6T7UZj2FIaqdKzu7sgBw U6Py5RZ3CO2Tm1mk5/VfX0TyntPrlOw3lCrulaA08xl+HxAE8bS6U0qy4kl7u9uIu34J 1qeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=c5Dvt+V7/tR3Zz5s3b5JBpYuhrpKXhlrSUkS2978UbA=; b=dx+Fz5i0C5R0kdfXP5ZbQoiq63/lUiLvZvCStHuO++eoWFfkp/qlaEizp5FyFYS/p7 w/p/15S7qbV+64mc47pmEyUqCiz0+SMlJamCq6Fkbltz8xdTFX7KrAwiDCLMbx9pQ1fK Cnlx1Gx/wklAfzYX3UAvDpbxuKzwZpXAe017MgoNZNdpmYnxq4eDOunOXwCPwo74ACgh BGYNWnPTBZnNgDsNrM6sSbGLWvWa9EPjOOpnOOQms4jSgVZuYe2sN+9JWy1LNrot07BJ Mhnu4bdn+pWhbuJqTATj5/AnUiL1PBbiciuvKJH0H+90WFbwOzigB7uiE2rVm+kDGAfV JXNw== X-Gm-Message-State: AOAM532ma+Ow4ysdPWNLhKwyClaLO5qSSandOwTaKCGofH82ubXirA/Z 4HIL02pY7EqQW4qOpbbRg1CQ0n5F8NU= X-Google-Smtp-Source: ABdhPJxaYJqz84z8DR+tqDqmK2BXdpuwPZ861yDEeSr0j6Gd4B/iKAkyFw5SQ4YyelRgTumtGaU0Ag== X-Received: by 2002:a05:620a:2488:b0:680:9f57:efbb with SMTP id i8-20020a05620a248800b006809f57efbbmr50868qkn.714.1649083048836; Mon, 04 Apr 2022 07:37:28 -0700 (PDT) Received: from hurd (dsl-154-119.b2b2c.ca. [66.158.154.119]) by smtp.gmail.com with ESMTPSA id j21-20020ac85f95000000b002e1cde99863sm8636831qta.83.2022.04.04.07.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 07:37:27 -0700 (PDT) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#54393: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests References: <87r173huph.fsf@gnu.org> <20220331110957.31829-1-ludo@gnu.org> <20220331110957.31829-3-ludo@gnu.org> Date: Mon, 04 Apr 2022 10:37:26 -0400 In-Reply-To: <20220331110957.31829-3-ludo@gnu.org> ("Ludovic =?utf-8?Q?Cou?= =?utf-8?Q?rt=C3=A8s=22's?= message of "Thu, 31 Mar 2022 13:09:57 +0200") Message-ID: <87sfqszzh5.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54393 Cc: 54393@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Ludovic Court=C3=A8s writes: > * guix/scripts/shell.scm (show-help, %options): Add '--export-manifest'. > (manifest-entry-version-prefix, manifest->code*) > (export-manifest): New procedures. > (guix-shell): Honor '--export-manifest'. > * tests/guix-shell-export-manifest.sh: New file. > * Makefile.am (SH_TESTS): Add it. > * doc/guix.texi (Invoking guix shell): Document '--export-manifest'. > (Invoking guix environment): Link to it. > (Invoking guix pack): Likewise. [...] > + > +;;; > +;;; Exporting a manifest. > +;;; > + > +(define (manifest-entry-version-prefix entry) > + "Search among all the versions of ENTRY's package that are available, = and > +return the shortest unambiguous version prefix for this package." > + (package-unique-version-prefix (manifest-entry-name entry) > + (manifest-entry-version entry))) > + > +(define (manifest->code* manifest extra-manifests) > + "Like 'manifest->code', but insert a 'concatenate-manifests' call that > +concatenates MANIFESTS, a list of expressions." > + (if (null? (manifest-entries manifest)) > + (match extra-manifests > + ((one) one) > + (lst `(concatenate-manifests ,@extra-manifests))) > + (match (manifest->code manifest > + #:entry-package-version > + manifest-entry-version-prefix) > + (('begin exp ... last) > + `(begin > + ,@exp > + ,(match extra-manifests > + (() last) > + (_ `(concatenate-manifests > + (list ,last ,@extra-manifests))))))))) Should an "else" clause be added here with a more useful error message that the default 'no match for x' or similar? If that'd be totally unexpected and a bug, then it's fine as-is. > +(define (export-manifest opts port) > + "Write to PORT a manifest corresponding to OPTS." > + (define (manifest-lift proc) > + (lambda (entry) > + (match (manifest-entry-item entry) > + ((? package? p) > + (manifest-entry > + (inherit (package->manifest-entry (proc p))) > + (output (manifest-entry-output entry)))) > + (_ > + entry)))) > + > + (define (validated-spec spec) > + ;; Return SPEC if it's validate package spec. As this is an action (proc), perhaps it should be named "validate-spec". The comment doc should also be worded as "if SPEC is a valid package spec" or similar. The rest LGTM. Thank you for addressing the suggestion to reuse an existing sub-command to try to keep things neatly organized instead of extending the already large set of them :-). Maxim From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 04 17:16:23 2022 Received: (at 54393-done) by debbugs.gnu.org; 4 Apr 2022 21:16:23 +0000 Received: from localhost ([127.0.0.1]:53201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbU3i-0003xJ-Un for submit@debbugs.gnu.org; Mon, 04 Apr 2022 17:16:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbU3h-0003wy-HH for 54393-done@debbugs.gnu.org; Mon, 04 Apr 2022 17:16:21 -0400 Received: from [2001:470:142:3::e] (port=43052 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbU3c-0001Rc-Ac; Mon, 04 Apr 2022 17:16:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Oy488Z+3qUDhDv6t1DE9wBNkMAe5m05b0Tc6CiPR7v4=; b=FwSSTltqtsCQXX+w+y3K qCnbTS8hY6+QMrSlAsa/Zo+pzKx2wH2I8dUALZsCJy++re0z4zR2Yr4wXh6K2a1VisIs2sWfkIalz BXpHZtNf/VEpSJSgV5ZbQgl/oIRUcslbWfTTW4uXoXfwN+RmZ8JohHkMHFoeKkGKYwzMwWQmMriMu s5lyQvyhuMnWGL3RcG6mjP+Hv/BuPgi6eGrwDQevIagZkW6TOlG6EApQHSmgurGqVnG1sMN8G8tTa 1jhn+jPTx6SMrPdT+cp7aCff/o7QKTtZNikCF4lU3MPml/6dDERyQO9/3c4P2MstiwXnQE6eSshar wQxBPC06/YdnbQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:60036 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbU3b-0007Et-SJ; Mon, 04 Apr 2022 17:16:16 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#54393: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests References: <87r173huph.fsf@gnu.org> <20220331110957.31829-1-ludo@gnu.org> <20220331110957.31829-3-ludo@gnu.org> <87sfqszzh5.fsf_-_@gmail.com> Date: Mon, 04 Apr 2022 23:16:13 +0200 In-Reply-To: <87sfqszzh5.fsf_-_@gmail.com> (Maxim Cournoyer's message of "Mon, 04 Apr 2022 10:37:26 -0400") Message-ID: <87zgl0r1lu.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393-done Cc: 54393-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Maxim Cournoyer skribis: [...] >> +(define (manifest->code* manifest extra-manifests) >> + "Like 'manifest->code', but insert a 'concatenate-manifests' call that >> +concatenates MANIFESTS, a list of expressions." >> + (if (null? (manifest-entries manifest)) >> + (match extra-manifests >> + ((one) one) >> + (lst `(concatenate-manifests ,@extra-manifests))) >> + (match (manifest->code manifest >> + #:entry-package-version >> + manifest-entry-version-prefix) >> + (('begin exp ... last) >> + `(begin >> + ,@exp >> + ,(match extra-manifests >> + (() last) >> + (_ `(concatenate-manifests >> + (list ,last ,@extra-manifests))))))))) > > Should an "else" clause be added here with a more useful error message > that the default 'no match for x' or similar? If that'd be totally > unexpected and a bug, then it's fine as-is. Yes, it would be a bug. >> + (define (validated-spec spec) >> + ;; Return SPEC if it's validate package spec. > > As this is an action (proc), perhaps it should be named "validate-spec". > The comment doc should also be worded as "if SPEC is a valid package > spec" or similar. I fixed the comment but kept the name =E2=80=98validated-spec=E2=80=99, whi= ch is an attempt at suggesting that it=E2=80=99s returns a meaningful value (whereas =E2=80=98validate-spec=E2=80=99 sounds like it=E2=80=99s called for effect = and returns *unspecified*). > Thank you for addressing the suggestion to reuse an existing sub-command > to try to keep things neatly organized instead of extending the already > large set of them :-). Heheh, thanks! Pushed as b1e7e64f351fa03a66ce1f9776f9ba84cf2c6294 together with a news entry. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 05 01:48:50 2022 Received: (at 54393) by debbugs.gnu.org; 5 Apr 2022 05:48:50 +0000 Received: from localhost ([127.0.0.1]:53578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbc3e-0005aS-Cu for submit@debbugs.gnu.org; Tue, 05 Apr 2022 01:48:50 -0400 Received: from mail-lj1-f176.google.com ([209.85.208.176]:36615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbc3c-0005a9-BA; Tue, 05 Apr 2022 01:48:48 -0400 Received: by mail-lj1-f176.google.com with SMTP id q68so3672108ljb.3; Mon, 04 Apr 2022 22:48:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ybweysse8C7XjeyMHSJqCIHo/yQ2sjMrDyv1t5VYRVA=; b=ibcw1QpJV5bXv0eoFmQHWEyKbRPQEe2RgvtdXca4APpk1ki7aBHb0QvhG28sokKZuQ bNV1qw7GVTH/WKzK0cZ7W0AfjNcreUNu1cnEHZ8cu0qSS8apjxRe3675JnTlNEf1VfY+ oiv8hxeDJsvnDo+AM5tG/BzS4CtIchVT8hM2Rrb0OEDs8ii8XTsfh2AoDKdbMs7qujg3 hoRFjea7ULpxVLidU8EstB/jag6Cl5b1C0M9gCyolAu0wxeKLqpkjT7z8XiPolHUUtP8 t9XBc5BPNbKTlt4ttNDHBCePEQY4CP5Hswl5odVVYpS+K4Y04Q6hLnhV3DOzNg4uEgEo ouSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ybweysse8C7XjeyMHSJqCIHo/yQ2sjMrDyv1t5VYRVA=; b=Ado12QtrLEadS2CYNmVwcLY+ycys0uWaRFhc7X1nfPXgGS4tqpU+aIf9DTnFyKXnWh kXxOeP/D1J37BiQSAflkZXR1YkkYRhKDgEAt9HXw6fC22jU5Qgz0MzL16QSTDWq9kc6X qKVUVJuI4UEggzThEao3+UulPCPSasRjS58PXTywjm0W6GAcVUCOMJEhCbHGMSA2Ng0O ipmlGxaGdsHHZpajwDXetTh0TxzAX4uzmvBWzJkP5tZRLQmsXf3EPZ0qRgzck/33BPI2 C3bn/Vomie2XbAiuWLB0InDs0UqUhJQR8fBkCP2kMO6yumldsZUzz4S2bRUsm2EjAioH TXYQ== X-Gm-Message-State: AOAM530neZbK0NCqE0tsf8n/9lQVFao+UWRLvpug3Q/2Xf0lujT9AAhQ oRjjDGTscRBo1Cbj/Mb5emDY1IPxu0YIIOzaR/6Rd0diBRA= X-Google-Smtp-Source: ABdhPJxXWWbFpZfGCsnVM/6CbSDV/Mrd9HitSrKr+BNtFXP5PLMCpqnv+qaT7uMlh4A9mYDLZHLMo31ifHNfyY54yXI= X-Received: by 2002:a05:651c:4d4:b0:249:a282:3f50 with SMTP id e20-20020a05651c04d400b00249a2823f50mr1067568lji.453.1649137721984; Mon, 04 Apr 2022 22:48:41 -0700 (PDT) MIME-Version: 1.0 References: <87r173huph.fsf@gnu.org> <20220331110957.31829-1-ludo@gnu.org> <20220331110957.31829-3-ludo@gnu.org> <87sfqszzh5.fsf_-_@gmail.com> <87zgl0r1lu.fsf_-_@gnu.org> In-Reply-To: <87zgl0r1lu.fsf_-_@gnu.org> From: zimoun Date: Tue, 5 Apr 2022 07:48:29 +0200 Message-ID: Subject: Re: bug#54393: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests To: 54393@debbugs.gnu.org, =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54393 Cc: 54393-done@debbugs.gnu.org, Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Mon, 4 Apr 2022 at 23:17, Ludovic Court=C3=A8s wrote: > > Thank you for addressing the suggestion to reuse an existing sub-comman= d > > to try to keep things neatly organized instead of extending the already > > large set of them :-). As discussed on IRC [1], it could nice in the future to have a warning message when some options are incompatible. For instance, guix package --install hello --export-channels guix shell --container --export-manifest etc. And it would probably be an easy first contribution, or listed as such. :-) 1: > Pushed as b1e7e64f351fa03a66ce1f9776f9ba84cf2c6294 together with a news > entry. Cool! Thanks. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 06 04:08:59 2022 Received: (at 54393-done) by debbugs.gnu.org; 6 Apr 2022 08:08:59 +0000 Received: from localhost ([127.0.0.1]:56796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nc0ip-0007FW-BM for submit@debbugs.gnu.org; Wed, 06 Apr 2022 04:08:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nc0in-0007FG-Mf; Wed, 06 Apr 2022 04:08:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51890) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nc0ii-0005cV-Fh; Wed, 06 Apr 2022 04:08:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=kPkNtYyzRGrGUdaO1InjOe5upiKGuqBof4hIYb9561g=; b=ef5dMekTPWaNnUHdkbLX P6xFOjxG1hu6YetA1CbMozkJtQjvkyQb5qdhrgTZVFzmNzCL9A0GyBkcUX5v+ZNcM/tUV8RK+Qunn ql0KEUO171uAK5cwiIEnjCnrhRa/FnOS2tTGMURlPi4BUMsmlT1/AJ3Q38FThwP2jPy2EQvIutqVw lhCEajpNRLohZJxyg3FjOP1Ir8qM6gdbqB0YhdBnjg/1rDy5mTzVR57y3tKorxFj4+RclyAgHel+m ulyMetE879XYhlLNZuAzDQdETYF/7FBUVRuTJw7AxkwMxQ/XvZZ0/0zMnyqsNo0lrwVLN6eRpGPxS E0DwLT1GpeCR2g==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:61157 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nc0ii-0008LV-3C; Wed, 06 Apr 2022 04:08:52 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#54393: [PATCH 0/2] Add 'guix manifest' to "translate" commands to manifests References: <87r173huph.fsf@gnu.org> <20220331110957.31829-1-ludo@gnu.org> <20220331110957.31829-3-ludo@gnu.org> <87sfqszzh5.fsf_-_@gmail.com> <87zgl0r1lu.fsf_-_@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Germinal an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 06 Apr 2022 10:08:49 +0200 In-Reply-To: (zimoun's message of "Tue, 5 Apr 2022 07:48:29 +0200") Message-ID: <87czhuiqge.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54393-done Cc: 54393@debbugs.gnu.org, 54393-done@debbugs.gnu.org, Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, zimoun skribis: > As discussed on IRC [1], it could nice in the future to have a warning > message when some options are incompatible. For instance, > > guix package --install hello --export-channels > guix shell --container --export-manifest > > etc. And it would probably be an easy first contribution, or listed > as such. :-) Agreed! Ludo=E2=80=99. From unknown Fri Jun 20 07:19:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 04 May 2022 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator