2015-06-14 21:55:08 +01:00
|
|
|
{ stdenv, fetchurl }:
|
2011-10-17 23:18:21 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "picosat";
|
2016-04-02 17:43:32 +01:00
|
|
|
version = "965";
|
2011-10-17 23:18:21 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "http://fmv.jku.at/picosat/${pname}-${version}.tar.gz";
|
2016-04-02 17:43:32 +01:00
|
|
|
sha256 = "0m578rpa5rdn08d10kr4lbsdwp4402hpavrz6n7n53xs517rn5hm";
|
2011-10-17 23:18:21 +01:00
|
|
|
};
|
|
|
|
|
2017-10-18 02:41:37 +01:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace picosat.c --replace "sys/unistd.h" "unistd.h"
|
2018-02-05 19:22:14 +00:00
|
|
|
|
|
|
|
substituteInPlace makefile.in \
|
|
|
|
--replace 'ar rc' '$(AR) rc' \
|
|
|
|
--replace 'ranlib' '$(RANLIB)'
|
2017-10-18 02:41:37 +01:00
|
|
|
'';
|
|
|
|
|
2016-04-02 17:45:47 +01:00
|
|
|
configurePhase = "./configure.sh --shared --trace";
|
2011-10-17 23:18:21 +01:00
|
|
|
|
2018-03-24 01:10:54 +00:00
|
|
|
makeFlags = stdenv.lib.optional stdenv.isDarwin
|
|
|
|
"SONAME=-Wl,-install_name,$(out)/lib/libpicosat.so";
|
|
|
|
|
2011-10-17 23:18:21 +01:00
|
|
|
installPhase = ''
|
2017-10-16 11:12:18 +01:00
|
|
|
mkdir -p $out/bin $out/lib $out/share $out/include/picosat
|
2016-04-02 17:45:47 +01:00
|
|
|
cp picomus picomcs picosat picogcnf "$out"/bin
|
2015-06-14 21:55:08 +01:00
|
|
|
|
2017-10-16 11:12:18 +01:00
|
|
|
cp VERSION "$out"/share/picosat.version
|
|
|
|
cp picosat.o "$out"/lib
|
2011-10-17 23:18:21 +01:00
|
|
|
cp libpicosat.a "$out"/lib
|
|
|
|
cp libpicosat.so "$out"/lib
|
2015-06-14 21:55:08 +01:00
|
|
|
|
2011-10-17 23:18:21 +01:00
|
|
|
cp picosat.h "$out"/include/picosat
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "SAT solver with proof and core support";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://fmv.jku.at/picosat/";
|
2015-06-14 21:55:08 +01:00
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ roconnor thoughtpolice ];
|
2011-10-17 23:18:21 +01:00
|
|
|
};
|
|
|
|
}
|