Files
nixpkgs/pkgs/by-name/as/aspino/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchurl,
fetchFromGitHub,
zlib,
boost,
}:
let
glucose' = fetchurl {
url = "http://www.labri.fr/perso/lsimon/downloads/softwares/glucose-syrup.tgz";
hash = "sha256-jboqQX/Z8RcPG30UVHaI7hLJKpgOCwCeha7BpaSgBS8=";
};
in
stdenv.mkDerivation {
pname = "aspino";
version = "0-unstable-2018-03-24";
src = fetchFromGitHub {
owner = "alviano";
repo = "aspino";
rev = "4d7483e328bdf9a00ef1eb7f2868e7b0f2a82d56";
hash = "sha256-R1TpBDGdq+NQQzmzqk0wYaz2Hns3qru0AkAyFPQasPA=";
};
buildInputs = [
zlib
boost
];
postPatch = ''
substituteInPlace Makefile \
--replace "GCC = g++" "GCC = c++"
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"
'';
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
'';
meta = {
description = "SAT/PseudoBoolean/MaxSat/ASP solver using glucose";
maintainers = [ ];
platforms = lib.platforms.unix;
license = lib.licenses.asl20;
homepage = "https://alviano.net/software/maxino/";
};
}