gnu: gnucash: Add Finance::Quote support.
* gnu/packages/patches/gnucash-price-quotes-perl.patch: New patch. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/gnucash.scm (gnucash)[source]: Use it. [inputs]: Add perl-date-manip and perl-finance-quote. [arguments]: Add 'wrap-programs' phase. Move below inputs.
This commit is contained in:
		
							parent
							
								
									a6d0b306c2
								
							
						
					
					
						commit
						8b94dffde8
					
				
					 3 changed files with 65 additions and 5 deletions
				
			
		| 
						 | 
					@ -474,6 +474,7 @@ dist_patch_DATA =						\
 | 
				
			||||||
  gnu/packages/patches/glibc-ldd-x86_64.patch			\
 | 
					  gnu/packages/patches/glibc-ldd-x86_64.patch			\
 | 
				
			||||||
  gnu/packages/patches/glibc-locales.patch			\
 | 
					  gnu/packages/patches/glibc-locales.patch			\
 | 
				
			||||||
  gnu/packages/patches/gmp-arm-asm-nothumb.patch		\
 | 
					  gnu/packages/patches/gmp-arm-asm-nothumb.patch		\
 | 
				
			||||||
 | 
					  gnu/packages/patches/gnucash-price-quotes-perl.patch		\
 | 
				
			||||||
  gnu/packages/patches/gnutls-doc-fix.patch			\
 | 
					  gnu/packages/patches/gnutls-doc-fix.patch			\
 | 
				
			||||||
  gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \
 | 
					  gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \
 | 
				
			||||||
  gnu/packages/patches/gobject-introspection-cc.patch		\
 | 
					  gnu/packages/patches/gobject-introspection-cc.patch		\
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
;;; GNU Guix --- Functional package management for GNU
 | 
					;;; GNU Guix --- Functional package management for GNU
 | 
				
			||||||
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 | 
					;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 | 
				
			||||||
 | 
					;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
