3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/logic/picosat/default.nix

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

45 lines
1.2 KiB
Nix
Raw Normal View History

2021-01-15 13:21:58 +00:00
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "picosat";
2016-04-02 17:43:32 +01:00
version = "965";
src = fetchurl {
url = "http://fmv.jku.at/picosat/${pname}-${version}.tar.gz";
2016-04-02 17:43:32 +01:00
sha256 = "0m578rpa5rdn08d10kr4lbsdwp4402hpavrz6n7n53xs517rn5hm";
};
2017-10-18 02:41:37 +01:00
prePatch = ''
substituteInPlace picosat.c --replace "sys/unistd.h" "unistd.h"
substituteInPlace makefile.in \
--replace 'ar rc' '$(AR) rc' \
--replace 'ranlib' '$(RANLIB)'
2017-10-18 02:41:37 +01:00
'';
configurePhase = "./configure.sh --shared --trace";
2021-01-15 13:21:58 +00:00
makeFlags = lib.optional stdenv.isDarwin
"SONAME=-Wl,-install_name,$(out)/lib/libpicosat.so";
installPhase = ''
mkdir -p $out/bin $out/lib $out/share $out/include/picosat
cp picomus picomcs picosat picogcnf "$out"/bin
cp VERSION "$out"/share/picosat.version
cp picosat.o "$out"/lib
cp libpicosat.a "$out"/lib
cp libpicosat.so "$out"/lib
cp picosat.h "$out"/include/picosat
'';
meta = {
description = "SAT solver with proof and core support";
homepage = "http://fmv.jku.at/picosat/";
2021-01-15 13:21:58 +00:00
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ roconnor thoughtpolice ];
};
}