about summary refs log tree commit diff
path: root/pkgs/development/lisp-modules-new/patches/cl-sat.glucose-binary-from-PATH-if-present.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/lisp-modules-new/patches/cl-sat.glucose-binary-from-PATH-if-present.patch')
-rw-r--r--pkgs/development/lisp-modules-new/patches/cl-sat.glucose-binary-from-PATH-if-present.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/development/lisp-modules-new/patches/cl-sat.glucose-binary-from-PATH-if-present.patch b/pkgs/development/lisp-modules-new/patches/cl-sat.glucose-binary-from-PATH-if-present.patch
new file mode 100644
index 0000000000000..6a0d2d07666b2
--- /dev/null
+++ b/pkgs/development/lisp-modules-new/patches/cl-sat.glucose-binary-from-PATH-if-present.patch
@@ -0,0 +1,27 @@
+From 2040fcab5a7be2f28add46a1412bef62ac5ccf11 Mon Sep 17 00:00:00 2001
+From: Maximilian Marx <mmarx@wh2.tu-dresden.de>
+Date: Thu, 24 Nov 2022 20:00:33 +0100
+Subject: [PATCH] Use glucose binary from PATH if present
+
+---
+ src/package.lisp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/package.lisp b/src/package.lisp
+index b6e26ac..bdb2581 100644
+--- a/src/package.lisp
++++ b/src/package.lisp
+@@ -13,7 +13,9 @@
+ (defvar *glucose-home* (asdf:system-relative-pathname :cl-sat.glucose "glucose-syrup/"))
+ 
+ (defun glucose-binary (&optional (*glucose-home* *glucose-home*))
+-  (merge-pathnames "simp/glucose_static" *glucose-home*))
++  (if (trivial-package-manager:which "glucose")
++      "glucose"
++      (merge-pathnames "simp/glucose_static" *glucose-home*)))
+ 
+ (defmethod solve ((input pathname) (solver (eql :glucose)) &rest options &key debug &allow-other-keys)
+   (remf options :debug)
+-- 
+2.36.2
+