aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerman Rimm <herman@rimm.ee>2024-03-30 12:42:40 +0100
committerAndreas Enge <andreas@enge.fr>2024-05-15 15:06:49 +0200
commitfcf6d663e33eecd7678663c4bc44adf7c0aabce2 (patch)
treeb749bb21eb39e1c667896ebe0b8d492f746e3e83
parentb53fac227836bcec3a2a7a44f7720b9a23db90f2 (diff)
downloadguix-fcf6d663e33eecd7678663c4bc44adf7c0aabce2.tar.gz
guix-fcf6d663e33eecd7678663c4bc44adf7c0aabce2.zip
gnu: minizinc: Add chuffed backend.
* gnu/packages/maths.scm (minizinc): Add backend. Change-Id: If178a7585d70eb4b6f3223f5f6b2f34d9d2f2257 Signed-off-by: Andreas Enge <andreas@enge.fr>
-rw-r--r--gnu/packages/maths.scm17
1 files changed, 10 insertions, 7 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6f6b1c2eba..3884506c5b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4121,9 +4121,9 @@ book.")
(lambda (file)
(member file (cons* "." ".." targets)))
(scandir ".")))
- (substitute* "libmzn.cmake"
- (("include\\(cmake/targets/(.*)\\)" all target)
- (if (member target targets) all "")))))
+ (substitute* "libmzn.cmake"
+ (("include\\(cmake/targets/(.*)\\)" all target)
+ (if (member target targets) all "")))))
(with-directory-excursion "include/minizinc/solvers/MIP"
(for-each delete-file
(remove
@@ -4162,9 +4162,10 @@ book.")
(modify-phases %standard-phases
(add-after 'install 'install-solver-configs
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((gecode (assoc-ref inputs "gecode"))
+ (let ((chuffed (assoc-ref inputs "chuffed"))
+ (gecode (assoc-ref inputs "gecode"))
(pkgdatadir (string-append (assoc-ref outputs "out")
- "/share/minizinc")))
+ "/share/minizinc")))
(call-with-output-file (string-append pkgdatadir
"/Preferences.json")
(lambda (port)
@@ -4179,7 +4180,9 @@ book.")
port)
(newline port)))
- (mkdir-p (string-append pkgdatadir "/solvers"))
+ (copy-recursively
+ (string-append chuffed "/share/minizinc/solvers")
+ (string-append pkgdatadir "/solvers"))
(call-with-output-file (string-append pkgdatadir
"/solvers/gecode.msc")
(lambda (port)
@@ -4206,7 +4209,7 @@ book.")
(native-inputs
(list bison flex))
(inputs
- (list cbc gecode zlib))
+ (list cbc chuffed gecode zlib))
(home-page "https://www.minizinc.org")
(synopsis "High-level constraint modeling language")
(description "MiniZinc is a high-level modeling language for constraint