Subject: [bug#48388] [PATCH 1/3] gnu: Add dmlc-core.

From: Vinicius Monego <[email-masked]>
Date: Wed, 12 May 2021 23:58:42 +0000

* gnu/packages/machine-learning.scm (dmlc-core): New variable.
---
 gnu/packages/machine-learning.scm | 32 +++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 837ebbba67..9d6c5505f7 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1927,6 +1927,38 @@ together building blocks and a subclassing API with an imperative style for
 advanced research.")
     (license license:asl2.0)))
 
+(define-public dmlc-core
+  ;; Version 0.4 is too old for xgboost.
+  (let ((version "0.5")
+        (commit "f00e3ec7abc9f293a1b7061157b0a4e22a735cf5")
+        (revision "0"))
+    (package
+      (name "dmlc-core")
+      (version (git-version version revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/dmlc/dmlc-core")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1x4ad1jhn84fywlk031fmv1kxyiscclmrqn9hhj8gz0mh7z9vcrh"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:configure-flags
+         (list "-DGOOGLE_TEST=ON")))
+      (native-inputs
+       `(("googletest" ,googletest)
+         ("python" ,python-wrapper)))
+      (home-page "https://github.com/dmlc/dmlc-core")
+      (synopsis "Common bricks library for machine learning")
+      (description
+       "DMLC-Core is the backbone library to support all DMLC projects,
+offers the bricks to build efficient and scalable distributed machine
+learning libraries.")
+      (license license:asl2.0))))
+
 (define-public python-iml
   (package
     (name "python-iml")
-- 
2.31.1