mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
import: utils: Add default-git-error.
* guix/import/utils.scm (default-git-error): Add procedure. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
parent
bd2470ca4d
commit
c0ff1be86c
1 changed files with 15 additions and 0 deletions
|
@ -32,6 +32,7 @@
|
|||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (guix import utils)
|
||||
#:autoload (git structs) (git-error-message)
|
||||
#:use-module (guix base32)
|
||||
#:use-module ((guix build download) #:prefix build:)
|
||||
#:use-module ((gcrypt hash) #:hide (sha256))
|
||||
|
@ -40,6 +41,7 @@
|
|||
#:use-module (guix utils)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix deprecation)
|
||||
#:use-module (guix diagnostics)
|
||||
#:use-module (guix discovery)
|
||||
#:use-module (guix build-system)
|
||||
#:use-module (guix git)
|
||||
|
@ -75,6 +77,7 @@
|
|||
download-git-repository
|
||||
git-origin
|
||||
git->origin
|
||||
default-git-error
|
||||
|
||||
package-names->package-inputs
|
||||
maybe-inputs
|
||||
|
@ -222,6 +225,18 @@ be a procedure with a 'body property, used to generate the origin sexp."
|
|||
(values #f #f #f))))
|
||||
(values (git-origin url (peek-body proc) hash) directory)))
|
||||
|
||||
(define (default-git-error home-page)
|
||||
"Return a procedure to be passed to a `git-error' `catch' for HOME-PAGE."
|
||||
(match-lambda*
|
||||
(('git-error error)
|
||||
(warning location
|
||||
(G_ "failed to download Git repository ~a: ~a~%")
|
||||
home-page
|
||||
(git-error-message error))
|
||||
#f)
|
||||
(_
|
||||
#f)))
|
||||
|
||||
(define %spdx-license-identifiers
|
||||
;; https://spdx.org/licenses/
|
||||
;; The gfl1.0, nmap, repoze
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue