2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
2020-04-04 15:22:36 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cadical";
|
2022-09-25 01:44:33 +00:00
|
|
|
version = "1.5.3";
|
2020-04-04 15:22:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arminbiere";
|
|
|
|
repo = "cadical";
|
|
|
|
rev = "rel-${version}";
|
2022-09-25 01:44:33 +00:00
|
|
|
sha256 = "sha256-3H/vowWfE1jfomYg2hOi3B3zjWa4CaLHAJXnoKWzskU=";
|
2020-04-04 15:22:36 +00:00
|
|
|
};
|
|
|
|
|
2021-07-19 12:00:00 +00:00
|
|
|
outputs = [ "out" "dev" "lib" ];
|
2020-06-24 05:39:37 +00:00
|
|
|
doCheck = true;
|
2021-07-19 12:00:00 +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-06-24 05:39:37 +00:00
|
|
|
|
2020-04-04 15:22:36 +00:00
|
|
|
installPhase = ''
|
2021-07-19 12:00:00 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-04 15:22:36 +00:00
|
|
|
install -Dm0755 build/cadical "$out/bin/cadical"
|
|
|
|
install -Dm0755 build/mobical "$out/bin/mobical"
|
2021-07-19 12:00:00 +00:00
|
|
|
install -Dm0644 src/ccadical.h "$dev/include/ccadical.h"
|
2021-10-14 20:54:23 +00:00
|
|
|
install -Dm0644 src/cadical.hpp "$dev/include/cadical.hpp"
|
2021-07-19 12:00:00 +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-04 15:22:36 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-04 15:22:36 +00:00
|
|
|
description = "Simplified Satisfiability Solver";
|
|
|
|
maintainers = with maintainers; [ shnarazk ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "http://fmv.jku.at/cadical";
|
|
|
|
};
|
|
|
|
}
|