nixpkgs/pkgs/by-name/as/aspino/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, fetchFromGitHub, zlib, boost }:
let
glucose' = fetchurl {
url = "http://www.labri.fr/perso/lsimon/downloads/softwares/glucose-syrup.tgz";
sha256 = "0bq5l2jabhdfhng002qfk0mcj4pfi1v5853x3c7igwfrgx0jmfld";
};
in
2019-08-13 21:52:01 +00:00
stdenv.mkDerivation {
pname = "aspino";
2022-05-13 15:53:37 +00:00
version = "unstable-2018-03-24";
2016-06-21 11:55:28 +00:00
src = fetchFromGitHub {
owner = "alviano";
repo = "aspino";
2022-05-13 15:53:37 +00:00
rev = "4d7483e328bdf9a00ef1eb7f2868e7b0f2a82d56";
hash = "sha256-R1TpBDGdq+NQQzmzqk0wYaz2Hns3qru0AkAyFPQasPA=";
2016-06-21 11:55:28 +00:00
};
buildInputs = [ zlib boost ];
postPatch = ''
substituteInPlace Makefile \
--replace "GCC = g++" "GCC = c++"
2022-11-01 15:21:54 +00:00
substituteInPlace src/main.cc \
--replace "defined(__linux__)" "defined(__linux__) && defined(__x86_64__)"
substituteInPlace src/MaxSatSolver.cc \
--replace "occ[i][sign(softLiterals[j])] > 0" "occ[i][sign(softLiterals[j])] != 0"
'';
2016-06-21 11:55:28 +00:00
preBuild = ''
cp ${glucose'} patches/glucose-syrup.tgz
2016-06-21 11:55:28 +00:00
./bootstrap.sh
'';
installPhase = ''
runHook preInstall
2016-06-21 11:55:28 +00:00
mkdir -p $out/bin
install -m0755 build/release/{aspino,fairino-{bs,ls,ps},maxino-2015-{k16,kdyn}} $out/bin
runHook postInstall
2016-06-21 11:55:28 +00:00
'';
meta = with lib; {
2016-06-21 11:55:28 +00:00
description = "SAT/PseudoBoolean/MaxSat/ASP solver using glucose";
maintainers = with maintainers; [ gebner ];
2016-06-21 11:55:28 +00:00
platforms = platforms.unix;
license = licenses.asl20;
homepage = "https://alviano.net/software/maxino/";
2016-06-21 11:55:28 +00:00
};
}