2018-02-05 20:28:14 +01:00
|
|
|
{ stdenv, fetchurl, writeShellScriptBin }:
|
2014-04-06 18:47:42 +02:00
|
|
|
|
2017-07-18 10:20:34 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "boolector-${version}";
|
|
|
|
version = "2.4.1";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://fmv.jku.at/boolector/boolector-${version}-with-lingeling-bbc.tar.bz2";
|
|
|
|
sha256 = "0mdf7hwix237pvknvrpazcx6s3ininj5k7vhysqjqgxa7lxgq045";
|
2014-04-06 18:47:42 +02:00
|
|
|
};
|
|
|
|
|
2018-02-05 20:28:14 +01:00
|
|
|
prePatch =
|
|
|
|
let
|
|
|
|
lingelingPatch = writeShellScriptBin "lingeling-patch" ''
|
|
|
|
sed -i -e "1i#include <stdint.h>" lingeling/lglib.h
|
|
|
|
|
|
|
|
${crossFix}/bin/crossFix lingeling
|
|
|
|
'';
|
|
|
|
crossFix = writeShellScriptBin "crossFix" ''
|
|
|
|
# substituteInPlace not available here
|
|
|
|
sed -i $1/makefile.in \
|
|
|
|
-e 's@ar rc@$(AR) rc@' \
|
|
|
|
-e 's@ranlib@$(RANLIB)@'
|
|
|
|
'';
|
|
|
|
in ''
|
|
|
|
sed -i -e 's@mv lingeling\* lingeling@\0 \&\& ${lingelingPatch}/bin/lingeling-patch@' makefile
|
|
|
|
sed -i -e 's@mv boolector\* boolector@\0 \&\& ${crossFix}/bin/crossFix boolector@' makefile
|
2017-10-18 06:39:19 +02:00
|
|
|
'';
|
|
|
|
|
2014-04-06 18:47:42 +02:00
|
|
|
installPhase = ''
|
2017-07-18 10:20:34 +02:00
|
|
|
mkdir $out
|
|
|
|
mv boolector/bin $out
|
2014-04-06 18:47:42 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2017-07-18 10:20:34 +02:00
|
|
|
license = stdenv.lib.licenses.unfreeRedistributable;
|
2014-04-06 18:47:42 +02:00
|
|
|
description = "An extremely fast SMT solver for bit-vectors and arrays";
|
|
|
|
homepage = "http://fmv.jku.at/boolector";
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
2017-07-18 10:20:34 +02:00
|
|
|
}
|