2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cadical";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "1.5.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arminbiere";
|
|
|
|
repo = "cadical";
|
|
|
|
rev = "rel-${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-Po+pGoUwk1gtBqz4Sc/QQ52rRGbA2pATebX+KPYII5o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
outputs = [ "out" "dev" "lib" ];
|
2020-07-18 16:06:22 +00:00
|
|
|
doCheck = true;
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
# the configure script is not generated by autotools and does not accept the
|
|
|
|
# arguments that the default configurePhase passes like --prefix and --libdir
|
|
|
|
configurePhase = ''
|
|
|
|
runHook preConfigure
|
|
|
|
|
|
|
|
./configure
|
|
|
|
|
|
|
|
runHook postConfigure
|
|
|
|
'';
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
2021-08-05 21:33:18 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
install -Dm0755 build/cadical "$out/bin/cadical"
|
|
|
|
install -Dm0755 build/mobical "$out/bin/mobical"
|
2021-08-05 21:33:18 +00:00
|
|
|
install -Dm0644 src/ccadical.h "$dev/include/ccadical.h"
|
2021-10-17 02:12:59 +00:00
|
|
|
install -Dm0644 src/cadical.hpp "$dev/include/cadical.hpp"
|
2021-08-05 21:33:18 +00:00
|
|
|
install -Dm0644 build/libcadical.a "$lib/lib/libcadical.a"
|
|
|
|
mkdir -p "$out/share/doc/${pname}/"
|
|
|
|
install -Dm0755 {LICEN?E,README*,VERSION} "$out/share/doc/${pname}/"
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Simplified Satisfiability Solver";
|
|
|
|
maintainers = with maintainers; [ shnarazk ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "http://fmv.jku.at/cadical";
|
|
|
|
};
|
|
|
|
}
|