unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add dlib.
@ 2016-08-13 17:15 Marius Bakke
  2016-08-14 17:25 ` Leo Famulari
  0 siblings, 1 reply; 34+ messages in thread
From: Marius Bakke @ 2016-08-13 17:15 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 67 bytes --]

Hi,

This adds the dlib machine learning toolkit.

Cheers,
Marius


[-- Attachment #2: 0001-gnu-Add-dlib.patch --]
[-- Type: text/x-patch, Size: 3834 bytes --]

From 9a24f0bfd8a0375928d7accdc0ef744f4fa304a0 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Sat, 13 Aug 2016 11:26:10 +0100
Subject: [PATCH] gnu: Add dlib.

* gnu/packages/machine-learning.scm (dlib): New variable.
---
 gnu/packages/machine-learning.scm | 55 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 54 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index f96672c..6db0333 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,13 +33,15 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages dejagnu)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages statistics)
   #:use-module (gnu packages swig)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages xorg))
 
 (define-public libsvm
   (package
@@ -467,3 +470,53 @@ geometric models.")
      "This package provides functions for feed-forward neural networks with a
 single hidden layer, and for multinomial log-linear models.")
     (license (list license:gpl2+ license:gpl3+))))
+
+(define-public dlib
+  (package
+    (name "dlib")
+    (version "19.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://dlib.net/files/dlib-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0a4xilzhb78ffpcyq2fipri80bmlgrl5ngr7r3jygdr9p7v3z4dn"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Delete ~13MB of bundled dependencies.
+                  (delete-file-recursively "dlib/external")
+                  (delete-file-recursively "docs/dlib/external")))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+       (let ((test-dir (string-append "../dlib-" ,version "/dlib/test/build")))
+         (modify-phases %standard-phases
+           (add-before 'check 'build-test-suite
+             ;; No test target, so we build and run the unit tests here.
+             (lambda _
+               (mkdir-p test-dir)
+               (chdir test-dir)
+               (zero? (system* "cmake" ".."))
+               (zero? (system* "cmake" "--build" "." "--config" "Release"))))
+           (replace 'check
+             (lambda _ (zero? (system* "./dtest" "--runall"))))
+           (add-after 'check 'ascend-to-build-directory
+             (lambda _ (chdir "../../../../build") #t))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("lapack" ,lapack)
+       ("libjpeg" ,libjpeg)
+       ("libpng" ,libpng)
+       ("libx11" ,libx11)
+       ("openblas" ,openblas)
+       ("zlib" ,zlib)))
+    (synopsis "Toolkit for making machine learning and data analysis applications in C++")
+    (description
+     "Dlib is a modern C++ toolkit containing machine learning algorithms and tools.  It
+is used in both industry and academia in a wide range of domains including robotics,
+embedded devices, mobile phones, and large high performance computing environments.")
+    (home-page "http://dlib.net")
+    (license license:boost1.0)))
-- 
2.9.2


^ permalink raw reply related	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2016-09-13  5:15 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-13 17:15 [PATCH] gnu: Add dlib Marius Bakke
2016-08-14 17:25 ` Leo Famulari
2016-08-14 19:52   ` Marius Bakke
2016-08-15  7:43     ` Alex Kost
2016-08-15 11:51       ` Marius Bakke
2016-08-15 20:15         ` Leo Famulari
2016-08-15 20:29           ` Marius Bakke
2016-08-15 22:28             ` Leo Famulari
2016-08-16  0:15               ` Ben Woodcroft
2016-08-16 10:45                 ` Marius Bakke
2016-08-16 20:47                   ` Leo Famulari
2016-08-16 23:31                     ` Ben Woodcroft
2016-08-16 23:45                       ` Leo Famulari
2016-08-17  3:24                         ` Ben Woodcroft
2016-08-17  5:01                           ` Ben Woodcroft
2016-08-17 14:48                           ` Marius Bakke
2016-08-18 20:23                             ` Leo Famulari
2016-08-19 10:52                               ` Marius Bakke
2016-08-21 20:17                                 ` Leo Famulari
2016-08-22  2:30                                   ` Ben Woodcroft
2016-08-22 12:01                                     ` Marius Bakke
2016-08-23 18:33                                       ` Marius Bakke
2016-08-24 10:26                                         ` Marius Bakke
2016-08-24 17:26                                           ` Leo Famulari
2016-08-24 19:08                                             ` Marius Bakke
2016-08-24 22:51                                               ` Ben Woodcroft
2016-08-30 14:43                                               ` Marius Bakke
2016-08-31 19:09                                                 ` Leo Famulari
2016-09-09 12:15                                                   ` Marius Bakke
2016-09-10 12:32                                                     ` Marius Bakke
2016-09-10 18:16                                                       ` Leo Famulari
2016-09-13  5:14                                                         ` Leo Famulari
2016-09-13  5:14                                                       ` Leo Famulari
2016-08-18 20:18                           ` Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).