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