2021-01-23 14:15:07 +01:00
|
|
|
{ lib, stdenv, fetchurl, zlib, unzip }:
|
acl2, acl2-minimal: build standard library, init
Before this commit, we only built the main ACL2 executable. Most users
will also want the standard library (the "Community Books"), so after
this commit, we build the entire `make everything` suite, which includes
essentially everything provided in the ACL2 repository.
There's also a new top-level package called `acl2-minimal` which has
just the core ACL2 executable, for those who really only want that.
Future work: modularize the build so that we can support multiple
different subsets of the standard library. A lot of the stuff in this
complete build is probably superfluous to almost all users. Also,
because some of the books have unclear or idiosyncratic licenses, the
full build will not be cached on cache.nixos.org, and installing it will
mean spending a few hours building it. So it would be good to have a
pared down build which excluded non-free books and things that people
rarely or never use.
2020-02-24 06:12:37 +01:00
|
|
|
|
2021-05-11 20:56:43 +02:00
|
|
|
let
|
|
|
|
|
|
|
|
cxx = "${stdenv.cc.targetPrefix}c++";
|
|
|
|
libName = "libipasirglucose4" + stdenv.targetPlatform.extensions.sharedLibrary;
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
acl2, acl2-minimal: build standard library, init
Before this commit, we only built the main ACL2 executable. Most users
will also want the standard library (the "Community Books"), so after
this commit, we build the entire `make everything` suite, which includes
essentially everything provided in the ACL2 repository.
There's also a new top-level package called `acl2-minimal` which has
just the core ACL2 executable, for those who really only want that.
Future work: modularize the build so that we can support multiple
different subsets of the standard library. A lot of the stuff in this
complete build is probably superfluous to almost all users. Also,
because some of the books have unclear or idiosyncratic licenses, the
full build will not be cached on cache.nixos.org, and installing it will
mean spending a few hours building it. So it would be good to have a
pared down build which excluded non-free books and things that people
rarely or never use.
2020-02-24 06:12:37 +01:00
|
|
|
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";
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
|
2021-05-11 20:56:43 +02:00
|
|
|
makeFlags = [ "CXX=${cxx}" ];
|
|
|
|
|
acl2, acl2-minimal: build standard library, init
Before this commit, we only built the main ACL2 executable. Most users
will also want the standard library (the "Community Books"), so after
this commit, we build the entire `make everything` suite, which includes
essentially everything provided in the ACL2 repository.
There's also a new top-level package called `acl2-minimal` which has
just the core ACL2 executable, for those who really only want that.
Future work: modularize the build so that we can support multiple
different subsets of the standard library. A lot of the stuff in this
complete build is probably superfluous to almost all users. Also,
because some of the books have unclear or idiosyncratic licenses, the
full build will not be cached on cache.nixos.org, and installing it will
mean spending a few hours building it. So it would be good to have a
pared down build which excluded non-free books and things that people
rarely or never use.
2020-02-24 06:12:37 +01:00
|
|
|
postBuild = ''
|
2021-05-11 20:56:43 +02:00
|
|
|
${cxx} -shared -o ${libName} \
|
|
|
|
${if stdenv.cc.isClang then "" else "-Wl,-soname,${libName}"} \
|
acl2, acl2-minimal: build standard library, init
Before this commit, we only built the main ACL2 executable. Most users
will also want the standard library (the "Community Books"), so after
this commit, we build the entire `make everything` suite, which includes
essentially everything provided in the ACL2 repository.
There's also a new top-level package called `acl2-minimal` which has
just the core ACL2 executable, for those who really only want that.
Future work: modularize the build so that we can support multiple
different subsets of the standard library. A lot of the stuff in this
complete build is probably superfluous to almost all users. Also,
because some of the books have unclear or idiosyncratic licenses, the
full build will not be cached on cache.nixos.org, and installing it will
mean spending a few hours building it. So it would be good to have a
pared down build which excluded non-free books and things that people
rarely or never use.
2020-02-24 06:12:37 +01:00
|
|
|
ipasirglucoseglue.o libipasirglucose4.a
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-11 20:56:43 +02:00
|
|
|
install -D ${libName} $out/lib/${libName}
|
acl2, acl2-minimal: build standard library, init
Before this commit, we only built the main ACL2 executable. Most users
will also want the standard library (the "Community Books"), so after
this commit, we build the entire `make everything` suite, which includes
essentially everything provided in the ACL2 repository.
There's also a new top-level package called `acl2-minimal` which has
just the core ACL2 executable, for those who really only want that.
Future work: modularize the build so that we can support multiple
different subsets of the standard library. A lot of the stuff in this
complete build is probably superfluous to almost all users. Also,
because some of the books have unclear or idiosyncratic licenses, the
full build will not be cached on cache.nixos.org, and installing it will
mean spending a few hours building it. So it would be good to have a
pared down build which excluded non-free books and things that people
rarely or never use.
2020-02-24 06:12:37 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-23 14:15:07 +01:00
|
|
|
meta = with lib; {
|
acl2, acl2-minimal: build standard library, init
Before this commit, we only built the main ACL2 executable. Most users
will also want the standard library (the "Community Books"), so after
this commit, we build the entire `make everything` suite, which includes
essentially everything provided in the ACL2 repository.
There's also a new top-level package called `acl2-minimal` which has
just the core ACL2 executable, for those who really only want that.
Future work: modularize the build so that we can support multiple
different subsets of the standard library. A lot of the stuff in this
complete build is probably superfluous to almost all users. Also,
because some of the books have unclear or idiosyncratic licenses, the
full build will not be cached on cache.nixos.org, and installing it will
mean spending a few hours building it. So it would be good to have a
pared down build which excluded non-free books and things that people
rarely or never use.
2020-02-24 06:12:37 +01:00
|
|
|
description = "Shared library providing IPASIR interface to the Glucose SAT solver";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ kini ];
|
|
|
|
};
|
|
|
|
}
|