push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
From 2c7829aec41f6915bda2a23af57f0b39b075a70b Mon Sep 17 00:00:00 2001
From: C4 Patino <c4patino@gmail.com>
Date: Wed, 3 Sep 2025 22:43:05 -0500
Subject: [PATCH] path changes for nix
---
books/build/features.sh | 1 +
books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp | 6 +-----
.../bundle/software/cl+ssl-20231021-git/src/reload.lisp | 2 ++
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/books/build/features.sh b/books/build/features.sh
index 20ef1f1cc7..e8a16396e3 100755
--- a/books/build/features.sh
+++ b/books/build/features.sh
@@ -125,6 +125,7 @@ EOF
fi
echo "Determining whether an ipasir shared library is installed" 1>&2
+IPASIR_SHARED_LIBRARY=${IPASIR_SHARED_LIBRARY:-@libipasir@}
if check_ipasir; then
cat >> Makefile-features <<EOF
export OS_HAS_IPASIR ?= 1
diff --git a/books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp b/books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp
index 762e4ad4c0..abc95d0ad8 100644
--- a/books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp
+++ b/books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp
@@ -30,11 +30,7 @@
(er-let* ((libname (acl2::getenv$ "IPASIR_SHARED_LIBRARY" acl2::*the-live-state*)))
(handler-case
- (cffi::load-foreign-library
- (or libname
- (cw "WARNING: $IPASIR_SHARED_LIBRARY not specified, ~
- defaulting to \"libipasirglucose4.so\"")
- "libipasirglucose4.so"))
+(cffi::load-foreign-library (or libname "@libipasir@"))
(error () (er hard? 'load-ipasir-shardlib-raw
"Couldn't load ipasir shared library from ~s0."
libname))))
diff --git a/books/quicklisp/bundle/software/cl+ssl-20231021-git/src/reload.lisp b/books/quicklisp/bundle/software/cl+ssl-20231021-git/src/reload.lisp
index 05ab8837d0..fb60937580 100644
--- a/books/quicklisp/bundle/software/cl+ssl-20231021-git/src/reload.lisp
+++ b/books/quicklisp/bundle/software/cl+ssl-20231021-git/src/reload.lisp
@@ -14,6 +14,8 @@
;;; put this directly into ffi.lisp
(in-package :cl+ssl)
+(cl+ssl/config:define-libssl-path "@libssl@")
+(cl+ssl/config:define-libcrypto-path "@libcrypto@")
;; The default OS-X libssl seems have had insufficient crypto algos
;; (missing TLSv1_[1,2]_XXX methods,
--
2.50.1

View File

@@ -0,0 +1,201 @@
{
lib,
stdenv,
callPackage,
fetchFromGitHub,
runCommandLocal,
makeWrapper,
replaceVars,
sbcl,
which,
perl,
hostname,
openssl,
glucose,
minisat,
abc-verifier,
z3,
python3,
certifyBooks ? true,
}@args:
let
# Disable immobile space so we don't run out of memory on large books, and
# supply 2GB of dynamic space to avoid exhausting the heap while building the
# ACL2 system itself; see
# https://www.cs.utexas.edu/users/moore/acl2/current/HTML/installation/requirements.html#Obtaining-SBCL
sbcl' = args.sbcl.overrideAttrs { disableImmobileSpace = true; };
sbcl = runCommandLocal args.sbcl.name { nativeBuildInputs = [ makeWrapper ]; } ''
makeWrapper ${sbcl'}/bin/sbcl $out/bin/sbcl \
--add-flags "--dynamic-space-size 2000"
'';
in
stdenv.mkDerivation rec {
pname = "acl2";
version = "8.6";
src = fetchFromGitHub {
owner = "acl2-devel";
repo = "acl2-devel";
rev = version;
sha256 = "sha256-fF9bbEacwCHP1m/eVgFrTD4Ne7L2mzq0K9vJ1tiy9go=";
};
# You can swap this out with any other IPASIR implementation at
# build time by using overrideAttrs (make sure the derivation you
# use has a "libname" attribute so we can plug it into the patch
# below). Or, you can override it at runtime by setting the
# $IPASIR_SHARED_LIBRARY environment variable.
libipasir = callPackage ./libipasirglucose4 { };
patches = [
(replaceVars ./0001-path-changes-for-nix.patch {
libipasir = "${libipasir}/lib/${libipasir.libname}";
libssl = "${lib.getLib openssl}/lib/libssl${stdenv.hostPlatform.extensions.sharedLibrary}";
libcrypto = "${lib.getLib openssl}/lib/libcrypto${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];
# We need the timestamps on the source tree to be stable for certification to
# work properly, so reset them here as necessary after patching
postPatch = ''
find . -type f -newer "$src" -execdir touch -r "$src" {} +
'';
nativeBuildInputs = lib.optional certifyBooks makeWrapper;
buildInputs = [
# ACL2 itself only needs a Common Lisp compiler/interpreter:
sbcl
]
++ lib.optionals certifyBooks [
# To build community books, we need Perl and a couple of utilities:
which
perl
hostname
# Some of the books require one or more of these external tools:
glucose
minisat
abc-verifier
libipasir
z3
(python3.withPackages (ps: [ ps.z3-solver ]))
];
# NOTE: Parallel building can be memory-intensive depending on the number of
# concurrent jobs. For example, this build has been seen to use >120GB of
# RAM on an 85 core machine.
enableParallelBuilding = true;
preConfigure = ''
# When certifying books, ACL2 doesn't like $HOME not existing.
export HOME=$(pwd)/fake-home
''
+ lib.optionalString certifyBooks ''
# Some books also care about $USER being nonempty.
export USER=nobody
'';
postConfigure = ''
# ACL2 and its books need to be built in place in the out directory because
# the proof artifacts are not relocatable. Since ACL2 mostly expects
# everything to exist in the original source tree layout, we put it in
# $out/share/${pname} and create symlinks in $out/bin as necessary.
mkdir -p $out/share/${pname}
cp -pR . $out/share/${pname}
cd $out/share/${pname}
'';
preBuild = "mkdir -p $HOME";
makeFlags = [
"LISP=${sbcl}/bin/sbcl"
"ACL2_MAKE_LOG=NONE"
];
doCheck = true;
checkTarget = "mini-proveall";
installPhase = ''
mkdir -p $out/bin
ln -s $out/share/${pname}/saved_acl2 $out/bin/${pname}
''
+ lib.optionalString certifyBooks ''
ln -s $out/share/${pname}/books/build/cert.pl $out/bin/${pname}-cert
ln -s $out/share/${pname}/books/build/clean.pl $out/bin/${pname}-clean
'';
preDistPhases = [ (if certifyBooks then "certifyBooksPhase" else "removeBooksPhase") ];
certifyBooksPhase = ''
# Certify the community books
pushd $out/share/${pname}/books
makeFlags="ACL2=$out/share/${pname}/saved_acl2"
buildFlags="all"
buildPhase
# Clean up some stuff to save space
find -name '*@useless-runes.lsp' -execdir rm {} + # saves ~1GB of space
find -name '*.cert.out' -execdir gzip {} + # saves ~400MB of space
popd
'';
removeBooksPhase = ''
# Delete the community books
rm -rf $out/share/${pname}/books
'';
meta = with lib; {
description = "Interpreter and prover for a Lisp dialect";
mainProgram = "acl2";
longDescription = ''
ACL2 is a logic and programming language in which you can model computer
systems, together with a tool to help you prove properties of those
models. "ACL2" denotes "A Computational Logic for Applicative Common
Lisp".
ACL2 is part of the Boyer-Moore family of provers, for which its authors
have received the 2005 ACM Software System Award.
This package installs the main ACL2 executable ${pname}, as well as the
build tools cert.pl and clean.pl, renamed to ${pname}-cert and
${pname}-clean.
''
+ (
if certifyBooks then
''
The community books are also included and certified with the `make
everything` target.
''
else
''
The community books are not included in this package.
''
);
homepage = "https://www.cs.utexas.edu/users/moore/acl2/";
downloadPage = "https://github.com/acl2-devel/acl2-devel/releases";
license =
with licenses;
[
# ACL2 itself is bsd3
bsd3
]
++ optionals certifyBooks [
# The community books are mostly bsd3 or mit but with a few
# other things thrown in.
mit
gpl2
llgpl21
cc0
publicDomain
unfreeRedistributable
];
maintainers = with maintainers; [
kini
raskin
];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,46 @@
From 0f48e046f44624f4d4d8255ac5bd26397a38f16c Mon Sep 17 00:00:00 2001
From: Keshav Kini <keshav.kini@gmail.com>
Date: Sun, 23 Feb 2020 14:09:30 -0800
Subject: [PATCH] Support shared library build
Patch taken from [the ACL2 Books documentation][1].
- Add " -fPIC" to the CXXFLAGS to build position-independent code,
required for shared libraries.
- Add the line "export CXXFLAGS" below the setting of CXXFLAGS, so that
those flags apply to the recursive make of the core solver library.
- Fix a typo: replace the occurrence of "CXXLAGS" with "CXXFLAGS".
[1]: http://www.cs.utexas.edu/users/moore/acl2/v8-2/combined-manual/index.html?topic=IPASIR____BUILDING-AN-IPASIR-SOLVER-LIBRARY
---
makefile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/makefile b/makefile
index 07121de..4e85c4b 100755
--- a/makefile
+++ b/makefile
@@ -29,7 +29,8 @@ TARGET=libipasir$(SIG).a
CXX=g++
-CXXFLAGS= -g -std=c++11 -Wall -DNDEBUG -O3
+CXXFLAGS= -g -std=c++11 -Wall -DNDEBUG -O3 -fPIC
+export CXXFLAGS
#-----------------------------------------------------------------------#
#- REQUIRED TOP RULES --------------------------------------------------#
@@ -67,7 +68,7 @@ libipasir$(SIG).a: .FORCE
#-----------------------------------------------------------------------#
ipasir$(NAME)glue.o: ipasir$(NAME)glue.cc ipasir.h makefile
- $(CXX) -g -std=c++11 $(CXXLAGS) \
+ $(CXX) -g -std=c++11 $(CXXFLAGS) \
-DVERSION=\"$(VERSION)\" \
-I$(DIR) -I$(DIR)/core -c ipasir$(NAME)glue.cc
--
2.23.1

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchurl,
zlib,
unzip,
}:
stdenv.mkDerivation rec {
pname = "libipasirglucose4";
# This library has no version number AFAICT (beyond generally being based on
# Glucose 4.x), but it was submitted to the 2017 SAT competition so let's use
# that as the version number, I guess.
version = "2017";
libname = pname + stdenv.hostPlatform.extensions.sharedLibrary;
src = fetchurl {
url = "https://baldur.iti.kit.edu/sat-competition-2017/solvers/incremental/glucose-ipasir.zip";
sha256 = "0xchgady9vwdh8frmc8swz6va53igp2wj1y9sshd0g7549n87wdj";
};
nativeBuildInputs = [ unzip ];
buildInputs = [ zlib ];
sourceRoot = "sat/glucose4";
patches = [ ./0001-Support-shared-library-build.patch ];
makeFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ];
postBuild = ''
$CXX -shared -o ${libname} \
${lib.optionalString (!stdenv.cc.isClang) "-Wl,-soname,${libname}"} \
ipasirglucoseglue.o libipasirglucose4.a
'';
installPhase = ''
install -D ${libname} $out/lib/${libname}
'';
meta = with lib; {
description = "Shared library providing IPASIR interface to the Glucose SAT solver";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ kini ];
};
}