2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchFromGitHub, zlib, boost }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
glucose' = fetchurl {
|
|
|
|
url = "http://www.labri.fr/perso/lsimon/downloads/softwares/glucose-syrup.tgz";
|
|
|
|
sha256 = "0bq5l2jabhdfhng002qfk0mcj4pfi1v5853x3c7igwfrgx0jmfld";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "aspino";
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "unstable-2018-03-24";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alviano";
|
|
|
|
repo = "aspino";
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "4d7483e328bdf9a00ef1eb7f2868e7b0f2a82d56";
|
|
|
|
hash = "sha256-R1TpBDGdq+NQQzmzqk0wYaz2Hns3qru0AkAyFPQasPA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ zlib boost ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "GCC = g++" "GCC = c++"
|
|
|
|
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
cp ${glucose'} patches/glucose-syrup.tgz
|
|
|
|
./bootstrap.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -m0755 build/release/{aspino,fairino-{bs,ls,ps},maxino-2015-{k16,kdyn}} $out/bin
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "SAT/PseudoBoolean/MaxSat/ASP solver using glucose";
|
|
|
|
maintainers = with maintainers; [ gebner ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://alviano.net/software/maxino/";
|
|
|
|
# See pkgs/applications/science/logic/glucose/default.nix
|
|
|
|
badPlatforms = [ "aarch64-linux" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
# src/MaxSatSolver.cc:280:62: error: ordered comparison between pointer and zero ('unsigned int *' and 'int')
|
|
|
|
broken = (stdenv.isDarwin && stdenv.isx86_64); # broken since 2019-05-07 on hydra
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|