Subject: [bug#30266] Add FANN

From: Mark Meyer <[email-masked]>
Date: Sat, 27 Jan 2018 13:55:39 +0100

Hi,
this is a patch to add FANN, the fast artificial neural network to Guix.

Cheers, Mark

-- 
  Mark Meyer
  [email-masked]
From 63b1eca352d9ce97724bb832617c4fa9c28403e0 Mon Sep 17 00:00:00 2001
From: Mark Meyer <[email-masked]>
Date: Sat, 27 Jan 2018 13:53:14 +0100
Subject: [PATCH] gnu: Add fann.

* gnu/packages/ai.scm (fann): New variable.
---
 gnu/local.mk        |  1 +
 gnu/packages/ai.scm | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 gnu/packages/ai.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 80d6a8d4c..d30d0cc9e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -53,6 +53,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/admin.scm			\
   %D%/packages/adns.scm				\
   %D%/packages/algebra.scm			\
+  %D%/packages/ai.scm				\
   %D%/packages/aidc.scm				\
   %D%/packages/android.scm			\
   %D%/packages/animation.scm			\
diff --git a/gnu/packages/ai.scm b/gnu/packages/ai.scm
new file mode 100644
index 000000000..5b2da2e70
--- /dev/null
+++ b/gnu/packages/ai.scm
@@ -0,0 +1,32 @@
+(define-module (gnu packages ai)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix utils)
+  #:use-module (guix download)
+  #:use-module (guix packages)
+  #:use-module (guix build-system cmake)
+  #:use-module (guix git-download)
+  #:use-module (gnu packages))
+
+(define-public libfann
+  (package
+    (name "libfann")
+    (version "d71d54788b")
+    (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
+     `(#:tests? #f))
+    (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)))
+
-- 
2.15.1