1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 13:10:33 +02:00

import: crate: Add ‘--lockfile’ option.

* guix/import/crate.scm (cargo-inputs-from-lockfile)
find-cargo-inputs-location, extract-cargo-inputs): New procedures.
* guix/scripts/import/crate.scm (%options): Add ‘--lockfile’ option.
(show-help): Add it.
(guix-import-crate): Use it.
* doc/guix.texi (Invoking guix import): Document it.

Change-Id: I291478e04adf9f2df0bf216425a5e8aeba0bedd9
This commit is contained in:
Hilton Chain
2025-04-28 23:52:08 +08:00
parent f27fb840c2
commit 12e0b9e9e4
3 changed files with 102 additions and 10 deletions

View File

@@ -14957,6 +14957,11 @@ version instead instead of aborting.
If a crate dependency is not (yet) packaged, make the corresponding
input in @code{#:cargo-inputs} or @code{#:cargo-development-inputs} into
a comment.
@item --lockfile=@var{file}
@itemx -f @var{file}
When @option{--lockfile} is specified, the importer will ignore other options
and won't output package expressions, instead importing source expressions
from @var{file}, a @file{Cargo.lock} file.
@end table
@item elm