summaryrefslogtreecommitdiff
path: root/gnu/packages/finance.scm
diff options
context:
space:
mode:
authorSkylar Hill <stellarskylark@posteo.net>2023-02-13 03:16:49 +0000
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2023-02-18 12:36:09 +0100
commit53daa23b2e07add2a2bbdf099d2c768102c18fa5 (patch)
tree1fac3268d6186495df0f027ccb1b511b8cc0e5f5 /gnu/packages/finance.scm
parentbc3354a8821f365e692abf04006e3e5a61c44e28 (diff)
gnu: Add opentaxsolver.
* gnu/packages/finance.scm (opentaxsolver): New variable. * gnu/packages/patches/opentaxsolver-file-browser-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Diffstat (limited to 'gnu/packages/finance.scm')
-rw-r--r--gnu/packages/finance.scm65
1 files changed, 65 insertions, 0 deletions
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index c9c8e9b823..4fd6b11ffb 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2022 Collin J. Doering <collin@rekahsoft.ca>
;;; Copyright © 2022 Justin Veilleux <terramorpha@cock.li>
;;; Copyright © 2023 Frank Pursel <frank.pursel@gmail.com>
+;;; Copyright © 2023 Skylar Hill <stellarskylark@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2271,3 +2272,67 @@ combines the advantages of pool and solo mining; you still fully control your
Monero node and what it mines, but you get frequent payouts like on a regular
pool.")
(license license:gpl3)))
+
+(define-public opentaxsolver
+ ;; The OTS version is formatted like tax-year_version. So, at time of
+ ;; writing, the version is 2022_20.00. Each part of this is used in
+ ;; different places in the source uri, so it's convenient to have them
+ ;; separately like this.
+ (let ((tax-year "2022")
+ (ots-version "20.00"))
+ (package
+ (name "opentaxsolver")
+ (version (string-append tax-year "_" ots-version))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/opentaxsolver/OTS_"
+ tax-year "/v" ots-version
+ "_linux/OpenTaxSolver" version "_linux64.tgz"))
+ (sha256
+ (base32
+ "06k0a72bmwdmr71dvrp8b4vl8vilnggsh92hrp7wjdgcjj9m074w"))
+ (patches (search-patches "opentaxsolver-file-browser-fix.patch"))))
+ (build-system glib-or-gtk-build-system)
+ (arguments
+ (list
+ #:tests? #f ;no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ ;; OTS does provide a shellscript that does exactly this, but we
+ ;; need to do it ourselves to specify the correct compiler and to
+ ;; delete the GUI binaries.
+ (replace 'build
+ (lambda _
+ (delete-file "Run_taxsolve_GUI")
+ (delete-file-recursively "bin")
+ (mkdir "bin")
+ (chdir "src/Gui_gtk")
+ (invoke "make"
+ (string-append "CC=" #$(cc-for-target)))
+ (chdir "..")
+ (invoke "make"
+ (string-append "CC=" #$(cc-for-target)))))
+ ;; OTS doesn't provide a `make install` target, because it assumes
+ ;; it'll be run from the tarball. So, we do it ourselves, making
+ ;; sure to replicate the directory structure of the tarball.
+ (replace 'install
+ (lambda _
+ (copy-recursively "../bin"
+ (string-append #$output "/bin"))
+ (symlink (string-append #$output "/bin/ots_gui2")
+ (string-append #$output "/bin/Run_taxsolve_GUI"))
+ (copy-recursively "../tax_form_files"
+ (string-append #$output "/tax_form_files"))
+ (copy-recursively "formdata"
+ (string-append #$output "/src/formdata")))))))
+ (native-inputs (list pkg-config))
+ (inputs (list gtk+-2))
+ (synopsis "Yearly tax preparation tool")
+ (description
+ "OpenTaxSolver is a program for calculating tax form entries for
+federal and state personal income taxes. It automatically fills out and
+prints your forms for mailing.")
+ (home-page "https://opentaxsolver.sourceforge.net/")
+ (license license:gpl2+))))