Merge pull request #202726 from mmarx/fix-trivial-package-manager

lispPackages_new.sbclPackages.cl-sat: fix build failure
This commit is contained in:
7c6f434c 2022-11-26 17:34:48 +00:00 committed by GitHub
commit 9cb45d89b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 1 deletions

View file

@ -40,6 +40,7 @@ let
removeSuffix
hasInfix
optionalString
makeBinPath
makeLibraryPath
makeSearchPath
recurseIntoAttrs
@ -249,6 +250,12 @@ let
then pkgs.applyPatches { inherit (args) src patches; }
else args.src;
patches = [];
# make sure that propagated build-inputs from lispLibs are propagated
propagatedBuildInputs = lib.unique
(builtins.concatLists
(lib.catAttrs "propagatedBuildInputs"
(builtins.concatLists [[args] lispLibs nativeLibs javaLibs])));
})));
# Build the set of lisp packages using `lisp`
@ -353,7 +360,9 @@ let
--prefix LD_LIBRARY_PATH : "${o.LD_LIBRARY_PATH}" \
--prefix LD_LIBRARY_PATH : "${makeLibraryPath o.nativeLibs}" \
--prefix CLASSPATH : "${o.CLASSPATH}" \
--prefix CLASSPATH : "${makeSearchPath "share/java/*" o.javaLibs}"
--prefix CLASSPATH : "${makeSearchPath "share/java/*" o.javaLibs}" \
--prefix PATH : "${makeBinPath (o.buildInputs or [])}" \
--prefix PATH : "${makeBinPath (o.propagatedBuildInputs or [])}"
'';
});

View file

@ -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

View file

@ -190,6 +190,17 @@ let
nativeBuildInputs = [ pkgs.zeromq ];
nativeLibs = [ pkgs.zeromq ];
};
trivial-package-manager = pkg: {
propagatedBuildInputs = [ pkgs.which ];
};
"cl-sat.glucose" = pkg: {
propagatedBuildInputs = [ pkgs.glucose ];
patches = [ ./patches/cl-sat.glucose-binary-from-PATH-if-present.patch ];
};
"cl-sat.minisat" = pkg: {
propagatedBuildInputs = [ pkgs.minisat ];
};
};
qlpkgs =