dannym pushed a commit to branch master
in repository guix.

commit 6cd15c83ab54b049f4bd3114ba971849ffe1fe66
Author: Danny Milosavljevic <[email protected]>
AuthorDate: Mon Feb 3 12:54:34 2025 +0100

    gnu: Add dlib.
    
    * gnu/packages/machine-learning.scm (dlib): New variable.
    
    Change-Id: Id0240565dfe76c7cdf0d74917f1de6fcd2da9f24
---
 gnu/packages/machine-learning.scm | 41 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/machine-learning.scm 
b/gnu/packages/machine-learning.scm
index 301401f001..85b7a92a86 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -6409,3 +6409,44 @@ performance library of basic building blocks for deep 
learning applications.")
      "This package provides a standard API for reinforcement learning and a
 diverse set of reference environments (formerly Gym).")
     (license license:expat)))
+
+(define-public dlib
+  (package
+   (name "dlib")
+   (version "19.24.6")
+   (source
+    (origin
+     (method git-fetch)
+     (uri (git-reference
+           (url "https://github.com/davisking/dlib.git";)
+           (commit (string-append "v" version))))
+     (file-name (git-file-name name version))
+     (sha256
+      (base32 "11j86nxkj78v8xdx2s80mfplq4j0rs0y0iidqgma12b2pdk3p486"))
+     (modules '((guix build utils)))
+     (snippet
+      '(begin
+         (delete-file-recursively "dlib/external")))))
+   (build-system cmake-build-system)
+   (arguments
+    `(#:phases
+      (modify-phases %standard-phases
+                     (add-after 'unpack 'chdir
+                                (lambda _
+                                  (chdir "dlib")))
+                     (replace 'check
+                              (lambda _
+                                ;; Following the instructions on the website.
+                                (mkdir "../dlib/test/build")
+                                (with-directory-excursion "../dlib/test/build"
+                                                          (invoke "cmake" "..")
+                                                          (invoke "cmake" 
"--build" "." "--config" "Release")
+                                                          (invoke "./dtest" 
"--runall")))))))
+   (inputs (list libpng libjpeg-turbo openblas zlib libjxl))
+   (home-page "https://github.com/davisking/dlib";)
+   (synopsis
+    "Toolkit for making machine learning and data analysis applications")
+   (description
+    "This package provides a toolkit for making machine learning and data
+analysis applications in C++.")
+   (license license:boost1.0)))

Reply via email to