finance.scm 66 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
  3. ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
  4. ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
  5. ;;; Copyright © 2016, 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
  6. ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
  7. ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
  8. ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
  9. ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  10. ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
  11. ;;; Copyright © 2018 Adriano Peluso <catonano@gmail.com>
  12. ;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  13. ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
  14. ;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
  15. ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
  16. ;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
  17. ;;; Copyright © 2019 Sebastian Schott <sschott@mailbox.org>
  18. ;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
  19. ;;; Copyright © 2020 Christine Lemmer-Webber <cwebber@dustycloud.org>
  20. ;;; Copyright © 2020 Tom Zander <tomz@freedommail.ch>
  21. ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
  22. ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
  23. ;;; Copyright © 2020 Carlo Holl <carloholl@gmail.com>
  24. ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
  25. ;;; Copyright © 2021 ZmnSCPxj jxPCSnmZ <ZmnSCPxj@protonmail.com>
  26. ;;; Copyright © 2021 François J <francois-oss@avalenn.eu>
  27. ;;;
  28. ;;; This file is part of GNU Guix.
  29. ;;;
  30. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  31. ;;; under the terms of the GNU General Public License as published by
  32. ;;; the Free Software Foundation; either version 3 of the License, or (at
  33. ;;; your option) any later version.
  34. ;;;
  35. ;;; GNU Guix is distributed in the hope that it will be useful, but
  36. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  37. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  38. ;;; GNU General Public License for more details.
  39. ;;;
  40. ;;; You should have received a copy of the GNU General Public License
  41. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  42. (define-module (gnu packages finance)
  43. #:use-module ((guix licenses) #:prefix license:)
  44. #:use-module (guix packages)
  45. #:use-module (guix download)
  46. #:use-module (guix git-download)
  47. #:use-module (guix build-system gnu)
  48. #:use-module (guix build-system cmake)
  49. #:use-module (guix build-system copy)
  50. #:use-module (guix build-system emacs)
  51. #:use-module (guix build-system haskell)
  52. #:use-module (guix build-system python)
  53. #:use-module (guix build-system glib-or-gtk)
  54. #:use-module (guix build-system go)
  55. #:use-module (guix build-system qt)
  56. #:use-module (guix deprecation)
  57. #:use-module (guix gexp)
  58. #:use-module (guix utils)
  59. #:use-module (gnu packages)
  60. #:use-module (gnu packages aidc)
  61. #:use-module (gnu packages autotools)
  62. #:use-module (gnu packages base)
  63. #:use-module (gnu packages boost)
  64. #:use-module (gnu packages check)
  65. #:use-module (gnu packages compression)
  66. #:use-module (gnu packages crypto)
  67. #:use-module (gnu packages curl)
  68. #:use-module (gnu packages databases)
  69. #:use-module (gnu packages docbook)
  70. #:use-module (gnu packages documentation)
  71. #:use-module (gnu packages dns)
  72. #:use-module (gnu packages emacs)
  73. #:use-module (gnu packages dbm)
  74. #:use-module (gnu packages gettext)
  75. #:use-module (gnu packages gnome)
  76. #:use-module (gnu packages golang)
  77. #:use-module (gnu packages glib)
  78. #:use-module (gnu packages gnupg)
  79. #:use-module (gnu packages graphviz)
  80. #:use-module (gnu packages groff)
  81. #:use-module (gnu packages gtk)
  82. #:use-module (gnu packages haskell-check)
  83. #:use-module (gnu packages haskell-web)
  84. #:use-module (gnu packages haskell-xyz)
  85. #:use-module (gnu packages jemalloc)
  86. #:use-module (gnu packages libedit)
  87. #:use-module (gnu packages libevent)
  88. #:use-module (gnu packages libunwind)
  89. #:use-module (gnu packages libusb)
  90. #:use-module (gnu packages linux)
  91. #:use-module (gnu packages man)
  92. #:use-module (gnu packages multiprecision)
  93. #:use-module (gnu packages networking)
  94. #:use-module (gnu packages pkg-config)
  95. #:use-module (gnu packages popt)
  96. #:use-module (gnu packages protobuf)
  97. #:use-module (gnu packages python)
  98. #:use-module (gnu packages python-build)
  99. #:use-module (gnu packages python-crypto)
  100. #:use-module (gnu packages python-web)
  101. #:use-module (gnu packages python-xyz)
  102. #:use-module (gnu packages qt)
  103. #:use-module (gnu packages readline)
  104. #:use-module (gnu packages sphinx)
  105. #:use-module (gnu packages texinfo)
  106. #:use-module (gnu packages textutils)
  107. #:use-module (gnu packages time)
  108. #:use-module (gnu packages tls)
  109. #:use-module (gnu packages upnp)
  110. #:use-module (gnu packages web)
  111. #:use-module (gnu packages xml)
  112. #:use-module (gnu packages gnuzilla))
  113. (define-public bitcoin-core-0.21
  114. (package
  115. (name "bitcoin-core")
  116. (version "0.21.1")
  117. (source (origin
  118. (method url-fetch)
  119. (uri
  120. (string-append "https://bitcoincore.org/bin/bitcoin-core-"
  121. version "/bitcoin-" version ".tar.gz"))
  122. (sha256
  123. (base32
  124. "1q51nqv64lhng5wh1cqb01jar7iswpnyyb1i7xslbkr0j9227zya"))))
  125. (build-system gnu-build-system)
  126. (native-inputs
  127. `(("autoconf" ,autoconf)
  128. ("automake" ,automake)
  129. ("libtool" ,libtool)
  130. ("pkg-config" ,pkg-config)
  131. ("python" ,python) ; for the tests
  132. ("util-linux" ,util-linux) ; provides the hexdump command for tests
  133. ("qttools" ,qttools)))
  134. (inputs
  135. `(("bdb" ,bdb-4.8) ; 4.8 required for compatibility
  136. ("boost" ,boost)
  137. ("libevent" ,libevent)
  138. ("miniupnpc" ,miniupnpc)
  139. ("openssl" ,openssl)
  140. ("qtbase" ,qtbase-5)))
  141. (arguments
  142. `(#:configure-flags
  143. (list
  144. ;; Boost is not found unless specified manually.
  145. (string-append "--with-boost="
  146. (assoc-ref %build-inputs "boost"))
  147. ;; XXX: The configure script looks up Qt paths by
  148. ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick
  149. ;; up executables residing in 'qttools', so we specify them here.
  150. (string-append "ac_cv_path_LRELEASE="
  151. (assoc-ref %build-inputs "qttools")
  152. "/bin/lrelease")
  153. (string-append "ac_cv_path_LUPDATE="
  154. (assoc-ref %build-inputs "qttools")
  155. "/bin/lupdate"))
  156. #:phases
  157. (modify-phases %standard-phases
  158. (add-before 'configure 'make-qt-deterministic
  159. (lambda _
  160. ;; Make Qt deterministic.
  161. (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
  162. #t))
  163. (add-before 'build 'set-no-git-flag
  164. (lambda _
  165. ;; Make it clear we are not building from within a git repository
  166. ;; (and thus no information regarding this build is available
  167. ;; from git).
  168. (setenv "BITCOIN_GENBUILD_NO_GIT" "1")
  169. #t))
  170. (add-before 'check 'set-home
  171. (lambda _
  172. (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
  173. #t))
  174. (add-after 'check 'check-functional
  175. (lambda _
  176. (invoke
  177. "python3" "./test/functional/test_runner.py"
  178. (string-append "--jobs=" (number->string (parallel-job-count))))
  179. #t)))))
  180. (home-page "https://bitcoin.org/en/")
  181. (synopsis "Bitcoin peer-to-peer client")
  182. (description
  183. "Bitcoin is a digital currency that enables instant payments to anyone
  184. anywhere in the world. It uses peer-to-peer technology to operate without
  185. central authority: managing transactions and issuing money are carried out
  186. collectively by the network. Bitcoin Core is the reference implementation
  187. of the bitcoin protocol. This package provides the Bitcoin Core command
  188. line client and a client based on Qt.")
  189. (license license:expat)))
  190. (define-public bitcoin-core-0.20
  191. (package
  192. (inherit bitcoin-core-0.21)
  193. (version "0.20.1")
  194. (source (origin
  195. (method url-fetch)
  196. (uri
  197. (string-append "https://bitcoincore.org/bin/bitcoin-core-"
  198. version "/bitcoin-" version ".tar.gz"))
  199. (sha256
  200. (base32
  201. "0y5rad68b398arh0abr2wgiwybdw0i5a4dxz9s3fk9fgdbyn5gab"))))))
  202. ;; The support lifetimes for bitcoin-core versions can be found in
  203. ;; <https://bitcoincore.org/en/lifecycle/#schedule>.
  204. (define-public bitcoin-core bitcoin-core-0.21)
  205. (define-public hledger
  206. (package
  207. (name "hledger")
  208. (version "1.14.2")
  209. (source
  210. (origin
  211. (method url-fetch)
  212. (uri (string-append
  213. "https://hackage.haskell.org/package/hledger/hledger-"
  214. version
  215. ".tar.gz"))
  216. (sha256
  217. (base32
  218. "1si9zqparkdq77yji87lhcsrf11fr3gisqwsv82cabhrhc36x6l4"))))
  219. (build-system haskell-build-system)
  220. (inputs
  221. `(("ghc-ansi-terminal" ,ghc-ansi-terminal)
  222. ("ghc-base-compat-batteries" ,ghc-base-compat-batteries)
  223. ("ghc-cmdargs" ,ghc-cmdargs)
  224. ("ghc-data-default" ,ghc-data-default)
  225. ("ghc-decimal" ,ghc-decimal)
  226. ("ghc-diff" ,ghc-diff)
  227. ("ghc-easytest" ,ghc-easytest)
  228. ("ghc-hashable" ,ghc-hashable)
  229. ("ghc-hledger-lib" ,ghc-hledger-lib)
  230. ("ghc-lucid" ,ghc-lucid)
  231. ("ghc-math-functions" ,ghc-math-functions)
  232. ("ghc-megaparsec" ,ghc-megaparsec)
  233. ("ghc-mtl-compat" ,ghc-mtl-compat)
  234. ("ghc-old-time" ,ghc-old-time)
  235. ("ghc-pretty-show" ,ghc-pretty-show)
  236. ("ghc-regex-tdfa" ,ghc-regex-tdfa)
  237. ("ghc-safe" ,ghc-safe)
  238. ("ghc-shakespeare" ,ghc-shakespeare)
  239. ("ghc-split" ,ghc-split)
  240. ("ghc-tabular" ,ghc-tabular)
  241. ("ghc-temporary" ,ghc-temporary)
  242. ("ghc-unordered-containers" ,ghc-unordered-containers)
  243. ("ghc-utf8-string" ,ghc-utf8-string)
  244. ("ghc-utility-ht" ,ghc-utility-ht)
  245. ("ghc-wizards" ,ghc-wizards)))
  246. (native-inputs
  247. `(("ghc-test-framework" ,ghc-test-framework)
  248. ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
  249. (home-page "https://hledger.org")
  250. (synopsis "Command-line interface for the hledger accounting system")
  251. (description
  252. "The command-line interface for the hledger accounting system. Its basic
  253. function is to read a plain text file describing financial transactions and
  254. produce useful reports.
  255. hledger is a robust, cross-platform set of tools for tracking money, time, or
  256. any other commodity, using double-entry accounting and a simple, editable file
  257. format, with command-line, terminal and web interfaces. It is a Haskell
  258. rewrite of Ledger, and one of the leading implementations of Plain Text
  259. Accounting.")
  260. (license license:gpl3)))
  261. (define-public homebank
  262. (package
  263. (name "homebank")
  264. (version "5.5.3")
  265. (source (origin
  266. (method url-fetch)
  267. (uri (string-append "http://homebank.free.fr/public/homebank-"
  268. version ".tar.gz"))
  269. (sha256
  270. (base32
  271. "14qhv79a2waqzmf6l571wklgwq8j1pkmjvzkj5vhh44nia8hfdh7"))))
  272. (build-system glib-or-gtk-build-system)
  273. (native-inputs
  274. `(("pkg-config" ,pkg-config)
  275. ("intltool" ,intltool)))
  276. (inputs
  277. `(("gtk+" ,gtk+)
  278. ("libofx" ,libofx)
  279. ("libsoup" ,libsoup)))
  280. (home-page "http://homebank.free.fr/")
  281. (synopsis "Graphical personal accounting application")
  282. (description "HomeBank allows you to manage your personal accounts at
  283. home. The seeks to be lightweight, simple and easy to use. It brings
  284. features that allow you to analyze your finances in a detailed way instantly
  285. and dynamically with report tools based on filtering and graphical charts.")
  286. (license license:gpl2+)))
  287. (define-public ledger
  288. (package
  289. (name "ledger")
  290. (version "3.2.1")
  291. (source
  292. (origin
  293. (method git-fetch)
  294. (uri (git-reference
  295. (url "https://github.com/ledger/ledger")
  296. (commit (string-append "v" version))))
  297. (file-name (git-file-name name version))
  298. (sha256
  299. (base32 "0x6jxwss3wwzbzlwmnwb8yzjk8f9wfawif4f1b74z2qg6hc4r7f6"))))
  300. (build-system cmake-build-system)
  301. (arguments
  302. `(#:modules (,@%cmake-build-system-modules
  303. ((guix build python-build-system) #:select (python-version)))
  304. #:imported-modules (,@%cmake-build-system-modules
  305. (guix build python-build-system))
  306. #:configure-flags
  307. `("-DBUILD_DOCS:BOOL=ON"
  308. "-DBUILD_WEB_DOCS:BOOL=ON"
  309. "-DUSE_PYTHON:BOOL=ON"
  310. "-DCMAKE_INSTALL_LIBDIR:PATH=lib")
  311. #:phases
  312. (modify-phases (@ (guix build cmake-build-system) %standard-phases)
  313. (add-after 'unpack 'fix-python-installation-directory
  314. (lambda* (#:key inputs outputs #:allow-other-keys)
  315. ;; By default the package attempts to install its Python bindings
  316. ;; to the Python store directory, which obviously does not work.
  317. ;; Passing -DPython_SITEARCH in #:configure-flags has no effect.
  318. (let ((python-version (python-version (assoc-ref inputs "python")))
  319. (out (assoc-ref outputs "out")))
  320. (substitute* "src/CMakeLists.txt"
  321. (("DESTINATION \\$\\{Python_SITEARCH\\}")
  322. (string-append "DESTINATION " out "/lib/python"
  323. python-version "/site-packages")))
  324. #t)))
  325. (add-before 'configure 'install-examples
  326. (lambda* (#:key outputs #:allow-other-keys)
  327. (let ((examples (string-append (assoc-ref outputs "out")
  328. "/share/doc/ledger/examples")))
  329. (install-file "test/input/sample.dat" examples)
  330. (install-file "test/input/demo.ledger" examples))
  331. #t))
  332. (add-after 'build 'build-doc
  333. (lambda _ (invoke "make" "doc")))
  334. (add-before 'check 'check-setup
  335. ;; One test fails if it can't set the timezone.
  336. (lambda* (#:key inputs #:allow-other-keys)
  337. (setenv "TZDIR"
  338. (search-input-directory inputs
  339. "share/zoneinfo"))
  340. ;; Skip failing test BaselineTest_cmd-org.
  341. ;; This is a known upstream issue. See
  342. ;; https://github.com/ledger/ledger/issues/550
  343. (setenv "ARGS" "-E BaselineTest_cmd-org")
  344. #t)))))
  345. (inputs
  346. `(("boost" ,boost)
  347. ("gmp" ,gmp)
  348. ("libedit" ,libedit)
  349. ("mpfr" ,mpfr)
  350. ("python" ,python)
  351. ("utfcpp" ,utfcpp)))
  352. (native-inputs
  353. `(("groff" ,groff)
  354. ("texinfo" ,texinfo)
  355. ("tzdata" ,tzdata-for-tests)))
  356. (home-page "https://ledger-cli.org/")
  357. (synopsis "Command-line double-entry accounting program")
  358. (description
  359. "Ledger is a powerful, double-entry accounting system that is
  360. accessed from the UNIX command-line. This may put off some users, since
  361. there is no flashy UI, but for those who want unparalleled reporting
  362. access to their data there are few alternatives.
  363. Ledger uses text files for input. It reads the files and generates
  364. reports; there is no other database or stored state. To use Ledger,
  365. you create a file of your account names and transactions, run from the
  366. command line with some options to specify input and requested reports, and
  367. get output. The output is generally plain text, though you could generate
  368. a graph or html instead. Ledger is simple in concept, surprisingly rich
  369. in ability, and easy to use.")
  370. ;; There are some extra licenses in files which do not presently get
  371. ;; installed when you build this package. Different versions of the GPL
  372. ;; are used in the contrib and python subdirectories. The bundled version
  373. ;; of utfcpp is under the Boost 1.0 license. Also the file
  374. ;; `tools/update_copyright_year` has an Expat license.
  375. (license (list license:bsd-3
  376. license:asl2.0 ; src/strptime.cc
  377. (license:non-copyleft
  378. "file://src/wcwidth.cc"
  379. "See src/wcwidth.cc in the distribution.")))))
  380. (define-public emacs-ledger-mode
  381. (package
  382. (name "emacs-ledger-mode")
  383. (version "4.0.0")
  384. (source
  385. (origin
  386. (method git-fetch)
  387. (uri (git-reference
  388. (url "https://github.com/ledger/ledger-mode")
  389. (commit (string-append "v" version))))
  390. (file-name (git-file-name name version))
  391. (sha256
  392. (base32 "1r5rcyxd6d1rqwamzpvqdbkbdf1zbj75aaciqijrklnm59ps244y"))))
  393. (build-system emacs-build-system)
  394. (arguments
  395. `(;; ledger-test.el is needed at runtime (but probably not for a good reason).
  396. #:exclude '()
  397. #:phases
  398. (modify-phases %standard-phases
  399. (add-after 'unpack 'patch-path
  400. (lambda* (#:key inputs #:allow-other-keys)
  401. (let ((ledger (assoc-ref inputs "ledger")))
  402. (make-file-writable "ledger-exec.el")
  403. (emacs-substitute-variables "ledger-exec.el"
  404. ("ledger-binary-path" (string-append ledger "/bin/ledger"))))
  405. #t))
  406. (add-after 'build 'build-doc
  407. (lambda* (#:key outputs #:allow-other-keys)
  408. (let ((target (string-append (assoc-ref outputs "out")
  409. "/share/info")))
  410. (mkdir-p target)
  411. (invoke "makeinfo" "-o" target
  412. "../source/doc/ledger-mode.texi"))
  413. #t))
  414. (replace 'check
  415. (lambda _
  416. (with-directory-excursion "../source/test"
  417. (invoke "make" "test-batch")))))))
  418. (inputs
  419. `(("ledger" ,ledger)))
  420. (native-inputs
  421. `(("texinfo" ,texinfo)))
  422. (home-page "https://ledger-cli.org/")
  423. (synopsis "Command-line double-entry accounting program")
  424. (description
  425. "Ledger is a powerful, double-entry accounting system that is
  426. accessed from the UNIX command-line. This may put off some users, since
  427. there is no flashy UI, but for those who want unparalleled reporting
  428. access to their data there are few alternatives.
  429. Ledger uses text files for input. It reads the files and generates
  430. reports; there is no other database or stored state. To use Ledger,
  431. you create a file of your account names and transactions, run from the
  432. command line with some options to specify input and requested reports, and
  433. get output. The output is generally plain text, though you could generate
  434. a graph or html instead. Ledger is simple in concept, surprisingly rich
  435. in ability, and easy to use.
  436. This package provides the Emacs mode.")
  437. (license license:gpl2+)))
  438. (define-public geierlein
  439. (package
  440. (name "geierlein")
  441. (version "0.9.13")
  442. (source
  443. (origin
  444. (method git-fetch)
  445. (uri (git-reference
  446. (url "https://github.com/stesie/geierlein")
  447. (commit (string-append "V" version))))
  448. (file-name (git-file-name name version))
  449. (sha256
  450. (base32 "00zpwr3lk2vdmd60fgdwdk0xxs52wvnm19ln2m75yfphydvkglic"))))
  451. (build-system gnu-build-system)
  452. (arguments
  453. `(#:tests? #f ; would require npm, python and a lot more
  454. #:phases
  455. (modify-phases %standard-phases
  456. (delete 'configure) ; no configure script
  457. (add-after 'unpack 'override-target-directory-and-tool-paths
  458. (lambda* (#:key inputs outputs #:allow-other-keys)
  459. (substitute* "Makefile"
  460. (("prefix := .*")
  461. (string-append "prefix := " (assoc-ref outputs "out") "\n"))
  462. ;; Required for tests, unused for now:
  463. ;;(("PYTHON := .*")
  464. ;; (string-append (which "python") "\n")))
  465. (("INSTALL := .*")
  466. (string-append "INSTALL := " (which "install") "\n")))
  467. (substitute* "bin/xgeierlein.in"
  468. ;; Use icecat as XULRUNNER
  469. (("^for search ")
  470. (string-append "XULRUNNER=" (which "icecat") "\n"
  471. "for search ")))
  472. #t)))))
  473. (inputs
  474. `(("icecat" ,icecat)))
  475. (home-page "https://stesie.github.io/geierlein/")
  476. (synopsis "Free Elster client, for sending Germany VAT declarations")
  477. (description
  478. "Geierlein is a free Elster client, i.e. an application that
  479. sends VAT declarations to Germany's fiscal authorities.
  480. Currently it is *not* possible to send returns that are due annually
  481. (especially the income tax return) since the fiscal authority doesn't
  482. allow doing that off the ERiC library (which is proprietary however).
  483. It's not clear at the moment whether one day it will be possible to
  484. do so.")
  485. (license license:agpl3+)))
  486. (define-public electrum
  487. (package
  488. (name "electrum")
  489. (version "4.1.5")
  490. (source
  491. (origin
  492. (method url-fetch)
  493. (uri (string-append "https://download.electrum.org/"
  494. version "/Electrum-"
  495. version ".tar.gz"))
  496. (sha256
  497. (base32 "188r4zji985z8pm9b942xhmvv174yndk6jxagxl7ljk03wl2wiwi"))
  498. (modules '((guix build utils)))
  499. (snippet
  500. '(begin
  501. ;; Delete the bundled dependencies.
  502. (delete-file-recursively "packages")
  503. #t))))
  504. (build-system python-build-system)
  505. (inputs
  506. `(("python-pyqt" ,python-pyqt)
  507. ("python-qrcode" ,python-qrcode)
  508. ("python-protobuf" ,python-protobuf)
  509. ("python-aiohttp" ,python-aiohttp)
  510. ("python-aiohttp-socks" ,python-aiohttp-socks)
  511. ("python-aiorpcx" ,python-aiorpcx-0.18)
  512. ("python-certifi" ,python-certifi)
  513. ("python-bitstring" ,python-bitstring)
  514. ("python-attrs" ,python-attrs)
  515. ("python-cryptography" ,python-cryptography)
  516. ("python-qdarkstyle" ,python-qdarkstyle)
  517. ("python-dnspython" ,python-dnspython)
  518. ("python-hidapi" ,python-hidapi)
  519. ("python-ledgerblue" ,python-ledgerblue)
  520. ("python-btchip-python" ,python-btchip-python)
  521. ("libsecp256k1" ,libsecp256k1)))
  522. (arguments
  523. `(#:tests? #f ; no tests
  524. #:phases
  525. (modify-phases %standard-phases
  526. (add-after 'unpack 'fix-prefix
  527. (lambda* (#:key outputs #:allow-other-keys)
  528. (let ((out (assoc-ref outputs "out")))
  529. ;; setup.py installs to ~/.local/share if sys.prefix/share isn't
  530. ;; writable. sys.prefix points to Python's, not our, --prefix.
  531. (mkdir-p (string-append out "/share"))
  532. (substitute* "setup.py"
  533. (("sys\\.prefix")
  534. (format #f "\"~a\"" out)))
  535. #t)))
  536. (add-after 'unpack 'use-libsecp256k1-input
  537. (lambda* (#:key inputs #:allow-other-keys)
  538. (substitute* "electrum/ecc_fast.py"
  539. (("library_paths = .* 'libsecp256k1.so.0'.")
  540. (string-append "library_paths = ('"
  541. (assoc-ref inputs "libsecp256k1")
  542. "/lib/libsecp256k1.so.0'"))))))))
  543. (home-page "https://electrum.org/")
  544. (synopsis "Bitcoin wallet")
  545. (description
  546. "Electrum is a lightweight Bitcoin client, based on a client-server
  547. protocol. It supports Simple Payment Verification (SPV) and deterministic key
  548. generation from a seed. Your secret keys are encrypted and are never sent to
  549. other machines/servers. Electrum does not download the Bitcoin blockchain.")
  550. (license license:expat)))
  551. (define-public electron-cash
  552. (package
  553. (name "electron-cash")
  554. (version "4.2.5")
  555. (source
  556. (origin
  557. (method git-fetch)
  558. (uri (git-reference
  559. (url "https://github.com/Electron-Cash/Electron-Cash")
  560. (commit version)))
  561. (file-name (git-file-name name version))
  562. (sha256
  563. (base32 "1fj797hbinxsqjwhh4l1vjsx1vzmgzf2apq7fnqqwpv9g0v2pch0"))))
  564. (build-system python-build-system)
  565. (inputs
  566. `(("libevent" ,libevent)
  567. ("libsecp256k1" ,libsecp256k1-bitcoin-cash)
  568. ("openssl" ,openssl)
  569. ("python-cython" ,python-cython)
  570. ("python-dateutil" ,python-dateutil)
  571. ("python-dnspython" ,python-dnspython)
  572. ("python-ecdsa" ,python-ecdsa)
  573. ("python-hidapi" ,python-hidapi)
  574. ("python-jsonrpclib-pelix" ,python-jsonrpclib-pelix)
  575. ("python-keepkey" ,python-keepkey)
  576. ("python-pathvalidate" ,python-pathvalidate)
  577. ("python-protobuf" ,python-protobuf)
  578. ("python-pyaes" ,python-pyaes)
  579. ("python-pyqt" ,python-pyqt)
  580. ("python-pysocks" ,python-pysocks)
  581. ("python-qdarkstyle" ,python-qdarkstyle)
  582. ("python-qrcode" ,python-qrcode)
  583. ("python-requests" ,python-requests)
  584. ("python-stem" ,python-stem)
  585. ("python-trezor" ,python-trezor)
  586. ("qtsvg" ,qtsvg)
  587. ("zlib" ,zlib)))
  588. (arguments
  589. `(#:tests? #f ; no tests
  590. #:modules ((guix build python-build-system)
  591. (guix build qt-utils)
  592. (guix build utils))
  593. #:imported-modules (,@%python-build-system-modules
  594. (guix build qt-utils))
  595. #:phases
  596. (modify-phases %standard-phases
  597. (add-after 'unpack 'create-output-directories
  598. (lambda* (#:key outputs #:allow-other-keys)
  599. ;; setup.py installs to ~/.local/share if this doesn't exist.
  600. (mkdir-p (string-append (assoc-ref outputs "out") "/share"))))
  601. (add-after 'unpack 'use-libsecp256k1-input
  602. (lambda* (#:key inputs #:allow-other-keys)
  603. (substitute* "electroncash/secp256k1.py"
  604. (("library_paths = .* 'libsecp256k1.so.0'.")
  605. (string-append "library_paths = ('"
  606. (assoc-ref inputs "libsecp256k1")
  607. "/lib/libsecp256k1.so.0'")))))
  608. (add-after 'unpack 'relax-requirements
  609. (lambda _
  610. (substitute* "contrib/requirements/requirements.txt"
  611. (("qdarkstyle==2\\.6\\.8")
  612. "qdarkstyle"))))
  613. (add-after 'install 'wrap-qt
  614. (lambda* (#:key outputs inputs #:allow-other-keys)
  615. (let ((out (assoc-ref outputs "out")))
  616. (wrap-qt-program "electron-cash" #:output out #:inputs inputs))
  617. #t)))))
  618. (home-page "https://electroncash.org/")
  619. (synopsis "Bitcoin Cash wallet")
  620. (description
  621. "Electroncash is a lightweight Bitcoin Cash client, based on a client-server
  622. protocol. It supports Simple Payment Verification (SPV) and deterministic key
  623. generation from a seed. Your secret keys are encrypted and are never sent to
  624. other machines/servers. Electroncash does not download the Bitcoin Cash blockchain.")
  625. (license license:expat)))
  626. (define-public monero
  627. ;; This package bundles easylogging++ and lmdb.
  628. ;; The bundled easylogging++ is modified, and the changes will not be
  629. ;; upstreamed.
  630. ;; The devs deem the lmdb driver too critical a consenus component, to use
  631. ;; the system's dynamically linked library.
  632. (package
  633. (name "monero")
  634. (version "0.17.2.3")
  635. (source
  636. (origin
  637. (method git-fetch)
  638. (uri (git-reference
  639. (url "https://github.com/monero-project/monero")
  640. (commit (string-append "v" version))
  641. (recursive? #t)))
  642. (file-name (git-file-name name version))
  643. (patches (search-patches "monero-use-system-miniupnpc.patch"))
  644. (modules '((guix build utils)))
  645. (snippet
  646. '(begin
  647. ;; Delete bundled dependencies.
  648. (for-each
  649. delete-file-recursively
  650. '("external/miniupnp" "external/rapidjson"
  651. "external/unbound"))
  652. ;; TODO: Remove the following when upgrading to a newer tagged
  653. ;; version as it will already contain the fix for Boost 1.76.
  654. (substitute* "contrib/epee/include/storages/portable_storage.h"
  655. (("#include \"int-util.h\"" all)
  656. (string-append all "\n#include <boost/mpl/contains.hpp>")))
  657. #t))
  658. (sha256
  659. (base32 "0nax991fshfh51grhh2ryfrwwws35k16gzl1l3niva28zff2xmq6"))))
  660. (build-system cmake-build-system)
  661. (native-inputs
  662. `(("doxygen" ,doxygen)
  663. ("graphviz" ,graphviz)
  664. ("pkg-config" ,pkg-config)
  665. ("protobuf" ,protobuf)
  666. ("python" ,python)
  667. ("qttools" ,qttools)))
  668. (inputs
  669. `(("boost" ,boost)
  670. ("cppzmq" ,cppzmq)
  671. ("expat" ,expat)
  672. ("hidapi" ,hidapi)
  673. ("libsodium" ,libsodium)
  674. ("libunwind" ,libunwind)
  675. ("libusb" ,libusb)
  676. ("miniupnpc" ,miniupnpc)
  677. ("openssl" ,openssl)
  678. ("protobuf" ,protobuf)
  679. ("rapidjson" ,rapidjson)
  680. ("readline" ,readline)
  681. ("unbound" ,unbound)
  682. ("xz" ,xz)
  683. ("zeromq" ,zeromq)))
  684. (arguments
  685. `(#:out-of-source? #t
  686. #:configure-flags
  687. (list "-DARCH=default"
  688. "-DBUILD_TESTS=ON"
  689. (string-append "-DReadline_ROOT_DIR="
  690. (assoc-ref %build-inputs "readline")))
  691. #:phases
  692. (modify-phases %standard-phases
  693. ;; tests/core_tests need a valid HOME
  694. (add-before 'configure 'set-home
  695. (lambda _
  696. (setenv "HOME" (getcwd))
  697. #t))
  698. (add-after 'set-home 'change-log-path
  699. (lambda _
  700. (substitute* "contrib/epee/src/mlog.cpp"
  701. (("epee::string_tools::get_current_module_folder\\(\\)")
  702. "\".bitmonero\"")
  703. (("return \\(")
  704. "return ((std::string(getenv(\"HOME\"))) / "))
  705. #t))
  706. (add-after 'change-log-path 'fix-file-permissions-for-tests
  707. (lambda _
  708. (for-each make-file-writable
  709. (find-files "tests/data/" "wallet_9svHk1.*"))
  710. #t))
  711. ;; Only try tests that don't need access to network or system
  712. (replace 'check
  713. (lambda _
  714. ;; Core tests sometimes fail, at least on i686-linux.
  715. ;; Let's disable them for now and just try hash tests
  716. ;; and unit tests.
  717. ;; (invoke "make" "ARGS=-R 'hash|core_tests' --verbose" "test")))
  718. (invoke "make" "ARGS=-R 'hash' --verbose" "test")))
  719. (add-after 'check 'unit-tests
  720. (lambda _
  721. (let ((excluded-unit-tests
  722. (string-join
  723. '("AddressFromURL.Success"
  724. "AddressFromURL.Failure"
  725. "DNSResolver.IPv4Success"
  726. "DNSResolver.DNSSECSuccess"
  727. "DNSResolver.DNSSECFailure"
  728. "DNSResolver.GetTXTRecord"
  729. "is_hdd.linux_os_root")
  730. ":")))
  731. (invoke "tests/unit_tests/unit_tests"
  732. (string-append "--gtest_filter=-"
  733. excluded-unit-tests)))))
  734. (add-after 'install 'delete-unused-files
  735. (lambda* (#:key outputs #:allow-other-keys)
  736. (let ((out (assoc-ref outputs "out")))
  737. (delete-file-recursively (string-append out "/include")))
  738. #t)))))
  739. (home-page "https://web.getmonero.org/")
  740. (synopsis "Command-line interface to the Monero currency")
  741. (description
  742. "Monero is a secure, private, untraceable currency. This package provides
  743. the Monero command line client and daemon.")
  744. (license license:bsd-3)))
  745. (define-public monero-gui
  746. (package
  747. (name "monero-gui")
  748. (version "0.17.2.3")
  749. (source
  750. (origin
  751. (method git-fetch)
  752. (uri (git-reference
  753. (url "https://github.com/monero-project/monero-gui")
  754. (commit (string-append "v" version))
  755. (recursive? #t)))
  756. (file-name (git-file-name name version))
  757. (modules '((guix build utils)))
  758. (snippet
  759. '(begin
  760. ;; Delete bundled monero sources, we already have them.
  761. ;; See the 'extract-monero-sources' phase.
  762. (delete-file-recursively "monero")
  763. #t))
  764. (sha256
  765. (base32 "0qb746z1sxqrja7q9lqhhbm64v83sn67az4k7gs5q90iaw584qfc"))))
  766. (build-system qt-build-system)
  767. (native-inputs
  768. `(,@(package-native-inputs monero)
  769. ("monero-source" ,(package-source monero))))
  770. (inputs
  771. `(,@(package-inputs monero)
  772. ("libgcrypt" ,libgcrypt)
  773. ("monero" ,monero)
  774. ("qtbase" ,qtbase-5)
  775. ("qtdeclarative" ,qtdeclarative)
  776. ("qtgraphicaleffects" ,qtgraphicaleffects)
  777. ("qtquickcontrols" ,qtquickcontrols)
  778. ("qtquickcontrols2",qtquickcontrols2)
  779. ("qtsvg" ,qtsvg)
  780. ("qtxmlpatterns" ,qtxmlpatterns)))
  781. (arguments
  782. `(#:tests? #f ; No tests
  783. #:configure-flags
  784. ,#~(list "-DARCH=default"
  785. "-DENABLE_PASS_STRENGTH_METER=ON"
  786. (string-append "-DReadline_ROOT_DIR="
  787. #$(this-package-input "readline")))
  788. #:phases
  789. (modify-phases %standard-phases
  790. (add-after 'unpack 'extract-monero-sources
  791. ;; Some of the monero package source code is required
  792. ;; to build the GUI.
  793. (lambda* (#:key inputs #:allow-other-keys)
  794. (mkdir-p "monero")
  795. (copy-recursively (assoc-ref inputs "monero-source")
  796. "monero")))
  797. (add-after 'extract-monero-sources 'fix-build
  798. (lambda _
  799. (substitute* "src/version.js.in"
  800. (("@VERSION_TAG_GUI@")
  801. ,version))
  802. (substitute* "external/CMakeLists.txt"
  803. (("add_library\\(quirc" all)
  804. (string-append
  805. "set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -fPIC\")\n"
  806. all)))))
  807. (replace 'install
  808. (lambda* (#:key outputs #:allow-other-keys)
  809. (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
  810. (mkdir-p bin)
  811. (install-file "../build/bin/monero-wallet-gui" bin))))
  812. (add-after 'qt-wrap 'install-monerod-link
  813. ;; The monerod program must be available so that monero-wallet-gui
  814. ;; can start a Monero daemon if necessary.
  815. (lambda* (#:key inputs outputs #:allow-other-keys)
  816. (symlink (search-input-file inputs "/bin/monerod")
  817. (string-append (assoc-ref outputs "out")
  818. "/bin/monerod")))))))
  819. (home-page "https://web.getmonero.org/")
  820. (synopsis "Graphical user interface for the Monero currency")
  821. (description
  822. "Monero is a secure, private, untraceable currency. This package provides
  823. the Monero GUI client.")
  824. (license license:bsd-3)))
  825. (define-public python-trezor-agent
  826. (package
  827. (name "python-trezor-agent")
  828. (version "0.13.1")
  829. (source
  830. (origin
  831. (method git-fetch)
  832. (uri (git-reference
  833. (url "https://github.com/romanz/trezor-agent")
  834. (commit (string-append "v" version))))
  835. (file-name (git-file-name name version))
  836. (sha256
  837. (base32 "0q99vbfd3h85s8rnjipnmldixabqmmlk5w9karv6f0rhyi54f4zv"))))
  838. (build-system python-build-system)
  839. (arguments
  840. `(#:phases
  841. (modify-phases %standard-phases
  842. (add-after 'unpack 'remove-requires-backports-shutil-which
  843. ;; Remove requires on backport of shutil_which, as python 3.4+ has
  844. ;; a built-in implementation supported in python-trezor-agent.
  845. (lambda _
  846. (substitute* "setup.py"
  847. (("'backports.shutil_which>=3.5.1',") ""))
  848. #t))
  849. (delete 'check)
  850. (add-after 'install 'check
  851. (lambda* (#:key outputs inputs #:allow-other-keys)
  852. ;; Make installed package available for running the tests.
  853. (add-installed-pythonpath inputs outputs)
  854. (invoke "py.test"))))))
  855. (propagated-inputs
  856. `(("python-configargparse" ,python-configargparse)
  857. ("python-daemon" ,python-daemon)
  858. ("python-docutils" ,python-docutils)
  859. ("python-ecdsa" ,python-ecdsa)
  860. ("python-ed25519" ,python-ed25519)
  861. ("python-mnemonic" ,python-mnemonic)
  862. ("python-pymsgbox" ,python-pymsgbox)
  863. ("python-semver" ,python-semver)
  864. ("python-unidecode" ,python-unidecode)
  865. ("python-wheel" ,python-wheel)))
  866. (native-inputs
  867. `(("gnupg" ,gnupg)
  868. ("python-mock" ,python-mock)
  869. ("python-pytest" ,python-pytest)))
  870. (home-page "https://github.com/romanz/trezor-agent")
  871. (synopsis "Use hardware wallets as SSH and GPG agent")
  872. (description
  873. "@code{libagent} is a library that allows using TREZOR, Keepkey and
  874. Ledger Nano as a hardware SSH/GPG agent.")
  875. (license license:lgpl3)))
  876. (define-public python-mnemonic
  877. (package
  878. (name "python-mnemonic")
  879. (version "0.19")
  880. (source
  881. (origin
  882. (method url-fetch)
  883. (uri (pypi-uri "mnemonic" version))
  884. (sha256
  885. (base32 "0cd9prmdj8wzdmc7lxbf9lz0xrlkvak5ignag406mmfbn81fndsf"))))
  886. (build-system python-build-system)
  887. (propagated-inputs
  888. `(("python-pbkdf2" ,python-pbkdf2)))
  889. (home-page "https://github.com/trezor/python-mnemonic")
  890. (synopsis "Implementation of Bitcoin BIP-0039")
  891. (description "@code{mnemonic} is a library that provides an implementation
  892. of Bitcoin BIP-0039.")
  893. (license license:expat)))
  894. (define-public python2-mnemonic
  895. (package-with-python2 python-mnemonic))
  896. (define-public python-ledgerblue
  897. (package
  898. (name "python-ledgerblue")
  899. (version "0.1.16")
  900. (source
  901. (origin
  902. (method url-fetch)
  903. (uri (pypi-uri "ledgerblue" version))
  904. (sha256
  905. (base32
  906. "010mghaqh1cmz3a0ifc3f40mmyplilwlw7kpha2mzyrrff46p9gb"))))
  907. (build-system python-build-system)
  908. (propagated-inputs
  909. `(("python-ecpy" ,python-ecpy)
  910. ("python-future" ,python-future)
  911. ("python-hidapi" ,python-hidapi)
  912. ("python-pillow" ,python-pillow)
  913. ("python-protobuf" ,python-protobuf)
  914. ("python-pycrypto" ,python-pycrypto)))
  915. (home-page "https://github.com/LedgerHQ/blue-loader-python")
  916. (synopsis "Python library to communicate with Ledger Blue/Nano S")
  917. (description "@code{ledgerblue} is a Python library to communicate with
  918. Ledger Blue/Nano S.")
  919. (license license:asl2.0)))
  920. (define-public python2-ledgerblue
  921. (package-with-python2 python-ledgerblue))
  922. (define-public python-btchip-python
  923. (package
  924. (name "python-btchip-python")
  925. (version "0.1.32")
  926. (source
  927. (origin
  928. (method url-fetch)
  929. (uri (pypi-uri "btchip-python" version))
  930. (sha256
  931. (base32
  932. "0mcg3gfd0qk8lhral3vy9cfd4pii9kzs42q71pf6b3y0c70y1x9l"))))
  933. (build-system python-build-system)
  934. (arguments
  935. `(#:tests? #f)) ; those require PyQt4
  936. (propagated-inputs
  937. `(("python-ecdsa" ,python-ecdsa)
  938. ("python-hidapi" ,python-hidapi)))
  939. (home-page "https://github.com/LedgerHQ/btchip-python")
  940. (synopsis "Python library to communicate with Ledger Nano dongle")
  941. (description
  942. "This package provides a Python library to communicate with Ledger
  943. Nano dongle.")
  944. (license license:asl2.0)))
  945. (define-public python-trezor
  946. (package
  947. (name "python-trezor")
  948. (version "0.12.1")
  949. (source
  950. (origin
  951. (method url-fetch)
  952. (uri (pypi-uri "trezor" version))
  953. (sha256
  954. (base32 "1w19m9lws55k9sjhras47hpfpqwq1jm5vy135nj65yhkblygqg19"))))
  955. (build-system python-build-system)
  956. (propagated-inputs
  957. `(("python-click" ,python-click)
  958. ("python-construct" ,python-construct)
  959. ("python-ecdsa" ,python-ecdsa)
  960. ("python-libusb1" ,python-libusb1)
  961. ("python-mnemonic" ,python-mnemonic)
  962. ("python-requests" ,python-requests)
  963. ("python-typing-extensions" ,python-typing-extensions)))
  964. (native-inputs
  965. ;; For tests.
  966. `(("protobuf" ,protobuf)
  967. ("python-black" ,python-black)
  968. ("python-protobuf" ,python-protobuf)
  969. ("python-isort" ,python-isort)
  970. ("python-pyqt" ,python-pyqt)
  971. ("python-pytest" ,python-pytest)))
  972. (home-page "https://github.com/trezor/python-trezor")
  973. (synopsis "Python library for communicating with TREZOR Hardware Wallet")
  974. (description "@code{trezor} is a Python library for communicating with
  975. TREZOR Hardware Wallet.")
  976. (license license:lgpl3)))
  977. (define-public python-keepkey
  978. (package
  979. (name "python-keepkey")
  980. (version "6.0.3")
  981. (source
  982. (origin
  983. (method url-fetch)
  984. (uri (pypi-uri "keepkey" version))
  985. (sha256
  986. (base32
  987. "0z3d0m6364v9dv0njs4cd5m5ai6j6v35xaaxfxl90m9vmyxy81vd"))))
  988. (build-system python-build-system)
  989. (arguments
  990. `(#:phases
  991. (modify-phases %standard-phases
  992. (delete 'check)
  993. (add-after 'install 'check
  994. (lambda* (#:key inputs outputs #:allow-other-keys)
  995. (add-installed-pythonpath inputs outputs)
  996. (apply invoke "python" (find-files "tests/unit" "\\.py$")))))))
  997. (propagated-inputs
  998. `(("python-ecdsa" ,python-ecdsa)
  999. ("python-hidapi" ,python-hidapi)
  1000. ("python-libusb1" ,python-libusb1)
  1001. ("python-mnemonic" ,python-mnemonic)
  1002. ("python-protobuf" ,python-protobuf)))
  1003. (home-page "https://github.com/keepkey/python-keepkey")
  1004. (synopsis "Python library for communicating with KeepKey Hardware Wallet")
  1005. (description "@code{keepkey} is a Python library for communicating with
  1006. the KeepKey Hardware Wallet.")
  1007. (license license:lgpl3)))
  1008. (define-public python2-keepkey
  1009. (package-with-python2 python-keepkey))
  1010. (define-public ledger-agent
  1011. (package
  1012. (name "ledger-agent")
  1013. (version "0.9.0")
  1014. (source
  1015. (origin
  1016. (method url-fetch)
  1017. (uri (pypi-uri "ledger_agent" version))
  1018. (sha256
  1019. (base32
  1020. "03zj602m2rln9yvr08dswy56vzkbldp8b074ixwzz525dafblr92"))))
  1021. (build-system python-build-system)
  1022. (inputs
  1023. `(("python-ledgerblue" ,python-ledgerblue)
  1024. ("python-trezor-agent" ,python-trezor-agent)))
  1025. (home-page "https://github.com/romanz/trezor-agent")
  1026. (synopsis "Ledger as hardware SSH/GPG agent")
  1027. (description "This package allows using Ledger as hardware SSH/GPG agent.")
  1028. (license license:lgpl3)))
  1029. (define-public trezor-agent
  1030. (package
  1031. (name "trezor-agent")
  1032. (version "0.10.0")
  1033. (source
  1034. (origin
  1035. (method url-fetch)
  1036. (uri (pypi-uri "trezor_agent" version))
  1037. (sha256
  1038. (base32
  1039. "144657c7bn0a667dq5fv5r6j7iilxf3h9agj29v1m2qpq40g0az8"))))
  1040. (arguments
  1041. ;; Tests fail with "AttributeError: module 'attr' has no attribute 's'".
  1042. `(#:phases
  1043. (modify-phases %standard-phases
  1044. (add-after 'wrap 'fixup-agent-py
  1045. (lambda* (#:key inputs outputs #:allow-other-keys)
  1046. (let* ((out (assoc-ref outputs "out")))
  1047. ;; overwrite the wrapper with the real thing.
  1048. (install-file "./trezor_agent.py"
  1049. (string-append out "/bin"))
  1050. #t))))))
  1051. (build-system python-build-system)
  1052. (inputs
  1053. `(("python-trezor" ,python-trezor)
  1054. ("python-trezor-agent" ,python-trezor-agent)))
  1055. (native-inputs
  1056. `(("python-hidapi" ,python-hidapi)))
  1057. (home-page "https://github.com/romanz/trezor-agent")
  1058. (synopsis "Using Trezor as hardware SSH/GPG agent")
  1059. (description "This package allows using Trezor as a hardware SSH/GPG
  1060. agent.")
  1061. (license license:lgpl3)))
  1062. (define-public keepkey-agent
  1063. (package
  1064. (name "keepkey-agent")
  1065. (version "0.9.0")
  1066. (source
  1067. (origin
  1068. (method url-fetch)
  1069. (uri (pypi-uri "keepkey_agent" version))
  1070. (sha256
  1071. (base32
  1072. "03779gvlx70i0nnry98i4pl1d92604ix5x6jgdfkrdgzqbh5vj27"))))
  1073. (build-system python-build-system)
  1074. (inputs
  1075. `(("python-keepkey" ,python-keepkey)
  1076. ("python-trezor-agent" ,python-trezor-agent)))
  1077. (home-page "https://github.com/romanz/trezor-agent")
  1078. (synopsis "KeepKey as hardware SSH/GPG agent")
  1079. (description "This package allows using KeepKey as a hardware SSH/GPG
  1080. agent.")
  1081. (license license:lgpl3)))
  1082. (define-public python-stdnum
  1083. (package
  1084. (name "python-stdnum")
  1085. (version "1.14")
  1086. (source
  1087. (origin
  1088. (method url-fetch)
  1089. (uri (pypi-uri "python-stdnum" version))
  1090. (sha256
  1091. (base32 "070vd9zgvq0jchs4xc4j1h4r1l1lg4wwb8xs3p25k8c2xjw94fpx"))))
  1092. (build-system python-build-system)
  1093. (arguments
  1094. '(#:phases (modify-phases %standard-phases
  1095. (replace 'check
  1096. (lambda _
  1097. (invoke "nosetests"))))))
  1098. (native-inputs
  1099. `(("python-nose" ,python-nose)))
  1100. (home-page "https://arthurdejong.org/python-stdnum/")
  1101. (synopsis "Python module to handle standardized number and code formats")
  1102. (description
  1103. "This is a Python library that aims to provide functions to handle,
  1104. parse and validate standard numbers.
  1105. The module supports more than 100 different number formats
  1106. amongst which a great number of VAT and other tax numbers,
  1107. personal identity and company identification codes,
  1108. international standard numbers (ISBN, IBAN, EAN, etc.)
  1109. and various other formats.
  1110. The module also includes implementations of the Verhoeff,
  1111. Luhn and family of ISO/IEC 7064 check digit algorithms. ")
  1112. (license license:lgpl2.1+)))
  1113. (define-public python2-stdnum
  1114. (package-with-python2 python-stdnum))
  1115. (define-public python-duniterpy
  1116. (package
  1117. (name "python-duniterpy")
  1118. (version "1.0.0")
  1119. (source
  1120. (origin
  1121. (method url-fetch)
  1122. (uri (pypi-uri "duniterpy" version))
  1123. (sha256
  1124. (base32 "13kp2ph7fb1cdkx1y6j2h8q33fj2akc104l77ng52cy4v8jic9nz"))))
  1125. (build-system python-build-system)
  1126. (arguments
  1127. ;; FIXME: Tests fail with: "TypeError: block_uid() missing 1 required
  1128. ;; positional argument: 'value'".
  1129. `(#:tests? #f))
  1130. (propagated-inputs
  1131. `(("aiohttp" ,python-aiohttp)
  1132. ("attrs" ,python-attrs)
  1133. ("base58" ,python-base58)
  1134. ("jsonschema" ,python-jsonschema)
  1135. ("libnacl" ,python-libnacl)
  1136. ("pyaes" ,python-pyaes)
  1137. ("pylibscrypt" ,python-pylibscrypt)
  1138. ("pypeg2" ,python-pypeg2)))
  1139. (home-page "https://git.duniter.org/clients/python/duniterpy")
  1140. (synopsis "Python implementation of Duniter API")
  1141. (description "@code{duniterpy} is an implementation of
  1142. @uref{https://github.com/duniter/duniter/, duniter} API. Its
  1143. main features are:
  1144. @itemize
  1145. @item Support Duniter's Basic Merkle API and protocol
  1146. @item Asynchronous/synchronous without threads
  1147. @item Support HTTP, HTTPS and Web Socket transport for Basic Merkle API
  1148. @item Support Elasticsearch Duniter4j API
  1149. @item Duniter signing key
  1150. @item Sign/verify and encrypt/decrypt messages with the Duniter credentials
  1151. @end itemize")
  1152. (license license:gpl3+)))
  1153. (define-public silkaj
  1154. (package
  1155. (name "silkaj")
  1156. (version "0.7.6")
  1157. (source
  1158. (origin
  1159. (method url-fetch)
  1160. (uri (pypi-uri "silkaj" version))
  1161. (sha256
  1162. (base32 "0hrn0jwg415z7wjkp0myvw85wszlfi18f56j03075xxakr4dmi2j"))))
  1163. (build-system python-build-system)
  1164. (arguments
  1165. `(#:tests? #f)) ;no test
  1166. (inputs
  1167. `(("click" ,python-click)
  1168. ("duniterpy" ,python-duniterpy)
  1169. ("pynacl" ,python-pynacl)
  1170. ("tabulate" ,python-tabulate)
  1171. ("texttable" ,python-texttable)))
  1172. (home-page "https://git.duniter.org/clients/python/silkaj")
  1173. (synopsis "Command line client for Duniter network")
  1174. (description "@code{Silkaj} is a command line client for the
  1175. @uref{https://github.com/duniter/duniter/, Duniter} network.
  1176. Its features are:
  1177. @itemize
  1178. @item information about currency,
  1179. @item issuers difficulty to generate next block,
  1180. @item network view of nodes,
  1181. @item list of last issuers,
  1182. @item send transactions,
  1183. @item get account amount.
  1184. @end itemize")
  1185. (license license:agpl3+)))
  1186. (define-public grisbi
  1187. (package
  1188. (name "grisbi")
  1189. (version "1.2.2")
  1190. (source
  1191. (origin
  1192. (method url-fetch)
  1193. (uri (string-append
  1194. "mirror://sourceforge/grisbi/grisbi%20stable/"
  1195. (version-major+minor version) ".x/" version
  1196. "/grisbi-" version ".tar.bz2"))
  1197. (sha256
  1198. (base32
  1199. "1piiyyxjsjbw9gcqydvknzxmmfgh8kdqal12ywrxyxih2afwnvbw"))))
  1200. (build-system glib-or-gtk-build-system)
  1201. (arguments
  1202. `(#:configure-flags (list "--without-ofx")))
  1203. (propagated-inputs
  1204. `(("dconf" ,dconf)))
  1205. (native-inputs
  1206. `(("glib" ,glib "bin") ; glib-compile-schemas
  1207. ("pkg-config" ,pkg-config)
  1208. ("intltool" ,intltool)))
  1209. (inputs
  1210. `(("gtk+" ,gtk+)
  1211. ("libgsf" ,libgsf)))
  1212. (synopsis "Personal accounting application")
  1213. (description "Grisbi is a personal accounting application written by
  1214. French developers that is designed to follow French accounting rules.
  1215. Grisbi can manage multiple accounts, currencies and users. It manages
  1216. third party, expenditure and receipt categories, budgetary lines,
  1217. financial years, budget estimates, bankcard management and other
  1218. information.")
  1219. (home-page "https://grisbi.org")
  1220. (license license:gpl2+)))
  1221. (define-public trezord-udev-rules
  1222. (let ((commit "bff7fdfe436c727982cc553bdfb29a9021b423b0")
  1223. (revision "0"))
  1224. (package
  1225. (name "trezord-udev-rules")
  1226. (version (git-version "0.0.0" revision commit))
  1227. (source
  1228. (origin
  1229. (method git-fetch)
  1230. (uri (git-reference
  1231. (url "https://github.com/trezor/trezor-common")
  1232. (commit commit)))
  1233. (sha256
  1234. (base32
  1235. "14mrirrn68if7ja6qdk9qlxs1hv0f21vrxy5ncnms0gx9iwakp2l"))
  1236. (file-name (git-file-name name version))))
  1237. (build-system copy-build-system)
  1238. (arguments
  1239. '(#:install-plan
  1240. '(("./udev/51-trezor.rules" "lib/udev/rules.d/"))))
  1241. (home-page "https://github.com/trezor/trezor-common")
  1242. (synopsis "Udev rules for trezord")
  1243. (description
  1244. "This contains the udev rules for trezord. This will let a user run
  1245. trezord as a regular user instead of needing to it run as root.")
  1246. (license license:lgpl3+))))
  1247. (define-public trezord
  1248. (package
  1249. (name "trezord")
  1250. (version "2.0.30")
  1251. (source
  1252. (origin
  1253. (method git-fetch)
  1254. (uri (git-reference
  1255. (url "https://github.com/trezor/trezord-go")
  1256. (commit (string-append "v" version))))
  1257. (sha256
  1258. (base32
  1259. "1hzvk0wfgg7b4wpqjk3738yqxlv3pj5i7zxwm0jady2h97hmrqrr"))
  1260. (file-name (git-file-name name version))))
  1261. (build-system go-build-system)
  1262. (arguments
  1263. '(#:import-path "github.com/trezor/trezord-go"))
  1264. (native-inputs
  1265. `(("github.com/gorilla-csrf" ,go-github-com-gorilla-csrf)
  1266. ("github.com/gorilla/handlers" ,go-github-com-gorilla-handlers)
  1267. ("github.com/gorilla/mux" ,go-github-com-gorilla-mux)
  1268. ("gopkg.in/natefinch/lumberjack.v2" ,go-gopkg-in-natefinch-lumberjack.v2)))
  1269. (home-page "https://trezor.io")
  1270. (synopsis "Trezor Communication Daemon aka Trezor Bridge (written in Go)")
  1271. (description "This allows a Trezor hardware wallet to communicate to the
  1272. Trezor wallet.")
  1273. (license license:lgpl3+)))
  1274. (define-public bitcoin-abc
  1275. (package
  1276. (name "bitcoin-abc")
  1277. (version "0.21.12")
  1278. (source (origin
  1279. (method url-fetch)
  1280. (uri (string-append "https://download.bitcoinabc.org/"
  1281. version "/src/bitcoin-abc-"
  1282. version ".tar.gz"))
  1283. (sha256
  1284. (base32
  1285. "1amzwy3gpl8ai90dsy7g0z51qq8vxfzbf642wn4bfynb8jmw3kx5"))))
  1286. (build-system cmake-build-system)
  1287. (native-inputs
  1288. `(("pkg-config" ,pkg-config)
  1289. ("python" ,python) ; for the tests
  1290. ("util-linux" ,util-linux) ; provides the hexdump command for tests
  1291. ("qttools" ,qttools)))
  1292. (inputs
  1293. `(("bdb" ,bdb-5.3)
  1294. ("boost" ,boost)
  1295. ("jemalloc" ,jemalloc)
  1296. ("libevent" ,libevent)
  1297. ("miniupnpc" ,miniupnpc)
  1298. ("openssl" ,openssl)
  1299. ("protobuf" ,protobuf)
  1300. ("qrencode" ,qrencode)
  1301. ("qtbase" ,qtbase-5)
  1302. ("zeromq" ,zeromq)
  1303. ("zlib" ,zlib)))
  1304. (arguments
  1305. `(#:phases
  1306. (modify-phases %standard-phases
  1307. (add-before 'configure 'make-qt-deterministic
  1308. (lambda _
  1309. ;; Make Qt deterministic.
  1310. (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
  1311. #t))
  1312. (add-before 'check 'set-home
  1313. (lambda _
  1314. (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
  1315. #t))
  1316. (add-after 'check 'check-functional
  1317. (lambda _
  1318. (invoke
  1319. "python3" "./test/functional/test_runner.py"
  1320. (string-append "--jobs=" (number->string (parallel-job-count)))
  1321. ;; TODO: find why the abc-miner-fund test fails.
  1322. "--exclude=abc-miner-fund")
  1323. #t)))))
  1324. (home-page "https://www.bitcoinabc.org/")
  1325. (synopsis "Bitcoin ABC peer-to-peer full node for the Bitcoin Cash protocol")
  1326. (description
  1327. "Bitcoin Cash brings sound money to the world, fulfilling the original
  1328. promise of Bitcoin as Peer-to-Peer Electronic Cash. Merchants and users are
  1329. empowered with low fees and reliable confirmations is a digital currency that
  1330. enables instant payments to anyone anywhere in the world. It uses
  1331. peer-to-peer technology to operate without central authority: managing
  1332. transactions and issuing money are carried out collectively by the network.
  1333. As a fork it implemented changes lowering the time between blocks and now
  1334. offers confimations after less than 5 seconds and have significantly lower
  1335. fees that BTC. Bitcoin ABC is the reference implementation of the Bitcoin
  1336. Cash protocol. This package provides the Bitcoin Cash command line client and
  1337. a client based on Qt. This is a fork of Bitcoin Core.")
  1338. (license license:expat)))
  1339. (define-public libofx
  1340. (package
  1341. (name "libofx")
  1342. (version "0.9.15")
  1343. (source (origin
  1344. (method git-fetch)
  1345. (uri (git-reference
  1346. (url "https://github.com/libofx/libofx")
  1347. (commit version)))
  1348. (file-name (git-file-name name version))
  1349. (sha256
  1350. (base32
  1351. "1jx56ma351p8af8dvavygjwf6ipa7qbgq7bpdsymwj27apdnixfy"))))
  1352. (build-system gnu-build-system)
  1353. (arguments
  1354. '(#:parallel-build? #f ;fails with -j64
  1355. #:configure-flags
  1356. (list (string-append "--with-opensp-includes="
  1357. (assoc-ref %build-inputs "opensp")
  1358. "/include/OpenSP"))))
  1359. (native-inputs
  1360. `(("autoconf" ,autoconf)
  1361. ("automake" ,automake)
  1362. ("gengetopt" ,gengetopt)
  1363. ("help2man" ,help2man)
  1364. ("libtool" ,libtool)
  1365. ("pkg-config" ,pkg-config)))
  1366. (inputs
  1367. `(("curl" ,curl)
  1368. ("libxml++-2" ,libxml++-2)
  1369. ("opensp" ,opensp)))
  1370. (home-page "http://libofx.sourceforge.net/")
  1371. (synopsis "Library supporting the Open Financial Exchange format")
  1372. (description
  1373. "The LibOFX library is an API designed to allow applications to very easily
  1374. support OFX command responses, usually provided by financial institutions. The
  1375. following three utilities are included with the library:
  1376. @enumerate
  1377. @item @code{ofxdump}
  1378. @item @code{ofx2qif}
  1379. @item @code{ofxconnect}
  1380. @end enumerate")
  1381. (license license:gpl2+)))
  1382. (define-public bitcoin-unlimited
  1383. (package
  1384. (name "bitcoin-unlimited")
  1385. (version "1.9.2.0")
  1386. (source
  1387. (origin
  1388. (method git-fetch)
  1389. (uri (git-reference
  1390. (url "https://gitlab.com/bitcoinunlimited/BCHUnlimited.git/")
  1391. (commit (string-append "BCHunlimited" version))))
  1392. (file-name (git-file-name name version))
  1393. (sha256
  1394. (base32 "1cmrvh7azz0g89rsx6i8apd1li6r1lb3jrmbbf8fic1918lwv62m"))))
  1395. (build-system gnu-build-system)
  1396. (native-inputs
  1397. `(("autoconf" ,autoconf)
  1398. ("automake" ,automake)
  1399. ("libtool" ,libtool)
  1400. ("pkg-config" ,pkg-config)
  1401. ("python" ,python) ; for the tests
  1402. ("util-linux" ,util-linux) ; provides the hexdump command for tests
  1403. ("qttools" ,qttools)))
  1404. (inputs
  1405. `(("bdb" ,bdb-4.8)
  1406. ("boost" ,boost)
  1407. ("libevent" ,libevent)
  1408. ("miniupnpc" ,miniupnpc)
  1409. ("openssl" ,openssl)
  1410. ("protobuf" ,protobuf)
  1411. ("qrencode" ,qrencode)
  1412. ("qtbase" ,qtbase-5)
  1413. ("zeromq" ,zeromq)
  1414. ("zlib" ,zlib)))
  1415. (arguments
  1416. `(#:configure-flags
  1417. (list
  1418. ;; Boost is not found unless specified manually.
  1419. (string-append "--with-boost="
  1420. (assoc-ref %build-inputs "boost"))
  1421. ;; XXX: The configure script looks up Qt paths by
  1422. ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick
  1423. ;; up executables residing in 'qttools', so we specify them here.
  1424. (string-append "ac_cv_path_LRELEASE="
  1425. (assoc-ref %build-inputs "qttools")
  1426. "/bin/lrelease")
  1427. (string-append "ac_cv_path_LUPDATE="
  1428. (assoc-ref %build-inputs "qttools")
  1429. "/bin/lupdate")
  1430. "--disable-static")
  1431. #:phases
  1432. (modify-phases %standard-phases
  1433. (add-after 'unpack 'fix-tests
  1434. (lambda _
  1435. ;; Fix data specific test failure
  1436. ;; https://reviews.bitcoinabc.org/rABC67bbd3d0aaee2952ff1cb5da51d1fd0b50c2b63a
  1437. (substitute* "src/test/rpc_tests.cpp"
  1438. (("1607731200") "9907731200"))
  1439. ;; Disable utilprocess_tests because it never ends.
  1440. ;; It looks like it tries to start /bin/sleep and waits until it
  1441. ;; is in the list of running processes, but /bin/sleep doesn't
  1442. ;; exist.
  1443. (substitute* "src/Makefile.test.include"
  1444. (("test/utilprocess_tests.cpp")
  1445. ""))
  1446. ;; Some transaction validation rules have changed (see upstream
  1447. ;; commit f208400825d4641b9310a1fba023d56e0862e3b0), which makes
  1448. ;; a test fail. Disable it for now.
  1449. ;; TODO: Remove this when the next version is released.
  1450. (substitute* "src/Makefile.test.include"
  1451. (("test/txvalidationcache_tests.cpp")
  1452. ""))))
  1453. (add-before 'check 'set-home
  1454. (lambda _
  1455. (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
  1456. #t)))))
  1457. (home-page "https://www.bitcoinunlimited.info/")
  1458. (synopsis "Client for the Bitcoin Cash protocol")
  1459. (description
  1460. "Bitcoin Unlimited is a client for the Bitcoin Cash peer-to-peer
  1461. electronic cash system. This package provides a command line client and
  1462. a Qt GUI.")
  1463. (license license:expat)))
  1464. (define-public fulcrum
  1465. (package
  1466. (name "fulcrum")
  1467. (version "1.1.1")
  1468. (source
  1469. (origin
  1470. (method url-fetch)
  1471. (uri (string-append "https://gitlab.com/FloweeTheHub/fulcrum/-/archive/v"
  1472. version "/fulcrum-v" version ".tar.gz"))
  1473. (sha256
  1474. (base32 "04w5gw02d39caa8a0l6wkn87kc43zzad2prqsyrcq97vlbkdx6x6"))))
  1475. (build-system gnu-build-system)
  1476. (arguments
  1477. `(#:phases
  1478. (modify-phases %standard-phases
  1479. ;; Call qmake instead of configure to create a Makefile.
  1480. (replace 'configure
  1481. (lambda _
  1482. (invoke
  1483. "qmake"
  1484. (string-append "PREFIX=" %output)
  1485. "features="))))))
  1486. (native-inputs
  1487. `(("qttools" ,qttools)))
  1488. (inputs
  1489. `(("python" ,python)
  1490. ("qtbase" ,qtbase-5)
  1491. ("rocksdb" ,rocksdb)
  1492. ("zlib" ,zlib)))
  1493. (home-page "https://gitlab.com/FloweeTheHub/fulcrum/")
  1494. (synopsis "Fast and nimble SPV server for Bitcoin Cash")
  1495. (description
  1496. "Flowee Fulcrum is a server that is the back-end for @acronym{SPV,
  1497. Simplified Payment Verification} wallets, it provides the full API for those
  1498. walets in a fast and small server. The full data is stored in a full node,
  1499. like Flowee the Hub, which Fulcrum connects to over RPC.")
  1500. (license license:gpl3+)))
  1501. (define-public flowee
  1502. (package
  1503. (name "flowee")
  1504. (version "2020.04.1")
  1505. (source
  1506. (origin
  1507. (method url-fetch)
  1508. (uri (string-append "https://gitlab.com/FloweeTheHub/thehub/-/archive/"
  1509. version "/thehub-" version ".tar.gz"))
  1510. (sha256
  1511. (base32 "1vwvaxm3b71pfx8l4rrv06wqks6xdf2333w856b36s1bzvj53rhc"))))
  1512. (build-system cmake-build-system)
  1513. (arguments
  1514. `(#:configure-flags '("-Dbuild_tests=ON" "-Denable_gui=OFF")
  1515. #:phases
  1516. (modify-phases %standard-phases
  1517. (add-before 'configure 'make-qt-deterministic
  1518. (lambda _
  1519. ;; Make Qt deterministic.
  1520. (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
  1521. #t))
  1522. (add-before 'configure 'disable-black-box
  1523. ;; the black-box testing runs full hubs and lets them interact.
  1524. ;; this is more fragile and a slow machine, or low memory machine, may
  1525. ;; make the tests timeout and fail. We just disable them here.
  1526. (lambda _
  1527. (substitute* "testing/CMakeLists.txt"
  1528. (("test_api") ""))
  1529. (substitute* "testing/CMakeLists.txt"
  1530. (("add_subdirectory\\(api\\)") ""))
  1531. #t))
  1532. (add-after 'configure 'set-build-info
  1533. ;; Their genbuild.sh to generate a build.h fails in guix (no .git dir) .
  1534. ;; Its purpose is to write the tag name in the build.h file. We do that
  1535. ;; here instead.
  1536. (lambda _
  1537. (with-output-to-file "include/build.h"
  1538. (lambda _
  1539. (display
  1540. (string-append "#define BUILD_DESC " "\"", version "\""))))))
  1541. (add-before 'check 'set-home
  1542. (lambda _
  1543. (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
  1544. #t))
  1545. (replace 'check
  1546. (lambda _
  1547. (invoke "make" "check" "-C" "testing"))))))
  1548. (inputs
  1549. `(("boost" ,boost)
  1550. ("gmp" ,gmp)
  1551. ("libevent" ,libevent)
  1552. ("miniupnpc" ,miniupnpc)
  1553. ("openssl" ,openssl)
  1554. ("qtbase" ,qtbase-5)))
  1555. (native-inputs
  1556. `(("pkg-config" ,pkg-config)
  1557. ("qttools" ,qttools)
  1558. ("util-linux" ,util-linux))) ; provides the hexdump command for tests
  1559. (home-page "https://flowee.org")
  1560. (synopsis "Flowee infrastructure tools and services")
  1561. (description
  1562. "Flowee packages all tier-1 applications and services from the Flowee group.
  1563. This includes components like The Hub and Indexer which and various others
  1564. that allows you to run services and through them access the Bitcoin Cash networks.")
  1565. (license license:gpl3+)))
  1566. (define-public beancount
  1567. (package
  1568. (name "beancount")
  1569. (version "2.3.4")
  1570. (source
  1571. (origin
  1572. (method url-fetch)
  1573. (uri (pypi-uri "beancount" version))
  1574. (sha256
  1575. (base32
  1576. "1h465zc7gb0bc5pagm9fsp083sqxrn2mjfbk9l7h162xm7k8rw1b"))
  1577. (patches (search-patches "beancount-disable-googleapis-fonts.patch"))))
  1578. (build-system python-build-system)
  1579. (arguments
  1580. `(#:tests? #f ; Says test is missing, not sure why
  1581. #:phases
  1582. (modify-phases %standard-phases
  1583. ;; Not importing the googleapis package for now
  1584. (add-after 'unpack 'ignore-googleapis
  1585. (lambda _
  1586. (substitute* "setup.py"
  1587. (("'google-api-python-client',") ""))
  1588. #t)))))
  1589. (inputs
  1590. `(("python-beautifulsoup4" ,python-beautifulsoup4)
  1591. ("python-bottle" ,python-bottle)
  1592. ("python-chardet" ,python-chardet)
  1593. ("python-dateutil" ,python-dateutil)
  1594. ("python-lxml" ,python-lxml)
  1595. ("python-magic" ,python-magic)
  1596. ("python-ply" ,python-ply)
  1597. ("python-requests" ,python-requests)))
  1598. (native-inputs
  1599. `(("python-pytest" ,python-pytest)))
  1600. (home-page "http://furius.ca/beancount")
  1601. (synopsis "Command-line double-entry accounting tool")
  1602. (description
  1603. "Beancount is a double-entry bookkeeping computer language that lets you
  1604. define financial transaction records in a text file, read them in memory,
  1605. generate a variety of reports from them, and provides a web interface.")
  1606. (license license:gpl2)))
  1607. ;; The beancount source ships with elisp in a subdirectory
  1608. (define-public emacs-beancount
  1609. (package
  1610. (inherit beancount)
  1611. (name "emacs-beancount")
  1612. (build-system emacs-build-system)
  1613. (arguments
  1614. `(#:tests? #f ;no tests
  1615. #:phases
  1616. (modify-phases %standard-phases
  1617. (add-before 'install 'chdir-emacs
  1618. (lambda _
  1619. (chdir "editors/emacs")
  1620. #t)))))
  1621. (inputs '())
  1622. (native-inputs '())
  1623. (synopsis "Emacs mode for beancount")
  1624. (description
  1625. "Emacs-beancount is an Emacs mode for the Beancount accounting tool.")))
  1626. (define-public hledger-web
  1627. (package
  1628. (name "hledger-web")
  1629. (version "1.14.1")
  1630. (source
  1631. (origin
  1632. (method url-fetch)
  1633. (uri (string-append "https://hackage.haskell.org/package/"
  1634. "hledger-web/hledger-web-" version ".tar.gz"))
  1635. (sha256
  1636. (base32
  1637. "0w59nr7mj0nx8z44cvhy1rhlj5rmx0wq4p5nfl4dycfmp7jwvsm1"))))
  1638. (build-system haskell-build-system)
  1639. (inputs
  1640. `(("ghc-decimal" ,ghc-decimal)
  1641. ("ghc-aeson" ,ghc-aeson)
  1642. ("ghc-blaze-html" ,ghc-blaze-html)
  1643. ("ghc-blaze-markup" ,ghc-blaze-markup)
  1644. ("ghc-case-insensitive" ,ghc-case-insensitive)
  1645. ("ghc-clientsession" ,ghc-clientsession)
  1646. ("ghc-cmdargs" ,ghc-cmdargs)
  1647. ("ghc-conduit" ,ghc-conduit)
  1648. ("ghc-conduit-extra" ,ghc-conduit-extra)
  1649. ("ghc-data-default" ,ghc-data-default)
  1650. ("ghc-hjsmin" ,ghc-hjsmin)
  1651. ("hledger" ,hledger)
  1652. ("ghc-hledger-lib" ,ghc-hledger-lib)
  1653. ("ghc-http-client" ,ghc-http-client)
  1654. ("ghc-http-conduit" ,ghc-http-conduit)
  1655. ("ghc-http-types" ,ghc-http-types)
  1656. ("ghc-json" ,ghc-json)
  1657. ("ghc-megaparsec" ,ghc-megaparsec)
  1658. ("ghc-semigroups" ,ghc-semigroups)
  1659. ("ghc-shakespeare" ,ghc-shakespeare)
  1660. ("ghc-wai" ,ghc-wai)
  1661. ("ghc-wai-extra" ,ghc-wai-extra)
  1662. ("ghc-wai-handler-launch" ,ghc-wai-handler-launch)
  1663. ("ghc-warp" ,ghc-warp)
  1664. ("ghc-yaml" ,ghc-yaml)
  1665. ("ghc-yesod" ,ghc-yesod)
  1666. ("ghc-yesod-core" ,ghc-yesod-core)
  1667. ("ghc-yesod-form" ,ghc-yesod-form)
  1668. ("ghc-yesod-static" ,ghc-yesod-static)))
  1669. (home-page "https://hledger.org")
  1670. (synopsis "Web-based user interface for the hledger accounting system")
  1671. (description "This package provides a simple Web-based User
  1672. Interface (UI) for the hledger accounting system. It can be used as a
  1673. local, single-user UI, or as a multi-user UI for viewing, adding, and
  1674. editing on the Web.")
  1675. (license license:gpl3)))