;;; This file is part of GNU Guix.
 | 
					;;; This file is part of GNU Guix.
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
| 
						 | 
					@ -27,7 +28,9 @@
 | 
				
			||||||
  #:use-module (gnu packages gtk)
 | 
					  #:use-module (gnu packages gtk)
 | 
				
			||||||
  #:use-module (gnu packages guile)
 | 
					  #:use-module (gnu packages guile)
 | 
				
			||||||
  #:use-module (gnu packages icu4c)
 | 
					  #:use-module (gnu packages icu4c)
 | 
				
			||||||
 | 
					  #:use-module (gnu packages perl)
 | 
				
			||||||
  #:use-module (gnu packages pkg-config)
 | 
					  #:use-module (gnu packages pkg-config)
 | 
				
			||||||
 | 
					  #:use-module (gnu packages web)
 | 
				
			||||||
  #:use-module (gnu packages webkit)
 | 
					  #:use-module (gnu packages webkit)
 | 
				
			||||||
  #:use-module (gnu packages xml))
 | 
					  #:use-module (gnu packages xml))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -42,11 +45,9 @@
 | 
				
			||||||
                          version ".tar.bz2"))
 | 
					                          version ".tar.bz2"))
 | 
				
			||||||
      (sha256
 | 
					      (sha256
 | 
				
			||||||
       (base32
 | 
					       (base32
 | 
				
			||||||
        "103ir5qg6k8m2mmg9b99c3gn8myxh1gsqyr0mfhmrhqya68wfdr3"))))
 | 
					        "103ir5qg6k8m2mmg9b99c3gn8myxh1gsqyr0mfhmrhqya68wfdr3"))
 | 
				
			||||||
 | 
					      (patches (list (search-patch "gnucash-price-quotes-perl.patch")))))
 | 
				
			||||||
    (build-system gnu-build-system)
 | 
					    (build-system gnu-build-system)
 | 
				
			||||||
    (arguments
 | 
					 | 
				
			||||||
     `(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff
 | 
					 | 
				
			||||||
       #:configure-flags '("--disable-dbi")))
 | 
					 | 
				
			||||||
    (inputs
 | 
					    (inputs
 | 
				
			||||||
     `(("guile" ,guile-2.0)
 | 
					     `(("guile" ,guile-2.0)
 | 
				
			||||||
       ("icu4c" ,icu4c)
 | 
					       ("icu4c" ,icu4c)
 | 
				
			||||||
| 
						 | 
					@ -56,11 +57,46 @@
 | 
				
			||||||
       ("libgnomecanvas" ,libgnomecanvas)
 | 
					       ("libgnomecanvas" ,libgnomecanvas)
 | 
				
			||||||
       ("libxml2" ,libxml2)
 | 
					       ("libxml2" ,libxml2)
 | 
				
			||||||
       ("libxslt" ,libxslt)
 | 
					       ("libxslt" ,libxslt)
 | 
				
			||||||
       ("webkitgtk" ,webkitgtk/gtk+-2)))
 | 
					       ("webkitgtk" ,webkitgtk/gtk+-2)
 | 
				
			||||||
 | 
					       ("perl-date-manip" ,perl-date-manip)
 | 
				
			||||||
 | 
					       ("perl-finance-quote" ,perl-finance-quote)))
 | 
				
			||||||
    (native-inputs
 | 
					    (native-inputs
 | 
				
			||||||
     `(("glib" ,glib "bin") ; glib-compile-schemas, etc.
 | 
					     `(("glib" ,glib "bin") ; glib-compile-schemas, etc.
 | 
				
			||||||
       ("intltool" ,intltool)
 | 
					       ("intltool" ,intltool)
 | 
				
			||||||
       ("pkg-config" ,pkg-config)))
 | 
					       ("pkg-config" ,pkg-config)))
 | 
				
			||||||
 | 
					    (arguments
 | 
				
			||||||
 | 
					     `(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff
 | 
				
			||||||
 | 
					       #:configure-flags '("--disable-dbi")
 | 
				
			||||||
 | 
					       #:phases
 | 
				
			||||||
 | 
					       (modify-phases %standard-phases
 | 
				
			||||||
 | 
					         (add-after
 | 
				
			||||||
 | 
					          'install 'wrap-programs
 | 
				
			||||||
 | 
					          (lambda* (#:key inputs outputs #:allow-other-keys)
 | 
				
			||||||
 | 
					            (for-each (lambda (prog)
 | 
				
			||||||
 | 
					                        (wrap-program (string-append (assoc-ref outputs "out")
 | 
				
			||||||
 | 
					                                                     "/bin/" prog)
 | 
				
			||||||
 | 
					                          `("PERL5LIB" ":" prefix
 | 
				
			||||||
 | 
					                            ,(map (lambda (o)
 | 
				
			||||||
 | 
					                                    (string-append o "/lib/perl5/site_perl/"
 | 
				
			||||||
 | 
					                                                   ,(package-version perl)))
 | 
				
			||||||
 | 
					                                  (if (string=? prog "gnc-fq-helper")
 | 
				
			||||||
 | 
					                                      (list
 | 
				
			||||||
 | 
					                                       ,@(transitive-input-references
 | 
				
			||||||
 | 
					                                          'inputs
 | 
				
			||||||
 | 
					                                          (map (lambda (l)
 | 
				
			||||||
 | 
					                                                 (assoc l (inputs)))
 | 
				
			||||||
 | 
					                                               '("perl-finance-quote"
 | 
				
			||||||
 | 
					                                                 "perl-date-manip"))))
 | 
				
			||||||
 | 
					                                      (list
 | 
				
			||||||
 | 
					                                       ,@(transitive-input-references
 | 
				
			||||||
 | 
					                                          'inputs
 | 
				
			||||||
 | 
					                                          (map (lambda (l)
 | 
				
			||||||
 | 
					                                                 (assoc l (inputs)))
 | 
				
			||||||
 | 
					                                               '("perl-finance-quote")))))))))
 | 
				
			||||||
 | 
					                      '("gnucash"
 | 
				
			||||||
 | 
					                        "gnc-fq-check"
 | 
				
			||||||
 | 
					                        "gnc-fq-helper"
 | 
				
			||||||
 | 
					                        "gnc-fq-dump")))))))
 | 
				
			||||||
    (home-page "https://gnu.org/software/gnucash")
 | 
					    (home-page "https://gnu.org/software/gnucash")
 | 
				
			||||||
    (synopsis "Personal and small business financial accounting software")
 | 
					    (synopsis "Personal and small business financial accounting software")
 | 
				
			||||||
    (description
 | 
					    (description
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										23
									
								
								gnu/packages/patches/gnucash-price-quotes-perl.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								gnu/packages/patches/gnucash-price-quotes-perl.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,23 @@
 | 
				
			||||||
 | 
					After wrapping gnc-fq-check and gnc-fq-helper we can no longer execute them
 | 
				
			||||||
 | 
					with perl, so execute them directly instead.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--- gnucash-2.6.6/src/scm/price-quotes.scm.orig	2014-04-27 17:42:28.000000000 -0500
 | 
				
			||||||
 | 
					+++ gnucash-2.6.6/src/scm/price-quotes.scm	2015-07-09 16:12:11.196218472 -0500
 | 
				
			||||||
 | 
					@@ -74,7 +74,7 @@
 | 
				
			||||||
 | 
					     (define (start-program)
 | 
				
			||||||
 | 
					       (if (not (string-null? gnc:*finance-quote-check*))
 | 
				
			||||||
 | 
					           (set! program (gnc-spawn-process-async
 | 
				
			||||||
 | 
					-                         (list "perl" "-w" gnc:*finance-quote-check*) #t))))
 | 
				
			||||||
 | 
					+                         (list gnc:*finance-quote-check*) #t))))
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					     (define (get-sources)
 | 
				
			||||||
 | 
					       (if (not (null? program))
 | 
				
			||||||
 | 
					@@ -158,7 +158,7 @@
 | 
				
			||||||
 | 
					     (define (start-quoter)
 | 
				
			||||||
 | 
					       (if (not (string-null? gnc:*finance-quote-helper*))
 | 
				
			||||||
 | 
					           (set! quoter (gnc-spawn-process-async
 | 
				
			||||||
 | 
					-                        (list "perl" "-w" gnc:*finance-quote-helper*) #t))))
 | 
				
			||||||
 | 
					+                        (list gnc:*finance-quote-helper*) #t))))
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					     (define (get-quotes)
 | 
				
			||||||
 | 
					       (if (not (null? quoter))
 | 
				
			||||||
		Reference in a new issue