From 7c6eaae56bc9ef57b60ceacf49a33cdd5966b361 Mon Sep 17 00:00:00 2001 From: Mark Meyer Date: Thu, 1 Feb 2018 15:07:58 +0100 Subject: [PATCH] gnu: Add fann. * gnu/packages/machine-learning.scm (fann): New variable. --- gnu/packages/machine-learning.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index bd13cedcb..faa4bdf7f 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016, 2017 Marius Bakke ;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2018 Mark Meyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,6 +32,7 @@ #:use-module (guix build-system ocaml) #:use-module (guix build-system python) #:use-module (guix build-system r) + #:use-module (guix git-download) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages boost) @@ -50,6 +52,35 @@ #:use-module (gnu packages xml) #:use-module (gnu packages xorg)) +(define-public fann + (let ((commit "d71d54788bee56ba4cf7522801270152da5209d7")) + (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.git") + (commit version))) + (sha256 + (base32 + "0ibwpfrjs6q2lijs8slxjgzb2llcl6rk3v2ski4r6215g5jjhg3x")))) + (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/") + (synopsis "Fast Artificial Neural Network") + (description + "FANN is a free open source neural network library, which implements +multilayer artificial neural networks in C with support for both fully +connected and sparsely connected networks.") + (license license:lgpl2.1)))) + (define-public libsvm (package (name "libsvm") -- 2.15.1