diff options
author | Christopher Baines <mail@cbaines.net> | 2021-02-03 09:14:43 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-02-03 09:57:35 +0000 |
commit | e740cc614096e768813280c718f9e96343ba41b3 (patch) | |
tree | 25ade70a5d408be80f62f19c6511172aab7dcce5 /guix/import/texlive.scm | |
parent | 1b9186828867e77af1f2ee6741063424f8256398 (diff) | |
parent | 63cf277bfacf282d2b19f00553745b2a9370eca0 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/import/texlive.scm')
-rw-r--r-- | guix/import/texlive.scm | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/guix/import/texlive.scm b/guix/import/texlive.scm index a84683ef6f..18d8b95ee0 100644 --- a/guix/import/texlive.scm +++ b/guix/import/texlive.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +26,8 @@ #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (web uri) + #:use-module (guix diagnostics) + #:use-module (guix i18n) #:use-module (guix http-client) #:use-module (gcrypt hash) #:use-module (guix memoization) @@ -149,19 +152,24 @@ expression describing it." (home-page (string-append "http://www.ctan.org/pkg/" id)) (ref (texlive-ref component id)) (checkout (download-svn-to-store store ref))) + (unless checkout + (warning (G_ "Could not determine source location. \ +Please manually specify the source field.~%"))) `(package (name ,(guix-name component id)) (version ,version) - (source (origin - (method svn-fetch) - (uri (texlive-ref ,component ,id)) - (sha256 - (base32 - ,(bytevector->nix-base32-string - (let-values (((port get-hash) (open-sha256-port))) - (write-file checkout port) - (force-output port) - (get-hash))))))) + (source ,(if checkout + `(origin + (method svn-fetch) + (uri (texlive-ref ,component ,id)) + (sha256 + (base32 + ,(bytevector->nix-base32-string + (let-values (((port get-hash) (open-sha256-port))) + (write-file checkout port) + (force-output port) + (get-hash)))))) + #f)) (build-system texlive-build-system) (arguments ,`(,'quote (#:tex-directory ,(string-join (list component id) "/")))) (home-page ,home-page) |