‘guix shell --export-manifest’ ignores transformations for ‘-D’ packages

  • Open
  • quality assurance status badge
Details
2 participants
  • Evgenii Klimov
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 7 Dec 2023 11:17
‘guix shell --export-manifest ’ ignores transformations for ‘-D’ packages
(address . bug-guix@gnu.org)
874jgufhb1.fsf@inria.fr
Hello!

‘--export-manifest’ does not apply transformations to packages preceded
by ‘-D’ (development environment):

Toggle snippet (29 lines)
$ guix shell -D guile-git --with-branch=libgit2=main --export-manifest
;; 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.
(package->development-manifest
(specification->package "guile-git"))

$ guix shell guile-git --with-branch=libgit2=main --export-manifest
;; 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.

(use-modules (guix transformations))

(define transform1
(options->transformation
'((with-branch . "libgit2=main"))))

(packages->manifest
(list (transform1 (specification->package "guile-git"))))

$ guix describe
Generation 283 Dec 04 2023 00:32:23 (current)
guix 6e2dd51
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 6e2dd51df5f3f51e9056dd4f2e1b036195ab3caa

Ludo’.
E
E
Evgenii Klimov wrote on 5 Sep 00:55 +0200
bug#67685: ‘guix shell --export-man ifest’ ignores transformations for ‘-D’ packages
(address . 67685@debbugs.gnu.org)(address . ludovic.courtes@inria.fr)
87v7zbm3k3.fsf@lipklim.org
I think that transformations should be applied to `-D --file'
combination as well (probably to `-D --manifest' too).

It would support the following use case (this is the reason I fould this
very bug). When we have a project under development which is controlled
by guix.scm file and we want to try out the dependency from another fork
or branch, it would be useful for transformations to be propagated to
inputs/propagated-inputs/etc. inside guix.scm file.

Currently it doesn't apply transformations:

Toggle snippet (5 lines)
guix shell -D -f guix.scm \
--with-git-url=python-pytelegrambotapi=https://github.com/coder2020official/pyTelegramBotAPI \
--with-branch=python-pytelegrambotapi=polling-improvements

However it does propagate:

Toggle snippet (5 lines)
guix shell -f guix.scm \
--with-git-url=python-pytelegrambotapi=https://github.com/coder2020official/pyTelegramBotAPI \
--with-branch=python-pytelegrambotapi=polling-improvements

and this, when dependency is mentioned explicitly:

Toggle snippet (4 lines)
guix shell -D -f guix.scm python-pytelegrambotapi \
--with-git-url=python-pytelegrambotapi=https://github.com/coder2020official/pyTelegramBotAPI \
--with-branch=python-pytelegrambotapi=polling-improvements
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 67685@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 67685
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch