packages: Change `base32' to allow non-literal strings.
* guix/packages.scm (base32): Allow arguments that are not literal strings.
This commit is contained in:
		
							parent
							
								
									2a6c679561
								
							
						
					
					
						commit
						aba326f79c
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
 | 
			
		||||
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
| 
						 | 
				
			
			@ -93,9 +93,12 @@ representation."
 | 
			
		|||
    (syntax-case s ()
 | 
			
		||||
      ((_ str)
 | 
			
		||||
       (string? (syntax->datum #'str))
 | 
			
		||||
       ;; A literal string: do the conversion at expansion time.
 | 
			
		||||
       (with-syntax ((bv (nix-base32-string->bytevector
 | 
			
		||||
                          (syntax->datum #'str))))
 | 
			
		||||
         #''bv)))))
 | 
			
		||||
         #''bv))
 | 
			
		||||
      ((_ str)
 | 
			
		||||
       #'(nix-base32-string->bytevector str)))))
 | 
			
		||||
 | 
			
		||||
;; A package.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue