summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCayetano Santos <csantosb@inventati.org>2025-08-28 12:08:31 +0200
committerDanny Milosavljevic <dannym@friendly-machines.com>2025-09-03 20:35:44 +0200
commit92fdcfdaa37556c9050acd7f910982cbb55f39fa (patch)
tree17b6c3ac711fda644f54c231944f659e64c6b919
parentfa7c25bd9bbe4446aab7d6d75dd116d875842c16 (diff)
gnu: fann: Update to 2.2.0-2.1783cbf.
* gnu/packages/machine-learning.scm (fann): Update to 2.2.0-2.1783cbf. [version]: Modernize. [source]: Modernize, delete bundled googletest. [arguments]: Use G-Expressions. <#:phases>: Remove remove-googletest, modernize check. [native-inputs]: Add googletest. [home-page]: Update. Change-Id: If3b2fa1e28633129dfeba87630ddc5478dd77291 Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
-rw-r--r--gnu/packages/machine-learning.scm51
1 files changed, 31 insertions, 20 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 49bfe6a3661..c8e363f8acc 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -302,30 +302,41 @@ distributions.")
(license license:asl2.0)))
(define-public fann
- ;; The last release is >100 commits behind, so we package from git.
- (let ((commit "d71d54788bee56ba4cf7522801270152da5209d7"))
+ ;; The last release is 14 years old.
+ (let ((commit "1783cbf6239a597c4d29f694e227e22b8d4f4bf6")
+ (revision "2"))
(package
(name "fann")
- (version (string-append "2.2.0-1." (string-take commit 8)))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/libfann/fann")
- (commit commit)))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "0ibwpfrjs6q2lijs8slxjgzb2llcl6rk3v2ski4r6215g5jjhg3x"))))
+ (version (git-version "2.2.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libfann/fann")
+ (commit commit)))
+ (modules '((guix build utils)))
+ (snippet #~(delete-file-recursively "lib/googletest"))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0jlcxl0czlr3982mak3935mb08i2f368f0jsxca91ppgfd596ldr"))))
(build-system cmake-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out")))
- (with-directory-excursion (string-append (getcwd) "/tests")
- (invoke "./fann_tests"))))))))
- (home-page "http://leenissen.dk/fann/wp/")
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-googletest
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("ADD_SUBDIRECTORY\\( lib/googletest \\)")
+ ""))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "tests"
+ (invoke "./fann_tests"))))))))
+ (native-inputs (list googletest))
+ (home-page "https://leenissen.dk/")
(synopsis "Fast Artificial Neural Network")
(description
"FANN is a neural network library, which implements multilayer