diff options
author | John Kehayias <john.kehayias@protonmail.com> | 2024-03-31 20:46:45 -0400 |
---|---|---|
committer | John Kehayias <john.kehayias@protonmail.com> | 2024-03-31 20:46:45 -0400 |
commit | 155f23a52e626e8ac60f818937d5bb1a3ebe3184 (patch) | |
tree | a19317812471db31ae2a97844d6cf74e45057466 /guix/scripts/import | |
parent | d9dee5ea2f564fa6979ae552fd9bd5ac22f86ecc (diff) | |
parent | 1cba1f8ce6f84c4737650401c0eb0473a45f9ff7 (diff) | |
download | guix-patches-155f23a52e626e8ac60f818937d5bb1a3ebe3184.tar guix-patches-155f23a52e626e8ac60f818937d5bb1a3ebe3184.tar.gz |
Merge branch 'master' into mesa-updates
Change-Id: I4cd94a58b62d8c3987e4a60c76b37894ad851e35
Diffstat (limited to 'guix/scripts/import')
-rw-r--r-- | guix/scripts/import/crate.scm | 24 | ||||
-rw-r--r-- | guix/scripts/import/elpa.scm | 2 |
2 files changed, 23 insertions, 3 deletions
diff --git a/guix/scripts/import/crate.scm b/guix/scripts/import/crate.scm index 038faa87db..082a973aee 100644 --- a/guix/scripts/import/crate.scm +++ b/guix/scripts/import/crate.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net> ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev> ;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com> +;;; Copyright © 2023 David Elsing <david.elsing@posteo.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,6 +48,13 @@ Import and convert the crates.io package for PACKAGE-NAME.\n")) (display (G_ " -r, --recursive import packages recursively")) + (display (G_ " + --recursive-dev-dependencies + include dev-dependencies recursively")) + (display (G_ " + --allow-yanked + allow importing yanked crates if no alternative + satisfying the version requirement exists")) (newline) (display (G_ " -h, --help display this help and exit")) @@ -67,6 +75,12 @@ Import and convert the crates.io package for PACKAGE-NAME.\n")) (option '(#\r "recursive") #f #f (lambda (opt name arg result) (alist-cons 'recursive #t result))) + (option '("recursive-dev-dependencies") #f #f + (lambda (opt name arg result) + (alist-cons 'recursive-dev-dependencies #t result))) + (option '("allow-yanked") #f #f + (lambda (opt name arg result) + (alist-cons 'allow-yanked #t result))) %standard-import-options)) @@ -92,8 +106,14 @@ Import and convert the crates.io package for PACKAGE-NAME.\n")) (package-name->name+version spec)) (match (if (assoc-ref opts 'recursive) - (crate-recursive-import name #:version version) - (crate->guix-package name #:version version #:include-dev-deps? #t)) + (crate-recursive-import + name #:version version + #:recursive-dev-dependencies? + (assoc-ref opts 'recursive-dev-dependencies) + #:allow-yanked? (assoc-ref opts 'allow-yanked)) + (crate->guix-package + name #:version version #:include-dev-deps? #t + #:allow-yanked? (assoc-ref opts 'allow-yanked))) ((or #f '()) (leave (G_ "failed to download meta-data for package '~a'~%") (if version diff --git a/guix/scripts/import/elpa.scm b/guix/scripts/import/elpa.scm index f587eeb243..7f77beaac0 100644 --- a/guix/scripts/import/elpa.scm +++ b/guix/scripts/import/elpa.scm @@ -104,7 +104,7 @@ Import the latest package named PACKAGE-NAME from an ELPA repository.\n")) #:repo (assoc-ref opts 'repo))) ((or #f '()) (leave (G_ "failed to download meta-data for package '~a'~%") package-name)) - (('package etc ...) `(package ,etc)) + (('package etc ...) `(package ,@etc)) ((? list? sexps) (map (match-lambda ((and ('package ('name name) . rest) pkg) |