GNU bug report logs - #78559
[PATCH 1/2] gnu: Add or-tools.

Previous Next

Package: guix-patches;

Reported by: Herman Rimm <herman <at> rimm.ee>

Date: Fri, 23 May 2025 06:20:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 78559 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, guix-patches <at> gnu.org:
bug#78559; Package guix-patches. (Fri, 23 May 2025 06:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Herman Rimm <herman <at> rimm.ee>:
New bug report received and forwarded. Copy sent to andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, guix-patches <at> gnu.org. (Fri, 23 May 2025 06:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Herman Rimm <herman <at> rimm.ee>
To: guix-patches <at> gnu.org
Subject: [PATCH 1/2] gnu: Add or-tools.
Date: Fri, 23 May 2025 08:17:48 +0200
* gnu/packages/maths.scm (or-tools): Add variable.

Change-Id: Iea8f971f3d06d048bfa08aa8bf6c171fb154e9d0
---
 gnu/packages/maths.scm | 48 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index eea9f8f718b..5d20803999a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -63,7 +63,7 @@
 ;;; Copyright © 2023 Jake Leporte <jakeleporte <at> outlook.com>
 ;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico <at> riseup.net>
 ;;; Copyright © 2023, 2025 David Elsing <david.elsing <at> posteo.net>
-;;; Copyright © 2024 Herman Rimm <herman <at> rimm.ee>
+;;; Copyright © 2024, 2025 Herman Rimm <herman <at> rimm.ee>
 ;;; Copyright © 2024 Foundation Devices, Inc. <hello <at> foundation.xyz>
 ;;; Copyright © 2024, 2025 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
 ;;; Copyright © 2024 Zheng Junjie <873216071 <at> qq.com>
@@ -174,6 +174,7 @@ (define-module (gnu packages maths)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages prolog)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
@@ -184,6 +185,7 @@ (define-module (gnu packages maths)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages regex)
   #:use-module (gnu packages ruby)
   #:use-module (gnu packages tbb)
   #:use-module (gnu packages scheme)
@@ -10195,6 +10197,50 @@ (define-public libqalculate
 cli.")
     (license license:gpl2+)))
 
+(define-public or-tools
+  (package
+    (name "or-tools")
+    (version "9.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/google/or-tools")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1z15f2nf9jww34fmfpycc9z7j1j06xbihs4qhd4s7qsdjds67zpa"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+       #:configure-flags
+       #~'("-DUSE_COINOR=OFF" "-DUSE_HIGHS=OFF" "-DUSE_SCIP=OFF")
+       #:phases
+       #~(modify-phases %standard-phases
+           (add-before 'configure 'patch-install-paths
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (substitute* "ortools/flatzinc/ortools.msc.in"
+                   (("\\.\\.") (string-append out "/share/minizinc"))
+                   (("@FZ_REL_INSTALL_BINARY@")
+                    (string-append out "/bin/fzn-ortools")))))))))
+    (inputs (list abseil-cpp-20220623 eigen protobuf re2 zlib))
+    (native-inputs (list googletest pkg-config))
+    (home-page "https://developers.google.com/optimization")
+    (synopsis "Google's software suite for combinatorial optimization")
+    (description
+     "Google Optimization Tools (a.k.a. OR-Tools) is a software suite
+for solving combinatorial optimization problems.  The suite contains:
+@itemize
+@item CP* and CP-SAT constraint programming solvers;
+@item Glop and PDLP linear programming solvers;
+@item Wrappers around solvers, including mixed integer solvers;
+@item Bin packing and knapsack algorithms;
+@item Traveling Salesman Problem and Vehicle Routing Problem algorithms;
+@item Graph algorithms for shortest paths, min cost flow, max flow, etc.
+@end itemize")
+    (license license:asl2.0)))
+
 (define-public qalculate-gtk
   (package
     (name "qalculate-gtk")

base-commit: ba59ec9a11d6d4c0add8d5832500261fa50346da
-- 
2.47.1





Information forwarded to andreas <at> enge.fr, bavier <at> posteo.net, sharlatanus <at> gmail.com, guix-patches <at> gnu.org:
bug#78559; Package guix-patches. (Fri, 23 May 2025 06:21:02 GMT) Full text and rfc822 format available.

Message #8 received at 78559 <at> debbugs.gnu.org (full text, mbox):

From: Herman Rimm <herman <at> rimm.ee>
To: 78559 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: minizinc: Add Google's OR-Tools as solver.
Date: Fri, 23 May 2025 08:19:41 +0200
* gnu/packages/maths.scm (minizinc)[arguments]: Install OR-Tools config.
[inputs]: Add or-tools.

Change-Id: Ibc301b458487c3465251c1c6d97f5858d7d6d59e
---
 gnu/packages/maths.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 5d20803999a..bf05db8345e 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4844,6 +4844,7 @@ (define-public minizinc
            (lambda _
              (let ((chuffed #$(this-package-input "chuffed"))
                    (gecode #$(this-package-input "gecode"))
+                   (or-tools #$(this-package-input "or-tools"))
                    (pkgdatadir (string-append #$output
                                               "/share/minizinc")))
                (call-with-output-file (string-append pkgdatadir
@@ -4864,11 +4865,11 @@ (define-public minizinc
                    (copy-recursively
                      (string-append solver "/share/minizinc/solvers")
                      (string-append pkgdatadir "/solvers")))
-                 (list gecode chuffed))))))))
+                 (list chuffed gecode or-tools))))))))
     (native-inputs
      (list bison flex))
     (inputs
-     (list cbc chuffed gecode zlib))
+     (list cbc chuffed gecode or-tools zlib))
     (home-page "https://www.minizinc.org")
     (synopsis "High-level constraint modeling language")
     (description "MiniZinc is a high-level modeling language for constraint
-- 
2.47.1





This bug report was last modified 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.