| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 |
|
| 29 | (define-module (gnu packages gnucash)
|
| 30 | #:use-module ((guix licenses) #:prefix license:)
|
| 31 | #:use-module (gnu packages autotools)
|
| 32 | #:use-module (gnu packages base)
|
| 33 | #:use-module (gnu packages bash)
|
| 34 | #:use-module (gnu packages boost)
|
| 35 | #:use-module (gnu packages check)
|
| 36 | #:use-module (gnu packages cmake)
|
| 37 | #:use-module (gnu packages databases)
|
| 38 | #:use-module (gnu packages docbook)
|
| 39 | #:use-module (gnu packages documentation)
|
| 40 | #:use-module (gnu packages finance)
|
| 41 | #:use-module (gnu packages gettext)
|
| 42 | #:use-module (gnu packages glib)
|
| 43 | #:use-module (gnu packages gnome)
|
| 44 | #:use-module (gnu packages gnupg)
|
| 45 | #:use-module (gnu packages gtk)
|
| 46 | #:use-module (gnu packages guile)
|
| 47 | #:use-module (gnu packages icu4c)
|
| 48 | #:use-module (gnu packages multiprecision)
|
| 49 | #:use-module (gnu packages perl)
|
| 50 | #:use-module (gnu packages pkg-config)
|
| 51 | #:use-module (gnu packages python)
|
| 52 | #:use-module (gnu packages swig)
|
| 53 | #:use-module (gnu packages tls)
|
| 54 | #:use-module (gnu packages web)
|
| 55 | #:use-module (gnu packages webkit)
|
| 56 | #:use-module (gnu packages xml)
|
| 57 | #:use-module (gnu packages)
|
| 58 | #:use-module (guix build-system cmake)
|
| 59 | #:use-module (guix build-system gnu)
|
| 60 | #:use-module (guix download)
|
| 61 | #:use-module (guix git-download)
|
| 62 | #:use-module (guix gexp)
|
| 63 | #:use-module (guix packages)
|
| 64 | #:use-module (guix utils))
|
| 65 |
|
| 66 | (define-public gnucash
|
| 67 | |
| 68 | |
| 69 | (package
|
| 70 | (name "gnucash")
|
| 71 | (version "5.17")
|
| 72 | (source
|
| 73 | (origin
|
| 74 | |
| 75 | |
| 76 | (method git-fetch)
|
| 77 | (uri (git-reference
|
| 78 | (url "https://github.com/Gnucash/gnucash")
|
| 79 | (commit version)))
|
| 80 | (file-name (git-file-name name version))
|
| 81 | (sha256
|
| 82 | (base32
|
| 83 | "10w5a81kzsw166fhxv2ycf1dmc5gcynyynxjghv6zknrfyss9xmg"))))
|
| 84 | (outputs '("out" "doc" "debug" "python"))
|
| 85 | (build-system cmake-build-system)
|
| 86 | (arguments
|
| 87 | (list
|
| 88 | #:configure-flags #~(list "-DWITH_PYTHON=ON")
|
| 89 | #:make-flags #~(list "GUILE_AUTO_COMPILE=0")
|
| 90 | #:imported-modules `(,@%default-gnu-imported-modules
|
| 91 | (guix build cmake-build-system)
|
| 92 | (guix build glib-or-gtk-build-system))
|
| 93 | #:modules '((guix build cmake-build-system)
|
| 94 | ((guix build gnu-build-system) #:prefix gnu:)
|
| 95 | ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
|
| 96 | (guix build utils))
|
| 97 | #:phases
|
| 98 | #~(modify-phases %standard-phases
|
| 99 | (add-after 'unpack 'remove-changelog-from-install-target
|
| 100 | (lambda _
|
| 101 | |
| 102 | |
| 103 | |
| 104 | (substitute* "CMakeLists.txt"
|
| 105 | ((".*install.*CMAKE_SOURCE_DIR.*") ""))))
|
| 106 | (add-after 'unpack 'disable-online-test
|
| 107 | (lambda _
|
| 108 | (call-with-output-file "libgnucash/app-utils/test/CMakeLists.txt"
|
| 109 | (lambda (port)
|
| 110 | (display "set(CTEST_CUSTOM_TESTS_IGNORE \
|
| 111 | online_wiggle test-lots)" port)))))
|
| 112 | (add-after 'unpack 'set-env-vars
|
| 113 | (lambda* (#:key inputs #:allow-other-keys)
|
| 114 | |
| 115 | |
| 116 | (setenv "TZDIR" (search-input-directory inputs "share/zoneinfo"))
|
| 117 | (substitute* "CMakeLists.txt"
|
| 118 | (("set\\(SHELL /bin/bash\\)")
|
| 119 | (string-append "set(SHELL " (which "bash") ")")))))
|
| 120 | (add-after 'unpack 'set-perl-path
|
| 121 | (lambda _
|
| 122 | (substitute* "libgnucash/app-utils/gnc-quotes.cpp"
|
| 123 | (("c_cmd\\{bp::search_path\\(\"perl\"\\)\\}")
|
| 124 | (format #f "c_cmd{~s}" #$(file-append perl "/bin/perl"))))))
|
| 125 | |
| 126 | (add-before 'check 'install-locales
|
| 127 | (lambda _
|
| 128 | (setenv "LOCPATH" (getcwd))
|
| 129 | (invoke "localedef" "-i" "en_US" "-f" "UTF-8" "./en_US.UTF-8")
|
| 130 | (invoke "localedef" "-i" "en_GB" "-f" "UTF-8" "./en_GB.UTF-8")
|
| 131 | (invoke "localedef" "-i" "fr_FR" "-f" "UTF-8" "./fr_FR.UTF-8")))
|
| 132 | (add-before 'check 'set-GNC_DBD_DIR
|
| 133 | (lambda* (#:key inputs #:allow-other-keys)
|
| 134 | |
| 135 | (setenv "GNC_DBD_DIR"
|
| 136 | (search-input-directory inputs "lib/dbd"))))
|
| 137 | (replace 'check (assoc-ref gnu:%standard-phases 'check))
|
| 138 | |
| 139 | (add-after 'install 'install-docs
|
| 140 | (lambda _
|
| 141 | (mkdir-p (string-append #$output:doc "/share"))
|
| 142 | (symlink (string-append
|
| 143 | #$(this-package-native-input "gnucash-docs")
|
| 144 | "/share/help")
|
| 145 | (string-append #$output:doc "/share/help"))))
|
| 146 | (add-after 'install 'split-python-bindings
|
| 147 | (lambda _
|
| 148 | (let ((python-bindings (string-append
|
| 149 | "lib/python"
|
| 150 | #$(version-major+minor
|
| 151 | (package-version python)))))
|
| 152 | (mkdir-p (string-append #$output:python "/" python-bindings))
|
| 153 | (copy-recursively
|
| 154 | (string-append #$output "/" python-bindings)
|
| 155 | (string-append #$output:python "/" python-bindings))
|
| 156 | (delete-file-recursively
|
| 157 | (string-append #$output "/" python-bindings)))))
|
| 158 | (add-after 'install-docs 'wrap-programs
|
| 159 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 160 | (for-each
|
| 161 | (lambda (prog)
|
| 162 | (wrap-program (search-input-file
|
| 163 | outputs (string-append "bin/" prog))
|
| 164 | `("GNC_DBD_DIR" =
|
| 165 | (,(search-input-directory inputs "lib/dbd")))
|
| 166 | `("PERL5LIB" ":" prefix
|
| 167 | ,(map (lambda (o)
|
| 168 | (string-append o "/lib/perl5/site_perl/"
|
| 169 | #$(package-version perl)))
|
| 170 | (list
|
| 171 | #$@(transitive-input-references
|
| 172 | 'inputs
|
| 173 | (map (lambda (l)
|
| 174 | (assoc l (package-inputs this-package)))
|
| 175 | '("perl-json-parse"
|
| 176 | "perl-finance-quote"))))))))
|
| 177 | '("gnucash"
|
| 178 | "gnucash-cli"))))
|
| 179 | (add-after 'install 'glib-or-gtk-compile-schemas
|
| 180 | (assoc-ref glib-or-gtk:%standard-phases
|
| 181 | 'glib-or-gtk-compile-schemas))
|
| 182 | (add-after 'install 'glib-or-gtk-wrap
|
| 183 | (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
|
| 184 | (add-before 'glib-or-gtk-wrap 'delete-gnc-fq-update
|
| 185 | (lambda _
|
| 186 | |
| 187 | |
| 188 | (delete-file (string-append #$output "/bin/gnc-fq-update"))))
|
| 189 | (add-after 'glib-or-gtk-wrap 'unwrap-some
|
| 190 | (lambda _
|
| 191 | (for-each
|
| 192 | (lambda (prog)
|
| 193 | (delete-file (string-append #$output "/bin/" prog))
|
| 194 | (rename-file (string-append #$output "/bin/." prog "-real")
|
| 195 | (string-append #$output "/bin/" prog)))
|
| 196 | |
| 197 | |
| 198 | |
| 199 | '("finance-quote-wrapper")))))))
|
| 200 | (native-inputs
|
| 201 | (list gmp
|
| 202 | `(,glib "bin") |
| 203 | gnucash-docs
|
| 204 | googletest
|
| 205 | intltool
|
| 206 | (libc-utf8-locales-for-target)
|
| 207 | pkg-config
|
| 208 | swig-4.4
|
| 209 | tzdata-for-tests))
|
| 210 | (inputs
|
| 211 | (list aqbanking
|
| 212 | bash-minimal
|
| 213 | boost
|
| 214 | glib
|
| 215 | gtk+
|
| 216 | guile-3.0
|
| 217 | icu4c
|
| 218 | libdbi
|
| 219 | libdbi-drivers
|
| 220 | libofx
|
| 221 | libxml2
|
| 222 | libxslt
|
| 223 | perl-finance-quote
|
| 224 | perl-json
|
| 225 | perl-json-parse
|
| 226 | python
|
| 227 | webkitgtk-for-gtk3))
|
| 228 | (propagated-inputs
|
| 229 | |
| 230 | (list dconf))
|
| 231 | (home-page "https://www.gnucash.org/")
|
| 232 | (synopsis "Personal and small business financial accounting software")
|
| 233 | (description
|
| 234 | "GnuCash is personal and professional financial-accounting software.
|
| 235 | It can be used to track bank accounts, stocks, income and expenses, based on
|
| 236 | the double-entry accounting practice. It includes support for QIF/OFX/HBCI
|
| 237 | import and transaction matching. It also automates several tasks, such as
|
| 238 | financial calculations or scheduled transactions.
|
| 239 |
|
| 240 | To make the GnuCash documentation available, its doc output must be
|
| 241 | installed as well as Yelp, the Gnome help browser.")
|
| 242 | (license license:gpl3+)))
|
| 243 |
|
| 244 | |
| 245 | |
| 246 | (define-public gnucash-docs
|
| 247 | (let ((revision "")) |
| 248 | (package
|
| 249 | (name "gnucash-docs")
|
| 250 | (version (package-version gnucash))
|
| 251 | (source
|
| 252 | (origin
|
| 253 | (method url-fetch)
|
| 254 | |
| 255 | (uri (string-append
|
| 256 | "https://github.com/Gnucash/gnucash/releases/download/"
|
| 257 | version "/gnucash-docs-" version ".tar.gz"))
|
| 258 | (sha256
|
| 259 | (base32 "169ncc1cxq9ys2bghbw6lckvam3zbvs5fcn42ka9ldr4gsxklb5h"))))
|
| 260 | (build-system cmake-build-system)
|
| 261 | |
| 262 | |
| 263 | (native-inputs
|
| 264 | |
| 265 | |
| 266 | (list docbook-xml
|
| 267 | docbook-xsl
|
| 268 | libxml2
|
| 269 | libxslt))
|
| 270 | (arguments
|
| 271 | `(#:tests? #f)) |
| 272 | (home-page "https://www.gnucash.org/")
|
| 273 | (synopsis "Documentation for GnuCash")
|
| 274 | (description
|
| 275 | "User guide and other documentation for GnuCash in various languages.
|
| 276 | This package exists because the GnuCash project maintains its documentation in
|
| 277 | an entirely separate package from the actual GnuCash program. It is intended
|
| 278 | to be read using the GNOME Yelp program.")
|
| 279 | (properties '((hidden? . #t))) |
| 280 | (license (list license:fdl1.1+ license:gpl3+)))))
|
| 281 |
|
| 282 | (define-public gwenhywfar
|
| 283 | (package
|
| 284 | (name "gwenhywfar")
|
| 285 | (version "5.14.1")
|
| 286 | (source
|
| 287 | (origin
|
| 288 | (method git-fetch)
|
| 289 | (uri (git-reference
|
| 290 | (url "https://git.aquamaniac.de/git/gwenhywfar")
|
| 291 | (commit version)))
|
| 292 | (sha256
|
| 293 | (base32
|
| 294 | "0p0fzi69jsr3flpr10s8gbl9i265x5j5k1q2i5yva2vsdx2j2878"))
|
| 295 | (file-name (git-file-name name version))))
|
| 296 | (build-system gnu-build-system)
|
| 297 | (arguments
|
| 298 | (list
|
| 299 | #:configure-flags
|
| 300 | #~(list "--disable-network-checks"
|
| 301 | |
| 302 | "--with-guis=gtk3"
|
| 303 | "--enable-system-certs"
|
| 304 | "--with-libxml2-code=yes"
|
| 305 | "--disable-binreloc")
|
| 306 | #:phases
|
| 307 | #~(modify-phases %standard-phases
|
| 308 | (add-before 'bootstrap 'make-cvs
|
| 309 | (lambda _
|
| 310 | (invoke "make" "-fMakefile.cvs"))))))
|
| 311 | (inputs
|
| 312 | (list libgcrypt gnutls openssl gtk+ libxml2))
|
| 313 | (native-inputs
|
| 314 | (list autoconf automake gettext-minimal libtool pkg-config))
|
| 315 | (home-page "https://www.aquamaniac.de")
|
| 316 | (synopsis "Utility library for networking and security applications")
|
| 317 | (description
|
| 318 | "This package provides a helper library for networking and security
|
| 319 | applications and libraries. It is used by AqBanking.")
|
| 320 | |
| 321 | |
| 322 | (license license:lgpl2.1+)))
|
| 323 |
|
| 324 | (define-public aqbanking
|
| 325 | (package
|
| 326 | (name "aqbanking")
|
| 327 | (version "6.9.2")
|
| 328 | (source
|
| 329 | (origin
|
| 330 | (method git-fetch)
|
| 331 | (uri (git-reference
|
| 332 | (url "https://git.aquamaniac.de/git/aqbanking")
|
| 333 | (commit version)))
|
| 334 | (sha256
|
| 335 | (base32
|
| 336 | "1n1867vdml71p9dbcx70rmf10b12l7l0vq847bbizrkq7b0ha8w0"))
|
| 337 | (file-name (git-file-name name version))))
|
| 338 | (build-system gnu-build-system)
|
| 339 | (arguments
|
| 340 | (list
|
| 341 | |
| 342 | |
| 343 | #:parallel-build? #f
|
| 344 | #:phases
|
| 345 | #~(modify-phases %standard-phases
|
| 346 | (add-before 'bootstrap 'make-cvs
|
| 347 | (lambda _
|
| 348 | (invoke "make" "-fMakefile.cvs")))
|
| 349 | |
| 350 | (add-after 'make-cvs 'use-version-instead-of-date
|
| 351 | (lambda _
|
| 352 | (substitute*
|
| 353 | "src/libs/plugins/backends/aqhbci/header.xml.in"
|
| 354 | (("@DATETIME@") #$version))))
|
| 355 | (add-before 'build 'build-types
|
| 356 | (lambda _
|
| 357 | (invoke "make" "typedefs")
|
| 358 | (invoke "make" "typefiles"))))))
|
| 359 | (propagated-inputs
|
| 360 | (list gwenhywfar))
|
| 361 | (inputs
|
| 362 | (list gmp xmlsec gnutls))
|
| 363 | (native-inputs
|
| 364 | (list autoconf automake gettext-minimal libltdl libtool pkg-config))
|
| 365 | (home-page "https://www.aquamaniac.de")
|
| 366 | (synopsis "Interface for online banking tasks")
|
| 367 | (description
|
| 368 | "AqBanking is a modular and generic interface to online banking tasks,
|
| 369 | financial file formats (import/export) and bank/country/currency information.
|
| 370 | AqBanking uses backend plugins to actually perform the online tasks. HBCI,
|
| 371 | OFX DirectConnect, YellowNet, GeldKarte, and DTAUS discs are currently
|
| 372 | supported. AqBanking is used by GnuCash, KMyMoney, and QBankManager.")
|
| 373 | |
| 374 | (license (list license:gpl2 license:gpl3))))
|