uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
32
pkgs/applications/science/logic/abc/default.nix
Normal file
32
pkgs/applications/science/logic/abc/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, readline, cmake
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abc-verifier";
|
||||
version = "2022.03.22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "yosyshq";
|
||||
repo = "abc";
|
||||
rev = "00b674d5b3ccefc7f2abcbf5b650fc14298ac549";
|
||||
hash = "sha256-jQgHptARRuhlF+8R92so8PyBTI5t/q/rSGO5yce5WSs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ readline ];
|
||||
|
||||
installPhase = "mkdir -p $out/bin && mv abc $out/bin";
|
||||
|
||||
# needed by yosys
|
||||
passthru.rev = src.rev;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool for squential logic synthesis and formal verification";
|
||||
homepage = "https://people.eecs.berkeley.edu/~alanmi/abc";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
mainProgram = "abc";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
38
pkgs/applications/science/logic/abella/default.nix
Normal file
38
pkgs/applications/science/logic/abella/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchurl, rsync, ocamlPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abella";
|
||||
version = "2.0.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://abella-prover.org/distributions/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-/eOiebMFHgrurtrSHPlgZO3xmmxBOUmyAzswXZLd3Yc=";
|
||||
};
|
||||
|
||||
buildInputs = [ rsync ] ++ (with ocamlPackages; [ ocaml ocamlbuild findlib ]);
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
rsync -av abella $out/bin/
|
||||
|
||||
mkdir -p $out/share/emacs/site-lisp/abella/
|
||||
rsync -av emacs/ $out/share/emacs/site-lisp/abella/
|
||||
|
||||
mkdir -p $out/share/abella/examples
|
||||
rsync -av examples/ $out/share/abella/examples/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Interactive theorem prover";
|
||||
longDescription = ''
|
||||
Abella is an interactive theorem prover based on lambda-tree syntax.
|
||||
This means that Abella is well-suited for reasoning about the meta-theory
|
||||
of programming languages and other logical systems which manipulate
|
||||
objects with binding.
|
||||
'';
|
||||
homepage = "http://abella-prover.org/";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [ bcdarwin ciil ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
30
pkgs/applications/science/logic/acgtk/default.nix
Normal file
30
pkgs/applications/science/logic/acgtk/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchurl, dune_2, ocamlPackages }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
pname = "acgtk";
|
||||
version = "1.5.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://acg.loria.fr/software/acg-1.5.2-20201204.tar.gz";
|
||||
sha256 = "09yax7dyw8kgwzlb69r9d20y7rrymzwi3bbq2dh0qdq01vjz2xwq";
|
||||
};
|
||||
|
||||
buildInputs = [ dune_2 ] ++ (with ocamlPackages; [
|
||||
ocaml findlib ansiterminal cairo2 cmdliner fmt logs menhir menhirLib mtime yojson
|
||||
]);
|
||||
|
||||
buildPhase = "dune build --profile=release";
|
||||
|
||||
installPhase = ''
|
||||
dune install --prefix $out --libdir $OCAMLFIND_DESTDIR
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://acg.loria.fr/";
|
||||
description = "A toolkit for developing ACG signatures and lexicon";
|
||||
license = licenses.cecill20;
|
||||
inherit (ocamlPackages.ocaml.meta) platforms;
|
||||
maintainers = [ maintainers.jirkamarsik ];
|
||||
};
|
||||
}
|
||||
55
pkgs/applications/science/logic/aiger/default.nix
Normal file
55
pkgs/applications/science/logic/aiger/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, stdenv, fetchurl, picosat }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aiger";
|
||||
version = "1.9.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://fmv.jku.at/aiger/${pname}-${version}.tar.gz";
|
||||
sha256 = "1ish0dw0nf9gyghxsdhpy1jjiy5wp54c993swp85xp7m6vdx6l0y";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configurePhase = ''
|
||||
# Set up picosat, so we can build 'aigbmc'
|
||||
mkdir ../picosat
|
||||
ln -s ${picosat}/include/picosat/picosat.h ../picosat/picosat.h
|
||||
ln -s ${picosat}/lib/picosat.o ../picosat/picosat.o
|
||||
ln -s ${picosat}/share/picosat.version ../picosat/VERSION
|
||||
./configure.sh
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $dev/include $lib/lib
|
||||
|
||||
# Do the installation manually, as the Makefile has odd
|
||||
# cyrillic characters, and this is easier than adding
|
||||
# a whole .patch file.
|
||||
BINS=( \
|
||||
aigand aigdd aigflip aigfuzz aiginfo aigjoin \
|
||||
aigmiter aigmove aignm aigor aigreset aigsim \
|
||||
aigsplit aigstrip aigtoaig aigtoblif aigtocnf \
|
||||
aigtodot aigtosmv aigunconstraint aigunroll \
|
||||
andtoaig bliftoaig smvtoaig soltostim wrapstim \
|
||||
aigbmc aigdep
|
||||
)
|
||||
|
||||
for x in ''${BINS[*]}; do
|
||||
install -m 755 -s $x $out/bin/$x
|
||||
done
|
||||
|
||||
cp -v aiger.o $lib/lib
|
||||
cp -v aiger.h $dev/include
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" "lib" ];
|
||||
|
||||
meta = {
|
||||
description = "And-Inverter Graph (AIG) utilities";
|
||||
homepage = "http://fmv.jku.at/aiger/";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ thoughtpolice ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
53
pkgs/applications/science/logic/alt-ergo/default.nix
Normal file
53
pkgs/applications/science/logic/alt-ergo/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ fetchFromGitHub, fetchpatch, lib, which, ocamlPackages }:
|
||||
|
||||
let
|
||||
pname = "alt-ergo";
|
||||
version = "2.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OCamlPro";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0hglj1p0753w2isds01h90knraxa42d2jghr35dpwf9g8a1sm9d3";
|
||||
};
|
||||
in
|
||||
|
||||
let alt-ergo-lib = ocamlPackages.buildDunePackage rec {
|
||||
pname = "alt-ergo-lib";
|
||||
inherit version src;
|
||||
configureFlags = [ pname ];
|
||||
nativeBuildInputs = [ which ];
|
||||
buildInputs = with ocamlPackages; [ dune-configurator ];
|
||||
propagatedBuildInputs = with ocamlPackages; [ num ocplib-simplex stdlib-shims zarith ];
|
||||
}; in
|
||||
|
||||
let alt-ergo-parsers = ocamlPackages.buildDunePackage rec {
|
||||
pname = "alt-ergo-parsers";
|
||||
inherit version src;
|
||||
configureFlags = [ pname ];
|
||||
nativeBuildInputs = [ which ocamlPackages.menhir ];
|
||||
propagatedBuildInputs = [ alt-ergo-lib ] ++ (with ocamlPackages; [ camlzip psmt2-frontend ]);
|
||||
}; in
|
||||
|
||||
ocamlPackages.buildDunePackage {
|
||||
|
||||
inherit pname version src;
|
||||
|
||||
# Ensure compatibility with Menhir ≥ 20211215
|
||||
patches = fetchpatch {
|
||||
url = "https://github.com/OCamlPro/alt-ergo/commit/0f9c45af352657c3aec32fca63d11d44f5126df8.patch";
|
||||
sha256 = "sha256:0zaj3xbk2s8k8jl0id3nrhdfq9mv0n378cbawwx3sziiizq7djbg";
|
||||
};
|
||||
|
||||
configureFlags = [ pname ];
|
||||
|
||||
nativeBuildInputs = [ which ocamlPackages.menhir ];
|
||||
buildInputs = [ alt-ergo-parsers ocamlPackages.cmdliner ];
|
||||
|
||||
meta = {
|
||||
description = "High-performance theorem prover and SMT solver";
|
||||
homepage = "https://alt-ergo.ocamlpro.com/";
|
||||
license = lib.licenses.ocamlpro_nc;
|
||||
maintainers = [ lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
}
|
||||
27
pkgs/applications/science/logic/anders/default.nix
Normal file
27
pkgs/applications/science/logic/anders/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, fetchFromGitHub, ocamlPackages }:
|
||||
|
||||
ocamlPackages.buildDunePackage rec {
|
||||
pname = "anders";
|
||||
version = "1.1.1";
|
||||
|
||||
useDune2 = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "groupoid";
|
||||
repo = "anders";
|
||||
rev = "${version}";
|
||||
sha256 = "sha256-JUiZoo2rNLfgs94TlJqUNzul/7ODisCjSFAzhgSp1z4=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ ocamlPackages.menhir ];
|
||||
buildInputs = [ ocamlPackages.zarith ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Modal Homotopy Type System";
|
||||
homepage = "https://homotopy.dev/";
|
||||
license = licenses.isc;
|
||||
maintainers = [ maintainers.suhr ];
|
||||
};
|
||||
}
|
||||
53
pkgs/applications/science/logic/aspino/default.nix
Normal file
53
pkgs/applications/science/logic/aspino/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ lib, stdenv, fetchurl, fetchFromGitHub, zlib, boost }:
|
||||
|
||||
let
|
||||
glucose' = fetchurl {
|
||||
url = "http://www.labri.fr/perso/lsimon/downloads/softwares/glucose-syrup.tgz";
|
||||
sha256 = "0bq5l2jabhdfhng002qfk0mcj4pfi1v5853x3c7igwfrgx0jmfld";
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "aspino";
|
||||
version = "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++"
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
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" ];
|
||||
# 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
|
||||
};
|
||||
}
|
||||
50
pkgs/applications/science/logic/avy/default.nix
Normal file
50
pkgs/applications/science/logic/avy/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib, stdenv, fetchgit, cmake, zlib, boost }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "avy";
|
||||
version = "2019.05.01"; # date of cav19 tag
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://bitbucket.org/arieg/extavy";
|
||||
rev = "cav19";
|
||||
sha256 = "0qdzy9srxp5f38x4dbb3prnr9il6cy0kz80avrvd7fxqzy7wdlwy";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ zlib boost.out boost.dev ];
|
||||
NIX_CFLAGS_COMPILE = toString ([ "-Wno-narrowing" ]
|
||||
# Squelch endless stream of warnings on same few things
|
||||
++ lib.optionals stdenv.cc.isClang [
|
||||
"-Wno-empty-body"
|
||||
"-Wno-tautological-compare"
|
||||
"-Wc++11-compat-deprecated-writable-strings"
|
||||
"-Wno-deprecated"
|
||||
]);
|
||||
|
||||
prePatch = ''
|
||||
sed -i -e '1i#include <stdint.h>' abc/src/bdd/dsd/dsd.h
|
||||
substituteInPlace abc/src/bdd/dsd/dsd.h --replace \
|
||||
'((Child = Dsd_NodeReadDec(Node,Index))>=0);' \
|
||||
'((intptr_t)(Child = Dsd_NodeReadDec(Node,Index))>=0);'
|
||||
|
||||
patch -p1 -d minisat -i ${./minisat-fenv.patch}
|
||||
patch -p1 -d glucose -i ${./glucose-fenv.patch}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp avy/src/{avy,avybmc} $out/bin/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "AIGER model checking for Property Directed Reachability";
|
||||
homepage = "https://arieg.bitbucket.io/avy/";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ thoughtpolice ];
|
||||
platforms = lib.platforms.linux;
|
||||
# See pkgs/applications/science/logic/glucose/default.nix
|
||||
# (The error is different due to glucose-fenv.patch, but the same)
|
||||
badPlatforms = [ "aarch64-linux" ];
|
||||
};
|
||||
}
|
||||
65
pkgs/applications/science/logic/avy/glucose-fenv.patch
Normal file
65
pkgs/applications/science/logic/avy/glucose-fenv.patch
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
From d6e0cb60270e8653bda3f339e3a07ce2cd2d6eb0 Mon Sep 17 00:00:00 2001
|
||||
From: Will Dietz <w@wdtz.org>
|
||||
Date: Tue, 17 Oct 2017 23:01:36 -0500
|
||||
Subject: [PATCH] glucose: use fenv to set double precision
|
||||
|
||||
---
|
||||
core/Main.cc | 8 ++++++--
|
||||
simp/Main.cc | 8 ++++++--
|
||||
utils/System.h | 2 +-
|
||||
3 files changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/core/Main.cc b/core/Main.cc
|
||||
index c96aadd..994132b 100644
|
||||
--- a/core/Main.cc
|
||||
+++ b/core/Main.cc
|
||||
@@ -96,8 +96,12 @@ int main(int argc, char** argv)
|
||||
// printf("This is MiniSat 2.0 beta\n");
|
||||
|
||||
#if defined(__linux__)
|
||||
- fpu_control_t oldcw, newcw;
|
||||
- _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
|
||||
+ fenv_t fenv;
|
||||
+
|
||||
+ fegetenv(&fenv);
|
||||
+ fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */
|
||||
+ fenv.__control_word |= 0x200; /* _FPU_DOUBLE */
|
||||
+ fesetenv(&fenv);
|
||||
printf("c WARNING: for repeatability, setting FPU to use double precision\n");
|
||||
#endif
|
||||
// Extra options:
|
||||
diff --git a/simp/Main.cc b/simp/Main.cc
|
||||
index 4f4772d..70c2e4b 100644
|
||||
--- a/simp/Main.cc
|
||||
+++ b/simp/Main.cc
|
||||
@@ -97,8 +97,12 @@ int main(int argc, char** argv)
|
||||
|
||||
|
||||
#if defined(__linux__)
|
||||
- fpu_control_t oldcw, newcw;
|
||||
- _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
|
||||
+ fenv_t fenv;
|
||||
+
|
||||
+ fegetenv(&fenv);
|
||||
+ fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */
|
||||
+ fenv.__control_word |= 0x200; /* _FPU_DOUBLE */
|
||||
+ fesetenv(&fenv);
|
||||
printf("WARNING: for repeatability, setting FPU to use double precision\n");
|
||||
#endif
|
||||
// Extra options:
|
||||
diff --git a/utils/System.h b/utils/System.h
|
||||
index 004d498..a768e99 100644
|
||||
--- a/utils/System.h
|
||||
+++ b/utils/System.h
|
||||
@@ -22,7 +22,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
|
||||
#define Glucose_System_h
|
||||
|
||||
#if defined(__linux__)
|
||||
-#include <fpu_control.h>
|
||||
+#include <fenv.h>
|
||||
#endif
|
||||
|
||||
#include "glucose/mtl/IntTypes.h"
|
||||
--
|
||||
2.14.2
|
||||
|
||||
65
pkgs/applications/science/logic/avy/minisat-fenv.patch
Normal file
65
pkgs/applications/science/logic/avy/minisat-fenv.patch
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
From 7f1016ceab9b0f57a935bd51ca6df3d18439b472 Mon Sep 17 00:00:00 2001
|
||||
From: Will Dietz <w@wdtz.org>
|
||||
Date: Tue, 17 Oct 2017 22:57:02 -0500
|
||||
Subject: [PATCH] use fenv instead of non-standard fpu_control
|
||||
|
||||
---
|
||||
core/Main.cc | 8 ++++++--
|
||||
simp/Main.cc | 8 ++++++--
|
||||
utils/System.h | 2 +-
|
||||
3 files changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/core/Main.cc b/core/Main.cc
|
||||
index 2b0d97b..8ad95fb 100644
|
||||
--- a/core/Main.cc
|
||||
+++ b/core/Main.cc
|
||||
@@ -78,8 +78,12 @@ int main(int argc, char** argv)
|
||||
// printf("This is MiniSat 2.0 beta\n");
|
||||
|
||||
#if defined(__linux__)
|
||||
- fpu_control_t oldcw, newcw;
|
||||
- _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
|
||||
+ fenv_t fenv;
|
||||
+
|
||||
+ fegetenv(&fenv);
|
||||
+ fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */
|
||||
+ fenv.__control_word |= 0x200; /* _FPU_DOUBLE */
|
||||
+ fesetenv(&fenv);
|
||||
printf("WARNING: for repeatability, setting FPU to use double precision\n");
|
||||
#endif
|
||||
// Extra options:
|
||||
diff --git a/simp/Main.cc b/simp/Main.cc
|
||||
index 2804d7f..39bfb71 100644
|
||||
--- a/simp/Main.cc
|
||||
+++ b/simp/Main.cc
|
||||
@@ -79,8 +79,12 @@ int main(int argc, char** argv)
|
||||
// printf("This is MiniSat 2.0 beta\n");
|
||||
|
||||
#if defined(__linux__)
|
||||
- fpu_control_t oldcw, newcw;
|
||||
- _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
|
||||
+ fenv_t fenv;
|
||||
+
|
||||
+ fegetenv(&fenv);
|
||||
+ fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */
|
||||
+ fenv.__control_word |= 0x200; /* _FPU_DOUBLE */
|
||||
+ fesetenv(&fenv);
|
||||
printf("WARNING: for repeatability, setting FPU to use double precision\n");
|
||||
#endif
|
||||
// Extra options:
|
||||
diff --git a/utils/System.h b/utils/System.h
|
||||
index 1758192..c0ad13a 100644
|
||||
--- a/utils/System.h
|
||||
+++ b/utils/System.h
|
||||
@@ -22,7 +22,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
|
||||
#define Minisat_System_h
|
||||
|
||||
#if defined(__linux__)
|
||||
-#include <fpu_control.h>
|
||||
+#include <fenv.h>
|
||||
#endif
|
||||
|
||||
#include "mtl/IntTypes.h"
|
||||
--
|
||||
2.14.2
|
||||
|
||||
40
pkgs/applications/science/logic/beluga/default.nix
Normal file
40
pkgs/applications/science/logic/beluga/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, fetchFromGitHub, ocamlPackages, rsync }:
|
||||
|
||||
ocamlPackages.buildDunePackage rec {
|
||||
pname = "beluga";
|
||||
version = "1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Beluga-lang";
|
||||
repo = "Beluga";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ziqjfv8jwidl8lj2mid2shhgqhv31dfh5wad2zxjpvf6038ahsw";
|
||||
};
|
||||
|
||||
useDune2 = true;
|
||||
|
||||
buildInputs = with ocamlPackages; [
|
||||
gen sedlex ocaml_extlib dune-build-info linenoise
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./TEST ./run_harpoon_test.sh
|
||||
'';
|
||||
|
||||
checkPhase = "./TEST";
|
||||
checkInputs = [ rsync ];
|
||||
doCheck = true;
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/emacs/site-lisp/beluga/
|
||||
cp -r tools/beluga-mode.el $out/share/emacs/site-lisp/beluga
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A functional language for reasoning about formal systems";
|
||||
homepage = "http://complogic.cs.mcgill.ca/beluga/";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ maintainers.bcdarwin ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
67
pkgs/applications/science/logic/bitwuzla/default.nix
Normal file
67
pkgs/applications/science/logic/bitwuzla/default.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, python3
|
||||
, cmake
|
||||
, lingeling
|
||||
, btor2tools
|
||||
, gtest
|
||||
, gmp
|
||||
, cadical
|
||||
, minisat
|
||||
, picosat
|
||||
, cryptominisat
|
||||
, zlib
|
||||
, pkg-config
|
||||
# "*** internal error in 'lglib.c': watcher stack overflow" on aarch64-linux
|
||||
, withLingeling ? !stdenv.hostPlatform.isAarch64
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bitwuzla";
|
||||
version = "unstable-2021-07-01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bitwuzla";
|
||||
repo = "bitwuzla";
|
||||
rev = "58d720598e359b1fdfec4a469c76f1d1f24db51a";
|
||||
sha256 = "06ymqsdppyixb918161rmbgqvbnarj4nm4az88lkn3ri4gyimw04";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [
|
||||
cadical
|
||||
cryptominisat
|
||||
picosat
|
||||
minisat
|
||||
btor2tools
|
||||
gmp
|
||||
zlib
|
||||
] ++ lib.optional withLingeling lingeling;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DPicoSAT_INCLUDE_DIR=${lib.getDev picosat}/include/picosat"
|
||||
"-DBtor2Tools_INCLUDE_DIR=${lib.getDev btor2tools}/include/btor2parser"
|
||||
"-DBtor2Tools_LIBRARIES=${lib.getLib btor2tools}/lib/libbtor2parser${stdenv.hostPlatform.extensions.sharedLibrary}"
|
||||
] ++ lib.optional doCheck "-DTESTING=YES";
|
||||
|
||||
checkInputs = [ python3 gtest ];
|
||||
# two tests fail on darwin and 3 on aarch64-linux
|
||||
doCheck = stdenv.hostPlatform.isLinux && (!stdenv.hostPlatform.isAarch64);
|
||||
preCheck = let
|
||||
var = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
|
||||
in
|
||||
''
|
||||
export ${var}=$(readlink -f lib)
|
||||
patchShebangs ..
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A SMT solver for fixed-size bit-vectors, floating-point arithmetic, arrays, and uninterpreted functions";
|
||||
homepage = "https://bitwuzla.github.io";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ symphorien ];
|
||||
};
|
||||
}
|
||||
16
pkgs/applications/science/logic/boolector/cmake-gtest.patch
Normal file
16
pkgs/applications/science/logic/boolector/cmake-gtest.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
diff --git a/cmake/googletest-download.cmake b/cmake/googletest-download.cmake
|
||||
index 0ec4d558..d0910313 100644
|
||||
--- a/cmake/googletest-download.cmake
|
||||
+++ b/cmake/googletest-download.cmake
|
||||
@@ -9,10 +9,7 @@ ExternalProject_Add(
|
||||
googletest
|
||||
SOURCE_DIR "@GOOGLETEST_DOWNLOAD_ROOT@/googletest-src"
|
||||
BINARY_DIR "@GOOGLETEST_DOWNLOAD_ROOT@/googletest-build"
|
||||
- GIT_REPOSITORY
|
||||
- https://github.com/google/googletest.git
|
||||
- GIT_TAG
|
||||
- release-1.10.0
|
||||
+ URL REPLACEME
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
70
pkgs/applications/science/logic/boolector/default.nix
Normal file
70
pkgs/applications/science/logic/boolector/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{ stdenv, fetchFromGitHub, lib, python3, fetchpatch
|
||||
, cmake, lingeling, btor2tools, gtest, gmp
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "boolector";
|
||||
version = "3.2.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "boolector";
|
||||
repo = "boolector";
|
||||
rev = version;
|
||||
sha256 = "1smcy6yp8wvnw2brgnv5bf40v87k4v4fbdbrhi7987vja632k50z";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# present in master - remove after 3.2.2
|
||||
(fetchpatch {
|
||||
name = "fix-parser-getc-char-casts.patch";
|
||||
url = "https://github.com/Boolector/boolector/commit/cc3a70918538c1e71ea5e7273fa1ac098da37c1b.patch";
|
||||
sha256 = "0pjvagcy74vxa2q75zbshcz8j7rvhl98549xfcf5y8yyxf5h8hyq";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed s@REPLACEME@file://${gtest.src}@ ${./cmake-gtest.patch} | patch -p1
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ lingeling btor2tools gmp ];
|
||||
|
||||
cmakeFlags =
|
||||
[ "-DBUILD_SHARED_LIBS=ON"
|
||||
"-DUSE_LINGELING=YES"
|
||||
] ++ (lib.optional (gmp != null) "-DUSE_GMP=YES");
|
||||
|
||||
checkInputs = [ python3 ];
|
||||
doCheck = true;
|
||||
preCheck =
|
||||
let var = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
|
||||
in
|
||||
# tests modelgen and modelgensmt2 spawn boolector in another processes and
|
||||
# macOS strips DYLD_LIBRARY_PATH, hardcode it for testing
|
||||
lib.optionalString stdenv.isDarwin ''
|
||||
cp -r bin bin.back
|
||||
install_name_tool -change libboolector.dylib $(pwd)/lib/libboolector.dylib bin/boolector
|
||||
'' + ''
|
||||
export ${var}=$(readlink -f lib)
|
||||
patchShebangs ..
|
||||
'';
|
||||
|
||||
postCheck = lib.optionalString stdenv.isDarwin ''
|
||||
rm -rf bin
|
||||
mv bin.back bin
|
||||
'';
|
||||
|
||||
# this is what haskellPackages.boolector expects
|
||||
postInstall = ''
|
||||
cp $out/include/boolector/boolector.h $out/include/boolector.h
|
||||
cp $out/include/boolector/btortypes.h $out/include/btortypes.h
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An extremely fast SMT solver for bit-vectors and arrays";
|
||||
homepage = "https://boolector.github.io";
|
||||
license = licenses.mit;
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
};
|
||||
}
|
||||
33
pkgs/applications/science/logic/btor2tools/default.nix
Normal file
33
pkgs/applications/science/logic/btor2tools/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, cmake, fetchFromGitHub, fixDarwinDylibNames }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "btor2tools";
|
||||
version = "1.0.0-pre_${src.rev}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "boolector";
|
||||
repo = "btor2tools";
|
||||
rev = "9831f9909fb283752a3d6d60d43613173bd8af42";
|
||||
sha256 = "0mfqmkgvyw8fa2c09kww107dmk180ch1hp98r5kv41vnc04iqb0s";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out $dev/include/btor2parser/ $lib/lib
|
||||
|
||||
cp -vr bin $out
|
||||
cp -v ../src/btor2parser/btor2parser.h $dev/include/btor2parser
|
||||
cp -v lib/libbtor2parser.* $lib/lib
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" "lib" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A generic parser and tool package for the BTOR2 format";
|
||||
homepage = "https://github.com/Boolector/btor2tools";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
};
|
||||
}
|
||||
48
pkgs/applications/science/logic/cadical/default.nix
Normal file
48
pkgs/applications/science/logic/cadical/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cadical";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arminbiere";
|
||||
repo = "cadical";
|
||||
rev = "rel-${version}";
|
||||
sha256 = "0y44z3np4gssgdh4aj5qila7pshrbphycdxn2083i8ayyyjbxshp";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "lib" ];
|
||||
doCheck = true;
|
||||
|
||||
# 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
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm0755 build/cadical "$out/bin/cadical"
|
||||
install -Dm0755 build/mobical "$out/bin/mobical"
|
||||
install -Dm0644 src/ccadical.h "$dev/include/ccadical.h"
|
||||
install -Dm0644 src/cadical.hpp "$dev/include/cadical.hpp"
|
||||
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
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Simplified Satisfiability Solver";
|
||||
maintainers = with maintainers; [ shnarazk ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.mit;
|
||||
homepage = "http://fmv.jku.at/cadical";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
From 563f023aba1034f4f433f412302b825b059ef5a5 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Barbone <mark.l.barbone@gmail.com>
|
||||
Date: Sun, 19 Jul 2020 17:24:30 -0400
|
||||
Subject: [PATCH] Fix to-string.agda to compile with Agda 2.6.1
|
||||
|
||||
---
|
||||
Adapted from https://github.com/cedille/cedille/pull/156.
|
||||
|
||||
src/to-string.agda | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/to-string.agda b/src/to-string.agda
|
||||
index 2505942..051a2da 100644
|
||||
--- a/src/to-string.agda
|
||||
+++ b/src/to-string.agda
|
||||
@@ -100,9 +100,9 @@ no-parens {TK} _ _ _ = tt
|
||||
no-parens {QUALIF} _ _ _ = tt
|
||||
no-parens {ARG} _ _ _ = tt
|
||||
|
||||
-pattern ced-ops-drop-spine = cedille-options.options.mk-options _ _ _ _ ff _ _ _ ff _
|
||||
-pattern ced-ops-conv-arr = cedille-options.options.mk-options _ _ _ _ _ _ _ _ ff _
|
||||
-pattern ced-ops-conv-abs = cedille-options.options.mk-options _ _ _ _ _ _ _ _ tt _
|
||||
+pattern ced-ops-drop-spine = cedille-options.mk-options _ _ _ _ ff _ _ _ ff _
|
||||
+pattern ced-ops-conv-arr = cedille-options.mk-options _ _ _ _ _ _ _ _ ff _
|
||||
+pattern ced-ops-conv-abs = cedille-options.mk-options _ _ _ _ _ _ _ _ tt _
|
||||
|
||||
drop-spine : cedille-options.options → {ed : exprd} → ctxt → ⟦ ed ⟧ → ⟦ ed ⟧
|
||||
drop-spine ops @ ced-ops-drop-spine = h
|
||||
--
|
||||
2.27.0
|
||||
|
||||
61
pkgs/applications/science/logic/cedille/default.nix
Normal file
61
pkgs/applications/science/logic/cedille/default.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, alex
|
||||
, happy
|
||||
, Agda
|
||||
, buildPlatform
|
||||
, buildPackages
|
||||
, ghcWithPackages
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.1.2";
|
||||
pname = "cedille";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cedille";
|
||||
repo = "cedille";
|
||||
rev = "v${version}";
|
||||
sha256 = "1j745q9sd32fhcb96wjq6xvyqq1k6imppjnya6x0n99fyfnqzvg9";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
./Fix-to-string.agda-to-compile-with-Agda-2.6.1.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ alex happy ];
|
||||
buildInputs = [ Agda (ghcWithPackages (ps: [ps.ieee])) ];
|
||||
|
||||
LANG = "en_US.UTF-8";
|
||||
LOCALE_ARCHIVE =
|
||||
lib.optionalString (buildPlatform.libc == "glibc")
|
||||
"${buildPackages.glibcLocales}/lib/locale/locale-archive";
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs create-libraries.sh
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 -t $out/bin/ cedille
|
||||
install -Dm755 -t $out/bin/ core/cedille-core
|
||||
install -Dm644 -t $out/share/info docs/info/cedille-info-main.info
|
||||
|
||||
mkdir -p $out/lib/
|
||||
cp -r lib/ $out/lib/cedille/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An interactive theorem-prover and dependently typed programming language, based on extrinsic (aka Curry-style) type theory";
|
||||
homepage = "https://cedille.github.io/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ marsam mpickering ];
|
||||
platforms = platforms.unix;
|
||||
|
||||
# Broken due to Agda update. See
|
||||
# https://github.com/NixOS/nixpkgs/pull/129606#issuecomment-881107449.
|
||||
broken = true;
|
||||
hydraPlatforms = platforms.none;
|
||||
};
|
||||
}
|
||||
36
pkgs/applications/science/logic/celf/default.nix
Normal file
36
pkgs/applications/science/logic/celf/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, fetchFromGitHub, smlnj }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "celf";
|
||||
pversion = "2013-07-25";
|
||||
name = "${pname}-${pversion}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "clf";
|
||||
repo = pname;
|
||||
rev = "d61d95900ab316468ae850fa34a2fe9488bc5b59";
|
||||
sha256 = "0slrwcxglp0sdbp6wr65cdkl5wcap2i0fqxbwqfi1q3cpb6ph6hq";
|
||||
};
|
||||
|
||||
buildInputs = [ smlnj ];
|
||||
|
||||
# (can also build with MLton)
|
||||
buildPhase = ''
|
||||
export SMLNJ_HOME=${smlnj}
|
||||
sml < main-export.sml
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp .heap* $out/bin/
|
||||
./.mkexec ${smlnj}/bin/sml $out/bin celf
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Linear logic programming system";
|
||||
homepage = "https://github.com/clf/celf";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ bcdarwin ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
27
pkgs/applications/science/logic/clprover/clprover.nix
Normal file
27
pkgs/applications/science/logic/clprover/clprover.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchzip }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "clprover";
|
||||
version = "1.0.3";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://cgi.csc.liv.ac.uk/~ullrich/CLProver++/CLProver++-v1.0.3-18-04-2015.zip";
|
||||
sha256 = "10kmlg4m572qwfzi6hkyb0ypb643xw8sfb55xx7866lyh37w1q3s";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -r bin $out/bin
|
||||
mkdir -p $out/share/clprover
|
||||
cp -r examples $out/share/clprover/examples
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Resolution-based theorem prover for Coalition Logic implemented in C++";
|
||||
homepage = "https://cgi.csc.liv.ac.uk/~ullrich/CLProver++/";
|
||||
license = licenses.gpl3; # Note that while the website states that it is GPLv2 but the file in the zip as well as the comments in the source state it is GPLv3
|
||||
maintainers = with maintainers; [ mgttlinger ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
217
pkgs/applications/science/logic/coq/default.nix
Normal file
217
pkgs/applications/science/logic/coq/default.nix
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
# - coqide compilation can be disabled by setting buildIde to false
|
||||
# - The csdp program used for the Micromega tactic is statically referenced.
|
||||
# However, coq can build without csdp by setting it to null.
|
||||
# In this case some Micromega tactics will search the user's path for the csdp program and will fail if it is not found.
|
||||
# - The exact version can be specified through the `version` argument to
|
||||
# the derivation; it defaults to the latest stable version.
|
||||
|
||||
{ lib, stdenv, fetchzip, writeText, pkg-config, gnumake42
|
||||
, customOCamlPackages ? null
|
||||
, ocamlPackages_4_05, ocamlPackages_4_09, ocamlPackages_4_10, ocamlPackages_4_12, ncurses
|
||||
, buildIde ? true
|
||||
, glib, gnome, wrapGAppsHook, makeDesktopItem, copyDesktopItems
|
||||
, csdp ? null
|
||||
, version, coq-version ? null,
|
||||
}@args:
|
||||
let lib' = lib; in
|
||||
let lib = import ../../../../build-support/coq/extra-lib.nix {lib = lib';}; in
|
||||
with builtins; with lib;
|
||||
let
|
||||
release = {
|
||||
"8.5pl1".sha256 = "1976ki5xjg2r907xj9p7gs0kpdinywbwcqlgxqw75dgp0hkgi00n";
|
||||
"8.5pl2".sha256 = "109rrcrx7mz0fj7725kjjghfg5ydwb24hjsa5hspa27b4caah7rh";
|
||||
"8.5pl3".sha256 = "15c3rdk59nifzihsp97z4vjxis5xmsnrvpb86qiazj143z2fmdgw";
|
||||
"8.6.0".sha256 = "148mb48zpdax56c0blfi7v67lx014lnmrvxxasi28hsibyz2lvg4";
|
||||
"8.6.0".rev = "V8.6";
|
||||
"8.6.1".sha256 = "0llrxcxwy5j87vbbjnisw42rfw1n1pm5602ssx64xaxx3k176g6l";
|
||||
"8.7.0".sha256 = "1h18b7xpnx3ix9vsi5fx4zdcbxy7bhra7gd5c5yzxmk53cgf1p9m";
|
||||
"8.7.1".sha256 = "0gjn59jkbxwrihk8fx9d823wjyjh5m9gvj9l31nv6z6bcqhgdqi8";
|
||||
"8.7.2".sha256 = "0a0657xby8wdq4aqb2xsxp3n7pmc2w4yxjmrb2l4kccs1aqvaj4w";
|
||||
"8.8.0".sha256 = "13a4fka22hdxsjk11mgjb9ffzplfxyxp1sg5v1c8nk1grxlscgw8";
|
||||
"8.8.1".sha256 = "1hlf58gwazywbmfa48219amid38vqdl94yz21i11b4map6jfwhbk";
|
||||
"8.8.2".sha256 = "1lip3xja924dm6qblisk1bk0x8ai24s5xxqxphbdxj6djglj68fd";
|
||||
"8.9.0".sha256 = "1dkgdjc4n1m15m1p724hhi5cyxpqbjw6rxc5na6fl3v4qjjfnizh";
|
||||
"8.9.1".sha256 = "1xrq6mkhpq994bncmnijf8jwmwn961kkpl4mwwlv7j3dgnysrcv2";
|
||||
"8.10.0".sha256 = "138jw94wp4mg5dgjc2asn8ng09ayz1mxdznq342n0m469j803gzg";
|
||||
"8.10.1".sha256 = "072v2zkjzf7gj48137wpr3c9j0hg9pdhlr5l8jrgrwynld8fp7i4";
|
||||
"8.10.2".sha256 = "0znxmpy71bfw0p6x47i82jf5k7v41zbz9bdpn901ysn3ir8l3wrz";
|
||||
"8.11.0".sha256 = "1rfdic6mp7acx2zfwz7ziqk12g95bl9nyj68z4n20a5bcjv2pxpn";
|
||||
"8.11.1".sha256 = "0qriy9dy36dajsv5qmli8gd6v55mah02ya334nw49ky19v7518m0";
|
||||
"8.11.2".sha256 = "0f77ccyxdgbf1nrj5fa8qvrk1cyfy06fv8gj9kzfvlcgn0cf48sa";
|
||||
"8.12.0".sha256 = "18dc7k0piv6v064zgdadpw6mkkxk7j663hb3svgj5236fihjr0cz";
|
||||
"8.12.1".sha256 = "1rkcyjjrzcqw9xk93hsq0vvji4f8r5iq0f739mghk60bghkpnb7q";
|
||||
"8.12.2".sha256 = "18gscfm039pqhq4msq01nraig5dm9ab98bjca94zldf8jvdv0x2n";
|
||||
"8.13.0".sha256 = "0sjbqmz6qcvnz0hv87xha80qbhvmmyd675wyc5z4rgr34j2l1ymd";
|
||||
"8.13.1".sha256 = "0xx2ns84mlip9bg2mkahy3pmc5zfcgrjxsviq9yijbzy1r95wf0n";
|
||||
"8.13.2".sha256 = "1884vbmwmqwn9ngibax6dhnqh4cc02l0s2ajc6jb1xgr0i60whjk";
|
||||
"8.14.0".sha256 = "04y2z0qyvag66zanfyc3f9agvmzbn4lsr0p1l7ck6yjhqx7vbm17";
|
||||
"8.14.1".sha256 = "0sx78pgx0qw8v7v2r32zzy3l161zipzq95iacda628girim7psnl";
|
||||
"8.15.0".sha256 = "sha256:1ma76wfrpfsl72yh10w1ys2a0vi0mdc2jc79kdc8nrmxkhpw1nxx";
|
||||
"8.15.1".sha256 = "sha256:1dsa04jzkx5pw69pmxn0l55q4w88lg6fvz7clbga0bazzsfnsgd6";
|
||||
"8.15.2".sha256 = "sha256:0gn8dz69scxnxaq6ycb3x34bjfk9wlp1y2xn8w69kg9fm4b6gkc7";
|
||||
};
|
||||
releaseRev = v: "V${v}";
|
||||
fetched = import ../../../../build-support/coq/meta-fetch/default.nix
|
||||
{ inherit lib stdenv fetchzip; }
|
||||
{ inherit release releaseRev; location = { owner = "coq"; repo = "coq";}; }
|
||||
args.version;
|
||||
version = fetched.version;
|
||||
coq-version = args.coq-version or (if version != "dev" then versions.majorMinor version else "dev");
|
||||
coqAtLeast = v: coq-version == "dev" || versionAtLeast coq-version v;
|
||||
ideFlags = optionalString (buildIde && !coqAtLeast "8.10")
|
||||
"-lablgtkdir ${ocamlPackages.lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt";
|
||||
csdpPatch = if csdp != null then ''
|
||||
substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
|
||||
substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
|
||||
'' else "";
|
||||
ocamlPackages = if !isNull customOCamlPackages then customOCamlPackages
|
||||
else with versions; switch coq-version [
|
||||
{ case = range "8.14" "8.14"; out = ocamlPackages_4_12; }
|
||||
{ case = range "8.11" "8.13"; out = ocamlPackages_4_10; }
|
||||
{ case = range "8.7" "8.10"; out = ocamlPackages_4_09; }
|
||||
{ case = range "8.5" "8.6"; out = ocamlPackages_4_05; }
|
||||
] ocamlPackages_4_12;
|
||||
ocamlNativeBuildInputs = with ocamlPackages; [ ocaml findlib ]
|
||||
++ optional (coqAtLeast "8.14") dune_2;
|
||||
ocamlPropagatedBuildInputs = [ ]
|
||||
++ optional (!coqAtLeast "8.10") ocamlPackages.camlp5
|
||||
++ optional (!coqAtLeast "8.13") ocamlPackages.num
|
||||
++ optional (coqAtLeast "8.13") ocamlPackages.zarith;
|
||||
self = stdenv.mkDerivation {
|
||||
pname = "coq";
|
||||
inherit (fetched) version src;
|
||||
|
||||
passthru = {
|
||||
inherit coq-version;
|
||||
inherit ocamlPackages ocamlNativeNuildInputs;
|
||||
inherit ocamlPropagatedBuildInputs ocamlPropagatedNativeBuildInputs;
|
||||
# For compatibility
|
||||
inherit (ocamlPackages) ocaml camlp5 findlib num ;
|
||||
emacsBufferSetup = pkgs: ''
|
||||
; Propagate coq paths to children
|
||||
(inherit-local-permanent coq-prog-name "${self}/bin/coqtop")
|
||||
(inherit-local-permanent coq-dependency-analyzer "${self}/bin/coqdep")
|
||||
(inherit-local-permanent coq-compiler "${self}/bin/coqc")
|
||||
; If the coq-library path was already set, re-set it based on our current coq
|
||||
(when (fboundp 'get-coq-library-directory)
|
||||
(inherit-local-permanent coq-library-directory (get-coq-library-directory))
|
||||
(coq-prog-args))
|
||||
(mapc (lambda (arg)
|
||||
(when (file-directory-p (concat arg "/lib/coq/${coq-version}/user-contrib"))
|
||||
(setenv "COQPATH" (concat (getenv "COQPATH") ":" arg "/lib/coq/${coq-version}/user-contrib")))) '(${concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)}))
|
||||
; TODO Abstract this pattern from here and nixBufferBuilders.withPackages!
|
||||
(defvar nixpkgs--coq-buffer-count 0)
|
||||
(when (eq nixpkgs--coq-buffer-count 0)
|
||||
(make-variable-buffer-local 'nixpkgs--is-nixpkgs-coq-buffer)
|
||||
(defun nixpkgs--coq-inherit (buf)
|
||||
(inherit-local-inherit-child buf)
|
||||
(with-current-buffer buf
|
||||
(setq nixpkgs--coq-buffer-count (1+ nixpkgs--coq-buffer-count))
|
||||
(add-hook 'kill-buffer-hook 'nixpkgs--decrement-coq-buffer-count nil t))
|
||||
buf)
|
||||
; When generating a scomint buffer, do inherit-local inheritance and make it a nixpkgs-coq buffer
|
||||
(defun nixpkgs--around-scomint-make (orig &rest r)
|
||||
(if nixpkgs--is-nixpkgs-coq-buffer
|
||||
(progn
|
||||
(advice-add 'get-buffer-create :filter-return #'nixpkgs--coq-inherit)
|
||||
(apply orig r)
|
||||
(advice-remove 'get-buffer-create #'nixpkgs--coq-inherit))
|
||||
(apply orig r)))
|
||||
(advice-add 'scomint-make :around #'nixpkgs--around-scomint-make)
|
||||
; When we have no more coq buffers, tear down the buffer handling
|
||||
(defun nixpkgs--decrement-coq-buffer-count ()
|
||||
(setq nixpkgs--coq-buffer-count (1- nixpkgs--coq-buffer-count))
|
||||
(when (eq nixpkgs--coq-buffer-count 0)
|
||||
(advice-remove 'scomint-make #'nixpkgs--around-scomint-make)
|
||||
(fmakunbound 'nixpkgs--around-scomint-make)
|
||||
(fmakunbound 'nixpkgs--coq-inherit)
|
||||
(fmakunbound 'nixpkgs--decrement-coq-buffer-count))))
|
||||
(setq nixpkgs--coq-buffer-count (1+ nixpkgs--coq-buffer-count))
|
||||
(add-hook 'kill-buffer-hook 'nixpkgs--decrement-coq-buffer-count nil t)
|
||||
(setq nixpkgs--is-nixpkgs-coq-buffer t)
|
||||
(inherit-local 'nixpkgs--is-nixpkgs-coq-buffer)
|
||||
'';
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
++ ocamlNativeBuildInputs
|
||||
++ optional buildIde copyDesktopItems
|
||||
++ optional (buildIde && coqAtLeast "8.10") wrapGAppsHook
|
||||
++ optional (!coqAtLeast "8.6") gnumake42;
|
||||
buildInputs = [ ncurses ]
|
||||
++ optionals buildIde
|
||||
(if coqAtLeast "8.10"
|
||||
then [ ocamlPackages.lablgtk3-sourceview3 glib gnome.adwaita-icon-theme ]
|
||||
else [ ocamlPackages.lablgtk ])
|
||||
;
|
||||
|
||||
propagatedBuildInputs = ocamlPropagatedBuildInputs;
|
||||
|
||||
postPatch = ''
|
||||
UNAME=$(type -tp uname)
|
||||
RM=$(type -tp rm)
|
||||
substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
|
||||
${if !coqAtLeast "8.7" then "substituteInPlace configure.ml --replace \"md5 -q\" \"md5sum\"" else ""}
|
||||
${csdpPatch}
|
||||
'';
|
||||
|
||||
setupHook = writeText "setupHook.sh" ''
|
||||
addCoqPath () {
|
||||
if test -d "''$1/lib/coq/${coq-version}/user-contrib"; then
|
||||
export COQPATH="''${COQPATH-}''${COQPATH:+:}''$1/lib/coq/${coq-version}/user-contrib/"
|
||||
fi
|
||||
}
|
||||
|
||||
addEnvHooks "$targetOffset" addCoqPath
|
||||
'';
|
||||
|
||||
preConfigure = if coqAtLeast "8.10" then ''
|
||||
patchShebangs dev/tools/
|
||||
'' else ''
|
||||
configureFlagsArray=(
|
||||
${ideFlags}
|
||||
)
|
||||
'';
|
||||
|
||||
prefixKey = "-prefix ";
|
||||
|
||||
buildFlags = [ "revision" "coq" ] ++ optional buildIde "coqide" ++ optional (!coqAtLeast "8.14") "bin/votour";
|
||||
enableParallelBuilding = true;
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
desktopItems = optional buildIde (makeDesktopItem {
|
||||
name = "coqide";
|
||||
exec = "coqide";
|
||||
icon = "coq";
|
||||
desktopName = "CoqIDE";
|
||||
comment = "Graphical interface for the Coq proof assistant";
|
||||
categories = [ "Development" "Science" "Math" "IDE" "GTK" ];
|
||||
});
|
||||
|
||||
postInstall = let suffix = if coqAtLeast "8.14" then "-core" else ""; in ''
|
||||
cp bin/votour $out/bin/
|
||||
ln -s $out/lib/coq${suffix} $OCAMLFIND_DESTDIR/coq${suffix}
|
||||
'' + optionalString (coqAtLeast "8.14") ''
|
||||
ln -s $out/lib/coqide-server $OCAMLFIND_DESTDIR/coqide-server
|
||||
'' + optionalString buildIde ''
|
||||
mkdir -p "$out/share/pixmaps"
|
||||
ln -s "$out/share/coq/coq.png" "$out/share/pixmaps/"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Coq proof assistant";
|
||||
longDescription = ''
|
||||
Coq is a formal proof management system. It provides a formal language
|
||||
to write mathematical definitions, executable algorithms and theorems
|
||||
together with an environment for semi-interactive development of
|
||||
machine-checked proofs.
|
||||
'';
|
||||
homepage = "http://coq.inria.fr";
|
||||
license = licenses.lgpl21;
|
||||
branch = coq-version;
|
||||
maintainers = with maintainers; [ roconnor thoughtpolice vbgl Zimmi48 ];
|
||||
platforms = platforms.unix;
|
||||
mainProgram = "coqide";
|
||||
};
|
||||
}; in self
|
||||
32
pkgs/applications/science/logic/cryptominisat/default.nix
Normal file
32
pkgs/applications/science/logic/cryptominisat/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, python3, xxd, boost, fetchpatch }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cryptominisat";
|
||||
version = "5.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "msoos";
|
||||
repo = "cryptominisat";
|
||||
rev = version;
|
||||
sha256 = "00hmxdlyhn7pwk9jlvc5g0l5z5xqfchjzf5jgn3pkj9xhl8yqq50";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# https://github.com/msoos/cryptominisat/pull/621
|
||||
url = "https://github.com/msoos/cryptominisat/commit/11a97003b0bfbfb61ed6c4e640212110d390c28c.patch";
|
||||
sha256 = "0hdy345bwcbxz0jl1jdxfa6mmfh77s2pz9rnncsr0jzk11b3j0cw";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ python3 boost ];
|
||||
nativeBuildInputs = [ cmake xxd ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An advanced SAT Solver";
|
||||
homepage = "https://github.com/msoos/cryptominisat";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mic92 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
37
pkgs/applications/science/logic/cryptoverif/default.nix
Normal file
37
pkgs/applications/science/logic/cryptoverif/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, stdenv, fetchurl, ocaml }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cryptoverif";
|
||||
version = "2.05";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://prosecco.gforge.inria.fr/personal/bblanche/cryptoverif/cryptoverif${version}.tar.gz";
|
||||
sha256 = "sha256-F5eVN5ATYo9Ivpi2eYh96ktuTWUeoqgWMR4BqHu8EFs=";
|
||||
};
|
||||
|
||||
buildInputs = [ ocaml ];
|
||||
|
||||
/* Fix up the frontend to load the 'default' cryptoverif library
|
||||
** from under $out/libexec. By default, it expects to find the files
|
||||
** in $CWD which doesn't work. */
|
||||
patchPhase = ''
|
||||
substituteInPlace ./src/syntax.ml \
|
||||
--replace \"default\" \"$out/libexec/default\"
|
||||
'';
|
||||
|
||||
buildPhase = "./build";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/libexec
|
||||
cp ./cryptoverif $out/bin
|
||||
cp ./default.cvl $out/libexec
|
||||
cp ./default.ocvl $out/libexec
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Cryptographic protocol verifier in the computational model";
|
||||
homepage = "https://prosecco.gforge.inria.fr/personal/bblanche/cryptoverif/";
|
||||
license = lib.licenses.cecill-b;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
}
|
||||
24
pkgs/applications/science/logic/cubicle/default.nix
Normal file
24
pkgs/applications/science/logic/cubicle/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchurl, ocamlPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cubicle";
|
||||
version = "1.1.2";
|
||||
src = fetchurl {
|
||||
url = "http://cubicle.lri.fr/cubicle-${version}.tar.gz";
|
||||
sha256 = "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile.in --replace "\\n" ""
|
||||
'';
|
||||
|
||||
buildInputs = with ocamlPackages; [ ocaml findlib functory ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open source model checker for verifying safety properties of array-based systems";
|
||||
homepage = "http://cubicle.lri.fr/";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ dwarfmaster ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
commit 4eb28b907e89be05d92eb704115f821b9b848e60
|
||||
Author: Matthew Dawson <matthew@mjdsystems.ca>
|
||||
Date: Sun Oct 16 22:06:03 2016 -0400
|
||||
|
||||
Fix gcc v6 compile failures.
|
||||
|
||||
* Use std::hash<const char*> over std::hash<char *>, as throwing away the const is not allowed.
|
||||
* Use Hash::hash by default in CDMap over std::hash, to get Hash::hash<CVC3::expr>
|
||||
|
||||
diff --git a/src/expr/expr_value.cpp b/src/expr/expr_value.cpp
|
||||
index 0c85ff6..e4dd251 100644
|
||||
--- a/src/expr/expr_value.cpp
|
||||
+++ b/src/expr/expr_value.cpp
|
||||
@@ -29,7 +29,7 @@ namespace CVC3 {
|
||||
// Class ExprValue static members
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
-std::hash<char*> ExprValue::s_charHash;
|
||||
+std::hash<const char*> ExprValue::s_charHash;
|
||||
std::hash<long int> ExprValue::s_intHash;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/src/include/cdmap.h b/src/include/cdmap.h
|
||||
index faf682a..c3b094c 100644
|
||||
--- a/src/include/cdmap.h
|
||||
+++ b/src/include/cdmap.h
|
||||
@@ -43,9 +43,9 @@ namespace CVC3 {
|
||||
// Auxiliary class: almost the same as CDO (see cdo.h), but on
|
||||
// setNull() call it erases itself from the map.
|
||||
|
||||
-template <class Key, class Data, class HashFcn = std::hash<Key> > class CDMap;
|
||||
+template <class Key, class Data, class HashFcn = Hash::hash<Key> > class CDMap;
|
||||
|
||||
-template <class Key, class Data, class HashFcn = std::hash<Key> >
|
||||
+template <class Key, class Data, class HashFcn = Hash::hash<Key> >
|
||||
class CDOmap :public ContextObj {
|
||||
Key d_key;
|
||||
Data d_data;
|
||||
diff --git a/src/include/expr_hash.h b/src/include/expr_hash.h
|
||||
index b2107d7..baa2eab 100644
|
||||
--- a/src/include/expr_hash.h
|
||||
+++ b/src/include/expr_hash.h
|
||||
@@ -20,7 +20,6 @@
|
||||
* hash_set over Expr class.
|
||||
*/
|
||||
/*****************************************************************************/
|
||||
-
|
||||
#ifndef _cvc3__expr_h_
|
||||
#include "expr.h"
|
||||
#endif
|
||||
diff --git a/src/include/expr_value.h b/src/include/expr_value.h
|
||||
index 95102b2..f53aa4d 100644
|
||||
--- a/src/include/expr_value.h
|
||||
+++ b/src/include/expr_value.h
|
||||
@@ -179,7 +179,7 @@ protected:
|
||||
// Static hash functions. They don't depend on the context
|
||||
// (ExprManager and such), so it is still thread-safe to have them
|
||||
// static.
|
||||
- static std::hash<char*> s_charHash;
|
||||
+ static std::hash<const char*> s_charHash;
|
||||
static std::hash<long int> s_intHash;
|
||||
|
||||
static size_t pointerHash(void* p) { return s_intHash((long int)p); }
|
||||
diff --git a/src/theory_core/theory_core.cpp b/src/theory_core/theory_core.cpp
|
||||
index df5289f..37ccab9 100644
|
||||
--- a/src/theory_core/theory_core.cpp
|
||||
+++ b/src/theory_core/theory_core.cpp
|
||||
@@ -710,7 +710,7 @@ TheoryCore::TheoryCore(ContextManager* cm,
|
||||
// d_termTheorems(cm->getCurrentContext()),
|
||||
d_predicates(cm->getCurrentContext()),
|
||||
d_solver(NULL),
|
||||
- d_simplifyInPlace(false),
|
||||
+ d_simplifyInPlace(NULL),
|
||||
d_currentRecursiveSimplifier(NULL),
|
||||
d_resourceLimit(0),
|
||||
d_timeBase(0),
|
||||
39
pkgs/applications/science/logic/cvc3/default.nix
Normal file
39
pkgs/applications/science/logic/cvc3/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, stdenv, fetchurl, flex, bison, gmp, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cvc3";
|
||||
version = "2.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.cs.nyu.edu/acsys/cvc3/releases/${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1xxcwhz3y6djrycw8sm6xz83wb4hb12rd1n0skvc7fng0rh1snym";
|
||||
};
|
||||
|
||||
buildInputs = [ gmp flex bison perl ];
|
||||
|
||||
patches = [ ./cvc3-2.4.1-gccv6-fix.patch ];
|
||||
|
||||
postPatch = ''
|
||||
sed -e "s@ /bin/bash@bash@g" -i Makefile.std
|
||||
find . -exec sed -e "s@/usr/bin/perl@${perl}/bin/perl@g" -i '{}' ';'
|
||||
|
||||
# bison 3.7 workaround
|
||||
for f in parsePL parseLisp parsesmtlib parsesmtlib2 ; do
|
||||
ln -s ../parser/''${f}_defs.h src/include/''${f}.hpp
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A prover for satisfiability modulo theory (SMT)";
|
||||
maintainers = with maintainers;
|
||||
[ raskin ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.free;
|
||||
homepage = "http://www.cs.nyu.edu/acsys/cvc3/index.html";
|
||||
};
|
||||
passthru = {
|
||||
updateInfo = {
|
||||
downloadPage = "http://www.cs.nyu.edu/acsys/cvc3/download.html";
|
||||
};
|
||||
};
|
||||
}
|
||||
45
pkgs/applications/science/logic/cvc4/default.nix
Normal file
45
pkgs/applications/science/logic/cvc4/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, cln, gmp, git, swig, pkg-config
|
||||
, readline, libantlr3c, boost, jdk, python3, antlr3_4
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cvc4";
|
||||
version = "1.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cvc4";
|
||||
repo = "cvc4";
|
||||
rev = version;
|
||||
sha256 = "1rhs4pvzaa1wk00czrczp58b2cxfghpsnq534m0l3snnya2958jp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config cmake ];
|
||||
buildInputs = [ gmp git python3.pkgs.toml readline swig libantlr3c antlr3_4 boost jdk python3 ]
|
||||
++ lib.optionals (!stdenv.isDarwin) [ cln ];
|
||||
configureFlags = [
|
||||
"--enable-language-bindings=c,c++,java"
|
||||
"--enable-gpl"
|
||||
"--with-readline"
|
||||
"--with-boost=${boost.dev}"
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [ "--with-cln" ];
|
||||
|
||||
prePatch = ''
|
||||
patch -p1 -i ${./minisat-fenv.patch} -d src/prop/minisat
|
||||
patch -p1 -i ${./minisat-fenv.patch} -d src/prop/bvminisat
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs ./src/
|
||||
'';
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Production"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A high-performance theorem prover and SMT solver";
|
||||
homepage = "http://cvc4.cs.stanford.edu/web/";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ vbgl thoughtpolice gebner ];
|
||||
};
|
||||
}
|
||||
65
pkgs/applications/science/logic/cvc4/minisat-fenv.patch
Normal file
65
pkgs/applications/science/logic/cvc4/minisat-fenv.patch
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
From 7f1016ceab9b0f57a935bd51ca6df3d18439b472 Mon Sep 17 00:00:00 2001
|
||||
From: Will Dietz <w@wdtz.org>
|
||||
Date: Tue, 17 Oct 2017 22:57:02 -0500
|
||||
Subject: [PATCH] use fenv instead of non-standard fpu_control
|
||||
|
||||
---
|
||||
core/Main.cc | 8 ++++++--
|
||||
simp/Main.cc | 8 ++++++--
|
||||
utils/System.h | 2 +-
|
||||
3 files changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/core/Main.cc b/core/Main.cc
|
||||
index 2b0d97b..8ad95fb 100644
|
||||
--- a/core/Main.cc
|
||||
+++ b/core/Main.cc
|
||||
@@ -78,8 +78,12 @@ int main(int argc, char** argv)
|
||||
// printf("This is MiniSat 2.0 beta\n");
|
||||
|
||||
#if defined(__linux__)
|
||||
- fpu_control_t oldcw, newcw;
|
||||
- _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
|
||||
+ fenv_t fenv;
|
||||
+
|
||||
+ fegetenv(&fenv);
|
||||
+ fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */
|
||||
+ fenv.__control_word |= 0x200; /* _FPU_DOUBLE */
|
||||
+ fesetenv(&fenv);
|
||||
printf("WARNING: for repeatability, setting FPU to use double precision\n");
|
||||
#endif
|
||||
// Extra options:
|
||||
diff --git a/simp/Main.cc b/simp/Main.cc
|
||||
index 2804d7f..39bfb71 100644
|
||||
--- a/simp/Main.cc
|
||||
+++ b/simp/Main.cc
|
||||
@@ -79,8 +79,12 @@ int main(int argc, char** argv)
|
||||
// printf("This is MiniSat 2.0 beta\n");
|
||||
|
||||
#if defined(__linux__)
|
||||
- fpu_control_t oldcw, newcw;
|
||||
- _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
|
||||
+ fenv_t fenv;
|
||||
+
|
||||
+ fegetenv(&fenv);
|
||||
+ fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */
|
||||
+ fenv.__control_word |= 0x200; /* _FPU_DOUBLE */
|
||||
+ fesetenv(&fenv);
|
||||
printf("WARNING: for repeatability, setting FPU to use double precision\n");
|
||||
#endif
|
||||
// Extra options:
|
||||
diff --git a/utils/System.h b/utils/System.h
|
||||
index 1758192..c0ad13a 100644
|
||||
--- a/utils/System.h
|
||||
+++ b/utils/System.h
|
||||
@@ -22,7 +22,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
|
||||
#define Minisat_System_h
|
||||
|
||||
#if defined(__linux__)
|
||||
-#include <fpu_control.h>
|
||||
+#include <fenv.h>
|
||||
#endif
|
||||
|
||||
#include "mtl/IntTypes.h"
|
||||
--
|
||||
2.14.2
|
||||
|
||||
34
pkgs/applications/science/logic/cvc5/default.nix
Normal file
34
pkgs/applications/science/logic/cvc5/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, cadical, symfpu, gmp, git, python3, gtest, libantlr3c, antlr3_4, boost, jdk }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cvc5";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cvc5";
|
||||
repo = "cvc5";
|
||||
rev = "cvc5-${version}";
|
||||
sha256 = "03sxqwmlajffmv7lncqs1bx8gyihkpnikk87q9wjrd4776n13ign";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config cmake ];
|
||||
buildInputs = [ cadical.dev symfpu gmp git python3 python3.pkgs.toml gtest libantlr3c antlr3_4 boost jdk ];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs ./src/
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Production"
|
||||
"-DBUILD_SHARED_LIBS=1"
|
||||
"-DANTLR3_JAR=${antlr3_4}/lib/antlr/antlr-3.4-complete.jar"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A high-performance theorem prover and SMT solver";
|
||||
homepage = "https://cvc5.github.io";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ shadaj ];
|
||||
};
|
||||
}
|
||||
45
pkgs/applications/science/logic/drat-trim/default.nix
Normal file
45
pkgs/applications/science/logic/drat-trim/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "drat-trim-unstable";
|
||||
version = "2020-06-05";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "marijnheule";
|
||||
repo = "drat-trim";
|
||||
rev = "9afad0f7156a1e9c6ce19dce5d72cf1cb9a3ef27";
|
||||
sha256 = "1zq585igfaknwqbvv2cji744016zxadbvr0ifr5l6yq13m0vvn3b";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile --replace gcc cc
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dt $out/bin drat-trim lrat-check
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A proof checker for unSAT proofs";
|
||||
longDescription = ''
|
||||
DRAT-trim is a satisfiability proof checking and trimming
|
||||
utility designed to validate proofs for all known satisfiability
|
||||
solving and preprocessing techniques. DRAT-trim can also emit
|
||||
trimmed formulas, optimized proofs, and TraceCheck+ dependency
|
||||
graphs.
|
||||
|
||||
DRAT-trim has been used as part of the judging process in the
|
||||
annual SAT Competition in recent years, in order to check
|
||||
competing SAT solvers' work when they claim that a SAT instance
|
||||
is unsatisfiable.
|
||||
|
||||
This package also contains the related tool LRAT-check, which checks a
|
||||
proof format called LRAT which extends DRAT with hint statements to speed
|
||||
up the checking process.
|
||||
'';
|
||||
homepage = "https://www.cs.utexas.edu/~marijn/drat-trim/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ kini ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
56
pkgs/applications/science/logic/easycrypt/default.nix
Normal file
56
pkgs/applications/science/logic/easycrypt/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch, ocamlPackages, why3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "easycrypt";
|
||||
version = "2022.04";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "r${version}";
|
||||
sha256 = "sha256:09rdwcj70lkamkhd895p284rfpz4bcnsf55mcimhiqncd2a21ml7";
|
||||
};
|
||||
|
||||
# Fix build with Why3 1.5
|
||||
patches = fetchpatch {
|
||||
url = "https://github.com/EasyCrypt/easycrypt/commit/d226387432deb7f22738e1d5579346a2cbc9be7a.patch";
|
||||
sha256 = "sha256:1zvxij35fnr3h9b5wdl8ml17aqfx3a39rd4mgwmdvkapbg3pa4lm";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with ocamlPackages; [
|
||||
dune_3
|
||||
findlib
|
||||
menhir
|
||||
ocaml
|
||||
];
|
||||
buildInputs = with ocamlPackages; [
|
||||
batteries
|
||||
dune-build-info
|
||||
inifiles
|
||||
yojson
|
||||
zarith
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ why3 ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace dune-project --replace '(name easycrypt)' '(name easycrypt)(version ${version})'
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
dune install --prefix $out ${pname}
|
||||
rm $out/bin/ec-runtest
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.vbgl ];
|
||||
platforms = lib.platforms.all;
|
||||
homepage = "https://easycrypt.info/";
|
||||
description = "Computer-Aided Cryptographic Proofs";
|
||||
};
|
||||
}
|
||||
24
pkgs/applications/science/logic/easycrypt/runtest.nix
Normal file
24
pkgs/applications/science/logic/easycrypt/runtest.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ python3Packages, easycrypt }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
inherit (easycrypt) src version;
|
||||
|
||||
pname = "easycrypt-runtest";
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
doCheck = false;
|
||||
|
||||
pythonPath = with python3Packages; [ pyyaml ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
cp scripts/testing/runtest $out/bin/ec-runtest
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = easycrypt.meta // {
|
||||
description = "Testing program for EasyCrypt formalizations";
|
||||
};
|
||||
}
|
||||
26
pkgs/applications/science/logic/ekrhyper/default.nix
Normal file
26
pkgs/applications/science/logic/ekrhyper/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchurl, ocaml, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ekrhyper";
|
||||
version = "1_4_21022014";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://userpages.uni-koblenz.de/~bpelzer/ekrhyper/ekrh_${version}.tar.gz";
|
||||
sha256 = "sha256-fEe0DIMGj7wO+79/BZf45kykgyTXpbZJsyFSt31XqpM=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
ocaml
|
||||
perl
|
||||
];
|
||||
setSourceRoot = "export sourceRoot=$(echo */ekrh/src/)";
|
||||
preInstall = "export INSTALLDIR=$out";
|
||||
postInstall = ''for i in "$out/casc"/*; do ln -s "$i" "$out/bin/ekrh-casc-$(basename $i)"; done '';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Automated first-order theorem prover";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ raskin ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
diff --git a/src/elan-dist/src/component/package.rs b/src/elan-dist/src/component/package.rs
|
||||
index c51e76d..ae8159e 100644
|
||||
--- a/src/elan-dist/src/component/package.rs
|
||||
+++ b/src/elan-dist/src/component/package.rs
|
||||
@@ -56,6 +56,30 @@ fn unpack_without_first_dir<R: Read>(archive: &mut tar::Archive<R>, path: &Path)
|
||||
entry
|
||||
.unpack(&full_path)
|
||||
.chain_err(|| ErrorKind::ExtractingPackage)?;
|
||||
+ nix_patch_if_needed(&full_path)?;
|
||||
+ }
|
||||
+
|
||||
+ Ok(())
|
||||
+}
|
||||
+
|
||||
+fn nix_patch_if_needed(dest_path: &Path) -> Result<()> {
|
||||
+ let is_bin = matches!(dest_path.parent(), Some(p) if p.ends_with("bin"));
|
||||
+ if is_bin {
|
||||
+ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
|
||||
+ .arg("--set-interpreter")
|
||||
+ .arg("@dynamicLinker@")
|
||||
+ .arg(dest_path)
|
||||
+ .output();
|
||||
+ }
|
||||
+
|
||||
+ if dest_path.file_name() == Some(::std::ffi::OsStr::new("leanc")) {
|
||||
+ use std::os::unix::fs::PermissionsExt;
|
||||
+ let new_path = dest_path.with_extension("orig");
|
||||
+ ::std::fs::rename(dest_path, &new_path)?;
|
||||
+ ::std::fs::write(dest_path, format!(r#"#! @shell@
|
||||
+LEAN_CC="${{LEAN_CC:-@cc@}}" exec -a "$0" {} "$@" -L {}/lib # use bundled libraries, but not bundled compiler that doesn't know about NIX_LDFLAGS
|
||||
+"#, new_path.to_str().unwrap(), dest_path.parent().unwrap().parent().unwrap().to_str().unwrap()))?;
|
||||
+ ::std::fs::set_permissions(dest_path, ::std::fs::Permissions::from_mode(0o755))?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
65
pkgs/applications/science/logic/elan/default.nix
Normal file
65
pkgs/applications/science/logic/elan/default.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{ stdenv, lib, runCommand, patchelf, makeWrapper, pkg-config, curl, runtimeShell
|
||||
, openssl, zlib, fetchFromGitHub, rustPlatform, libiconv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "elan";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "leanprover";
|
||||
repo = "elan";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-jHECNSXSATLuNHNSVwi7mBTI8l6+cLPDISc5T/4yHDg=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-/XwlTmUboDbB6RTanhKyO6o2GBUhxpH/NQjeNsKpse0=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config makeWrapper ];
|
||||
|
||||
OPENSSL_NO_VENDOR = 1;
|
||||
buildInputs = [ curl zlib openssl ]
|
||||
++ lib.optional stdenv.isDarwin libiconv;
|
||||
|
||||
buildFeatures = [ "no-self-update" ];
|
||||
|
||||
patches = lib.optionals stdenv.isLinux [
|
||||
# Run patchelf on the downloaded binaries.
|
||||
# This is necessary because Lean 4 is now dynamically linked.
|
||||
(runCommand "0001-dynamically-patchelf-binaries.patch" {
|
||||
CC = stdenv.cc;
|
||||
cc = "${stdenv.cc}/bin/cc";
|
||||
patchelf = patchelf;
|
||||
shell = runtimeShell;
|
||||
} ''
|
||||
export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
|
||||
substitute ${./0001-dynamically-patchelf-binaries.patch} $out \
|
||||
--subst-var patchelf \
|
||||
--subst-var dynamicLinker \
|
||||
--subst-var cc \
|
||||
--subst-var shell
|
||||
'')
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
pushd $out/bin
|
||||
mv elan-init elan
|
||||
for link in lean leanpkg leanchecker leanc leanmake lake; do
|
||||
ln -s elan $link
|
||||
done
|
||||
popd
|
||||
|
||||
# tries to create .elan
|
||||
export HOME=$(mktemp -d)
|
||||
mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
|
||||
$out/bin/elan completions bash > "$out/share/bash-completion/completions/elan"
|
||||
$out/bin/elan completions fish > "$out/share/fish/vendor_completions.d/elan.fish"
|
||||
$out/bin/elan completions zsh > "$out/share/zsh/site-functions/_elan"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Small tool to manage your installations of the Lean theorem prover";
|
||||
homepage = "https://github.com/leanprover/elan";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ gebner ];
|
||||
};
|
||||
}
|
||||
31
pkgs/applications/science/logic/eprover/default.nix
Normal file
31
pkgs/applications/science/logic/eprover/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchurl, which, enableHO ? false }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "eprover";
|
||||
version = "2.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://wwwlehre.dhbw-stuttgart.de/~sschulz/WORK/E_DOWNLOAD/V_${version}/E.tgz";
|
||||
sha256 = "sha256-qh896qIpFR5g1gdWAwGkbNJLBqUQCeCpuoYHHkDXPt0=";
|
||||
};
|
||||
|
||||
buildInputs = [ which ];
|
||||
|
||||
preConfigure = ''
|
||||
sed -e 's/ *CC *= *gcc$//' -i Makefile.vars
|
||||
'';
|
||||
configureFlags = [
|
||||
"--exec-prefix=$(out)"
|
||||
"--man-prefix=$(out)/share/man"
|
||||
] ++ lib.optionals enableHO [
|
||||
"--enable-ho"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Automated theorem prover for full first-order logic with equality";
|
||||
homepage = "http://www.eprover.org/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ raskin gebner ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
67
pkgs/applications/science/logic/fast-downward/default.nix
Normal file
67
pkgs/applications/science/logic/fast-downward/default.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, python3
|
||||
, osi
|
||||
, cplex
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fast-downward";
|
||||
version = "21.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aibasel";
|
||||
repo = "downward";
|
||||
rev = "release-${version}";
|
||||
sha256 = "sha256-qc+SaUpIYm7bnOZlHH2mdvUaMBB+VRyOCQM/BOoOaPE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake python3.pkgs.wrapPython ];
|
||||
buildInputs = [ python3 osi ];
|
||||
|
||||
cmakeFlags = lib.optional osi.withCplex [ "-DDOWNWARD_CPLEX_ROOT=${cplex}/cplex" ];
|
||||
|
||||
configurePhase = ''
|
||||
python build.py release
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
# Needed because the package tries to be too smart.
|
||||
export CC="$(which $CC)"
|
||||
export CXX="$(which $CXX)"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 builds/release/bin/downward $out/libexec/fast-downward/downward
|
||||
cp -r builds/release/bin/translate $out/libexec/fast-downward/
|
||||
install -Dm755 fast-downward.py $out/bin/fast-downward
|
||||
mkdir -p $out/${python3.sitePackages}
|
||||
cp -r driver $out/${python3.sitePackages}
|
||||
|
||||
wrapPythonProgramsIn $out/bin "$out $pythonPath"
|
||||
wrapPythonProgramsIn $out/libexec/fast-downward/translate "$out $pythonPath"
|
||||
# Because fast-downward calls `python translate.py` we need to return wrapped scripts back.
|
||||
for i in $out/libexec/fast-downward/translate/.*-wrapped; do
|
||||
name="$(basename "$i")"
|
||||
name1="''${name#.}"
|
||||
name2="''${name1%-wrapped}"
|
||||
dir="$(dirname "$i")"
|
||||
dest="$dir/$name2"
|
||||
echo "Moving $i to $dest"
|
||||
mv "$i" "$dest"
|
||||
done
|
||||
|
||||
substituteInPlace $out/${python3.sitePackages}/driver/arguments.py \
|
||||
--replace 'args.build = "release"' "args.build = \"$out/libexec/fast-downward\""
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A domain-independent planning system";
|
||||
homepage = "https://www.fast-downward.org/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
}
|
||||
33
pkgs/applications/science/logic/formula/default.nix
Normal file
33
pkgs/applications/science/logic/formula/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchFromGitHub, buildDotnetModule, dotnetCorePackages }:
|
||||
|
||||
buildDotnetModule rec {
|
||||
pname = "formula-dotnet";
|
||||
version = "2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "VUISIS";
|
||||
repo = "formula-dotnet";
|
||||
rev = "e962438022350dca64335c0603c00d44cb10b528";
|
||||
sha256 = "sha256-hVtwV1MdsXaN6ZrGW4RG2HcNcv/hys/5VxGjH9vFdRE=";
|
||||
};
|
||||
|
||||
nugetDeps = ./nuget.nix;
|
||||
projectFile = "Src/CommandLine/CommandLine.csproj";
|
||||
|
||||
postFixup = if stdenv.isLinux then ''
|
||||
mv $out/bin/CommandLine $out/bin/formula
|
||||
'' else lib.optionalString stdenv.isDarwin ''
|
||||
makeWrapper ${dotnetCorePackages.runtime_5_0}/bin/dotnet $out/bin/formula \
|
||||
--add-flags "$out/lib/formula-dotnet/CommandLine.dll" \
|
||||
--prefix DYLD_LIBRARY_PATH : $out/lib/formula-dotnet/runtimes/macos/native
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
|
||||
description = "Formal Specifications for Verification and Synthesis";
|
||||
homepage = "https://github.com/VUISIS/formula-dotnet";
|
||||
license = licenses.mspl;
|
||||
maintainers = with maintainers; [ siraben ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
80
pkgs/applications/science/logic/formula/nuget.nix
Normal file
80
pkgs/applications/science/logic/formula/nuget.nix
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
{ fetchNuGet }: [
|
||||
(fetchNuGet { pname = "Antlr4.Runtime.Standard"; version = "4.7.2"; sha256 = "1pmrpsgqjfj0nzr1zqzk1m2fm0ynd4nklwq3dhvww08yjg5s0586"; })
|
||||
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "5.0.0"; sha256 = "0d7sjr89zwq0wxirf8la05hfalv9nhvlczg1c7a508k8aw79jvfg"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "5.0.16"; sha256 = "19wv518vwn15a61qb1z9zmrg8mbf7pzw1c3n23wn22h4ssrhmxjb"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "5.0.0"; sha256 = "1p62khf9zk23lh91lvz7plv3g1nzmm3b5szqrcm6mb8w3sjk03wi"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.1.0"; sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; })
|
||||
(fetchNuGet { pname = "Microsoft.Win32.Primitives"; version = "4.3.0"; sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq"; })
|
||||
(fetchNuGet { pname = "Microsoft.Z3.x64"; version = "4.8.7"; sha256 = "1wxlw29xm5x8vwji2s7gwk39wb88dkbpg76l9s9gq0hqpghwlmdz"; })
|
||||
(fetchNuGet { pname = "NETStandard.Library"; version = "1.6.1"; sha256 = "1z70wvsx2d847a2cjfii7b83pjfs34q05gb037fdjikv5kbagml8"; })
|
||||
(fetchNuGet { pname = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "16rnxzpk5dpbbl1x354yrlsbvwylrq456xzpsha1n9y3glnhyx9d"; })
|
||||
(fetchNuGet { pname = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0hkg03sgm2wyq8nqk6dbm9jh5vcq57ry42lkqdmfklrw89lsmr59"; })
|
||||
(fetchNuGet { pname = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0c2p354hjx58xhhz7wv6div8xpi90sc6ibdm40qin21bvi7ymcaa"; })
|
||||
(fetchNuGet { pname = "runtime.native.System"; version = "4.3.0"; sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4"; })
|
||||
(fetchNuGet { pname = "runtime.native.System.IO.Compression"; version = "4.3.0"; sha256 = "1vvivbqsk6y4hzcid27pqpm5bsi6sc50hvqwbcx8aap5ifrxfs8d"; })
|
||||
(fetchNuGet { pname = "runtime.native.System.Net.Http"; version = "4.3.0"; sha256 = "1n6rgz5132lcibbch1qlf0g9jk60r0kqv087hxc0lisy50zpm7kk"; })
|
||||
(fetchNuGet { pname = "runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "1b61p6gw1m02cc1ry996fl49liiwky6181dzr873g9ds92zl326q"; })
|
||||
(fetchNuGet { pname = "runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "18pzfdlwsg2nb1jjjjzyb5qlgy6xjxzmhnfaijq5s2jw3cm3ab97"; })
|
||||
(fetchNuGet { pname = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0qyynf9nz5i7pc26cwhgi8j62ps27sqmf78ijcfgzab50z9g8ay3"; })
|
||||
(fetchNuGet { pname = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1klrs545awhayryma6l7g2pvnp9xy4z0r1i40r80zb45q3i9nbyf"; })
|
||||
(fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "10yc8jdrwgcl44b4g93f1ds76b176bajd3zqi2faf5rvh1vy9smi"; })
|
||||
(fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0zcxjv5pckplvkg0r6mw3asggm7aqzbdjimhvsasb0cgm59x09l3"; })
|
||||
(fetchNuGet { pname = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0vhynn79ih7hw7cwjazn87rm9z9fj0rvxgzlab36jybgcpcgphsn"; })
|
||||
(fetchNuGet { pname = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "160p68l2c7cqmyqjwxydcvgw7lvl1cr0znkw8fp24d1by9mqc8p3"; })
|
||||
(fetchNuGet { pname = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "15zrc8fgd8zx28hdghcj5f5i34wf3l6bq5177075m2bc2j34jrqy"; })
|
||||
(fetchNuGet { pname = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1p4dgxax6p7rlgj4q73k73rslcnz4wdcv8q2flg1s8ygwcm58ld5"; })
|
||||
(fetchNuGet { pname = "System.AppContext"; version = "4.3.0"; sha256 = "1649qvy3dar900z3g817h17nl8jp4ka5vcfmsr05kh0fshn7j3ya"; })
|
||||
(fetchNuGet { pname = "System.Buffers"; version = "4.3.0"; sha256 = "0fgns20ispwrfqll4q1zc1waqcmylb3zc50ys9x8zlwxh9pmd9jy"; })
|
||||
(fetchNuGet { pname = "System.Collections"; version = "4.3.0"; sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9"; })
|
||||
(fetchNuGet { pname = "System.Collections.Concurrent"; version = "4.3.0"; sha256 = "0wi10md9aq33jrkh2c24wr2n9hrpyamsdhsxdcnf43b7y86kkii8"; })
|
||||
(fetchNuGet { pname = "System.Console"; version = "4.3.0"; sha256 = "1flr7a9x920mr5cjsqmsy9wgnv3lvd0h1g521pdr1lkb2qycy7ay"; })
|
||||
(fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y"; })
|
||||
(fetchNuGet { pname = "System.Diagnostics.DiagnosticSource"; version = "4.3.0"; sha256 = "0z6m3pbiy0qw6rn3n209rrzf9x1k4002zh90vwcrsym09ipm2liq"; })
|
||||
(fetchNuGet { pname = "System.Diagnostics.Tools"; version = "4.3.0"; sha256 = "0in3pic3s2ddyibi8cvgl102zmvp9r9mchh82ns9f0ms4basylw1"; })
|
||||
(fetchNuGet { pname = "System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4"; })
|
||||
(fetchNuGet { pname = "System.Globalization"; version = "4.3.0"; sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki"; })
|
||||
(fetchNuGet { pname = "System.Globalization.Calendars"; version = "4.3.0"; sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq"; })
|
||||
(fetchNuGet { pname = "System.Globalization.Extensions"; version = "4.3.0"; sha256 = "02a5zfxavhv3jd437bsncbhd2fp1zv4gxzakp1an9l6kdq1mcqls"; })
|
||||
(fetchNuGet { pname = "System.IO"; version = "4.3.0"; sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f"; })
|
||||
(fetchNuGet { pname = "System.IO.Compression"; version = "4.3.0"; sha256 = "084zc82yi6yllgda0zkgl2ys48sypiswbiwrv7irb3r0ai1fp4vz"; })
|
||||
(fetchNuGet { pname = "System.IO.Compression.ZipFile"; version = "4.3.0"; sha256 = "1yxy5pq4dnsm9hlkg9ysh5f6bf3fahqqb6p8668ndy5c0lk7w2ar"; })
|
||||
(fetchNuGet { pname = "System.IO.FileSystem"; version = "4.3.0"; sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw"; })
|
||||
(fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.3.0"; sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c"; })
|
||||
(fetchNuGet { pname = "System.Linq"; version = "4.3.0"; sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7"; })
|
||||
(fetchNuGet { pname = "System.Linq.Expressions"; version = "4.3.0"; sha256 = "0ky2nrcvh70rqq88m9a5yqabsl4fyd17bpr63iy2mbivjs2nyypv"; })
|
||||
(fetchNuGet { pname = "System.Net.Http"; version = "4.3.0"; sha256 = "1i4gc757xqrzflbk7kc5ksn20kwwfjhw9w7pgdkn19y3cgnl302j"; })
|
||||
(fetchNuGet { pname = "System.Net.Primitives"; version = "4.3.0"; sha256 = "0c87k50rmdgmxx7df2khd9qj7q35j9rzdmm2572cc55dygmdk3ii"; })
|
||||
(fetchNuGet { pname = "System.Net.Sockets"; version = "4.3.0"; sha256 = "1ssa65k6chcgi6mfmzrznvqaxk8jp0gvl77xhf1hbzakjnpxspla"; })
|
||||
(fetchNuGet { pname = "System.ObjectModel"; version = "4.3.0"; sha256 = "191p63zy5rpqx7dnrb3h7prvgixmk168fhvvkkvhlazncf8r3nc2"; })
|
||||
(fetchNuGet { pname = "System.Reflection"; version = "4.3.0"; sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m"; })
|
||||
(fetchNuGet { pname = "System.Reflection.Emit"; version = "4.3.0"; sha256 = "11f8y3qfysfcrscjpjym9msk7lsfxkk4fmz9qq95kn3jd0769f74"; })
|
||||
(fetchNuGet { pname = "System.Reflection.Emit.ILGeneration"; version = "4.3.0"; sha256 = "0w1n67glpv8241vnpz1kl14sy7zlnw414aqwj4hcx5nd86f6994q"; })
|
||||
(fetchNuGet { pname = "System.Reflection.Emit.Lightweight"; version = "4.3.0"; sha256 = "0ql7lcakycrvzgi9kxz1b3lljd990az1x6c4jsiwcacrvimpib5c"; })
|
||||
(fetchNuGet { pname = "System.Reflection.Extensions"; version = "4.3.0"; sha256 = "02bly8bdc98gs22lqsfx9xicblszr2yan7v2mmw3g7hy6miq5hwq"; })
|
||||
(fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.3.0"; sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276"; })
|
||||
(fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.3.0"; sha256 = "0y2ssg08d817p0vdag98vn238gyrrynjdj4181hdg780sif3ykp1"; })
|
||||
(fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49"; })
|
||||
(fetchNuGet { pname = "System.Runtime"; version = "4.3.0"; sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7"; })
|
||||
(fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.3.0"; sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60"; })
|
||||
(fetchNuGet { pname = "System.Runtime.Handles"; version = "4.3.0"; sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8"; })
|
||||
(fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j"; })
|
||||
(fetchNuGet { pname = "System.Runtime.InteropServices.RuntimeInformation"; version = "4.3.0"; sha256 = "0q18r1sh4vn7bvqgd6dmqlw5v28flbpj349mkdish2vjyvmnb2ii"; })
|
||||
(fetchNuGet { pname = "System.Runtime.Numerics"; version = "4.3.0"; sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z"; })
|
||||
(fetchNuGet { pname = "System.Security.Cryptography.Algorithms"; version = "4.3.0"; sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml"; })
|
||||
(fetchNuGet { pname = "System.Security.Cryptography.Cng"; version = "4.3.0"; sha256 = "1k468aswafdgf56ab6yrn7649kfqx2wm9aslywjam1hdmk5yypmv"; })
|
||||
(fetchNuGet { pname = "System.Security.Cryptography.Csp"; version = "4.3.0"; sha256 = "1x5wcrddf2s3hb8j78cry7yalca4lb5vfnkrysagbn6r9x6xvrx1"; })
|
||||
(fetchNuGet { pname = "System.Security.Cryptography.Encoding"; version = "4.3.0"; sha256 = "1jr6w70igqn07k5zs1ph6xja97hxnb3mqbspdrff6cvssgrixs32"; })
|
||||
(fetchNuGet { pname = "System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0givpvvj8yc7gv4lhb6s1prq6p2c4147204a0wib89inqzd87gqc"; })
|
||||
(fetchNuGet { pname = "System.Security.Cryptography.Primitives"; version = "4.3.0"; sha256 = "0pyzncsv48zwly3lw4f2dayqswcfvdwq2nz0dgwmi7fj3pn64wby"; })
|
||||
(fetchNuGet { pname = "System.Security.Cryptography.X509Certificates"; version = "4.3.0"; sha256 = "0valjcz5wksbvijylxijjxb1mp38mdhv03r533vnx1q3ikzdav9h"; })
|
||||
(fetchNuGet { pname = "System.Text.Encoding"; version = "4.3.0"; sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr"; })
|
||||
(fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "11q1y8hh5hrp5a3kw25cb6l00v5l5dvirkz8jr3sq00h1xgcgrxy"; })
|
||||
(fetchNuGet { pname = "System.Text.RegularExpressions"; version = "4.3.0"; sha256 = "1bgq51k7fwld0njylfn7qc5fmwrk2137gdq7djqdsw347paa9c2l"; })
|
||||
(fetchNuGet { pname = "System.Threading"; version = "4.3.0"; sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34"; })
|
||||
(fetchNuGet { pname = "System.Threading.Tasks"; version = "4.3.0"; sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7"; })
|
||||
(fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.3.0"; sha256 = "1xxcx2xh8jin360yjwm4x4cf5y3a2bwpn2ygkfkwkicz7zk50s2z"; })
|
||||
(fetchNuGet { pname = "System.Threading.Timer"; version = "4.3.0"; sha256 = "1nx773nsx6z5whv8kaa1wjh037id2f1cxhb69pvgv12hd2b6qs56"; })
|
||||
(fetchNuGet { pname = "System.Xml.ReaderWriter"; version = "4.3.0"; sha256 = "0c47yllxifzmh8gq6rq6l36zzvw4kjvlszkqa9wq3fr59n0hl3s1"; })
|
||||
(fetchNuGet { pname = "System.Xml.XDocument"; version = "4.3.0"; sha256 = "08h8fm4l77n0nd4i4fk2386y809bfbwqb7ih9d7564ifcxr5ssxd"; })
|
||||
]
|
||||
24
pkgs/applications/science/logic/gappa/default.nix
Normal file
24
pkgs/applications/science/logic/gappa/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchurl, gmp, mpfr, boost }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gappa";
|
||||
version = "1.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://gforge.inria.fr/frs/download.php/file/38436/gappa-${version}.tar.gz";
|
||||
sha256 = "12x42z901pr05ldmparqdi8sq9s7fxbavhzk2dbq3l6hy247dwbb";
|
||||
};
|
||||
|
||||
buildInputs = [ gmp mpfr boost.dev ];
|
||||
|
||||
buildPhase = "./remake";
|
||||
installPhase = "./remake install";
|
||||
|
||||
meta = {
|
||||
homepage = "http://gappa.gforge.inria.fr/";
|
||||
description = "Verifying and formally proving properties on numerical programs dealing with floating-point or fixed-point arithmetic";
|
||||
license = with lib.licenses; [ cecill20 gpl2 ];
|
||||
maintainers = with lib.maintainers; [ vbgl ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
29
pkgs/applications/science/logic/glucose/default.nix
Normal file
29
pkgs/applications/science/logic/glucose/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchurl, zlib }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "glucose";
|
||||
version = "4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.labri.fr/perso/lsimon/downloads/softwares/glucose-syrup-${version}.tgz";
|
||||
sha256 = "0aahrkaq7n0z986fpqz66yz946nxardfi6dh8calzcfjpvqiraji";
|
||||
};
|
||||
|
||||
buildInputs = [ zlib ];
|
||||
|
||||
sourceRoot = "glucose-syrup-${version}/simp";
|
||||
makeFlags = [ "r" ];
|
||||
installPhase = ''
|
||||
install -Dm0755 glucose_release $out/bin/glucose
|
||||
mkdir -p "$out/share/doc/${pname}-${version}/"
|
||||
install -Dm0755 ../{LICEN?E,README*,Changelog*} "$out/share/doc/${pname}-${version}/"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Modern, parallel SAT solver (sequential version)";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ gebner ];
|
||||
# Build uses _FPU_EXTENDED macro
|
||||
badPlatforms = [ "aarch64-linux" ];
|
||||
};
|
||||
}
|
||||
24
pkgs/applications/science/logic/glucose/syrup.nix
Normal file
24
pkgs/applications/science/logic/glucose/syrup.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, zlib, glucose }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "glucose-syrup";
|
||||
version = glucose.version;
|
||||
|
||||
src = glucose.src;
|
||||
|
||||
buildInputs = [ zlib ];
|
||||
|
||||
sourceRoot = "glucose-syrup-${version}/parallel";
|
||||
makeFlags = [ "r" ];
|
||||
installPhase = ''
|
||||
install -Dm0755 glucose-syrup_release $out/bin/glucose-syrup
|
||||
mkdir -p "$out/share/doc/${pname}-${version}/"
|
||||
install -Dm0755 ../{LICEN?E,README*,Changelog*} "$out/share/doc/${pname}-${version}/"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Modern, parallel SAT solver (parallel version)";
|
||||
license = licenses.unfreeRedistributable;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ gebner ];
|
||||
};
|
||||
}
|
||||
88
pkgs/applications/science/logic/hol/default.nix
Normal file
88
pkgs/applications/science/logic/hol/default.nix
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
{lib, stdenv, pkgs, fetchurl, graphviz, fontconfig, liberation_ttf,
|
||||
experimentalKernel ? true}:
|
||||
|
||||
let
|
||||
pname = "hol4";
|
||||
vnum = "14";
|
||||
in
|
||||
|
||||
let
|
||||
version = "k.${vnum}";
|
||||
longVersion = "kananaskis-${vnum}";
|
||||
holsubdir = "hol-${longVersion}";
|
||||
kernelFlag = if experimentalKernel then "--expk" else "--stdknl";
|
||||
in
|
||||
|
||||
let
|
||||
polymlEnableShared = with pkgs; lib.overrideDerivation polyml (attrs: {
|
||||
configureFlags = [ "--enable-shared" ];
|
||||
});
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/hol/hol/${longVersion}/${holsubdir}.tar.gz";
|
||||
sha256 = "6Mc/qsEjzxGqzt6yP6x/1Tmqpwc1UDGlwV1Gl+4pMsY=";
|
||||
};
|
||||
|
||||
buildInputs = [polymlEnableShared graphviz fontconfig liberation_ttf];
|
||||
|
||||
buildCommand = ''
|
||||
|
||||
mkdir chroot-fontconfig
|
||||
cat ${fontconfig.out}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf
|
||||
sed -e 's@</fontconfig>@@' -i chroot-fontconfig/fonts.conf
|
||||
echo "<dir>${liberation_ttf}</dir>" >> chroot-fontconfig/fonts.conf
|
||||
echo "</fontconfig>" >> chroot-fontconfig/fonts.conf
|
||||
|
||||
export FONTCONFIG_FILE=$(pwd)/chroot-fontconfig/fonts.conf
|
||||
|
||||
mkdir -p "$out/src"
|
||||
cd "$out/src"
|
||||
|
||||
tar -xzf "$src"
|
||||
cd ${holsubdir}
|
||||
|
||||
substituteInPlace tools/Holmake/Holmake_types.sml \
|
||||
--replace "\"/bin/" "\"" \
|
||||
|
||||
|
||||
for f in tools/buildutils.sml help/src-sml/DOT;
|
||||
do
|
||||
substituteInPlace $f --replace "\"/usr/bin/dot\"" "\"${graphviz}/bin/dot\""
|
||||
done
|
||||
|
||||
#sed -ie "/compute/,999 d" tools/build-sequence # for testing
|
||||
|
||||
poly < tools/smart-configure.sml
|
||||
|
||||
bin/build ${kernelFlag}
|
||||
|
||||
mkdir -p "$out/bin"
|
||||
ln -st $out/bin $out/src/${holsubdir}/bin/*
|
||||
# ln -s $out/src/hol4.${version}/bin $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
broken = (stdenv.isLinux && stdenv.isAarch64);
|
||||
description = "Interactive theorem prover based on Higher-Order Logic";
|
||||
longDescription = ''
|
||||
HOL4 is the latest version of the HOL interactive proof
|
||||
assistant for higher order logic: a programming environment in
|
||||
which theorems can be proved and proof tools
|
||||
implemented. Built-in decision procedures and theorem provers
|
||||
can automatically establish many simple theorems (users may have
|
||||
to prove the hard theorems themselves!) An oracle mechanism
|
||||
gives access to external programs such as SMT and BDD
|
||||
engines. HOL4 is particularly suitable as a platform for
|
||||
implementing combinations of deduction, execution and property
|
||||
checking.
|
||||
'';
|
||||
homepage = "http://hol.sourceforge.net/";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ mudri ];
|
||||
};
|
||||
}
|
||||
58
pkgs/applications/science/logic/hol_light/default.nix
Normal file
58
pkgs/applications/science/logic/hol_light/default.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ lib, stdenv, runtimeShell, fetchFromGitHub, fetchpatch, ocaml, num, camlp5 }:
|
||||
|
||||
let
|
||||
load_num =
|
||||
if num == null then "" else
|
||||
''
|
||||
-I ${num}/lib/ocaml/${ocaml.version}/site-lib/num \
|
||||
-I ${num}/lib/ocaml/${ocaml.version}/site-lib/top-num \
|
||||
-I ${num}/lib/ocaml/${ocaml.version}/site-lib/stublibs \
|
||||
'';
|
||||
|
||||
start_script =
|
||||
''
|
||||
#!${runtimeShell}
|
||||
cd $out/lib/hol_light
|
||||
exec ${ocaml}/bin/ocaml \
|
||||
-I \`${camlp5}/bin/camlp5 -where\` \
|
||||
${load_num} \
|
||||
-init make.ml
|
||||
'';
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "hol_light";
|
||||
version = "unstable-2019-10-06";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jrh13";
|
||||
repo = "hol-light";
|
||||
rev = "5c91b2ded8a66db571824ecfc18b4536c103b23e";
|
||||
sha256 = "0sxsk8z08ba0q5aixdyczcx5l29lb51ba4ip3d2fry7y604kjsx6";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://salsa.debian.org/ocaml-team/hol-light/-/raw/master/debian/patches/0004-Fix-compilation-with-camlp5-7.11.patch";
|
||||
sha256 = "180qmxbrk3vb1ix7j77hcs8vsar91rs11s5mm8ir5352rz7ylicr";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ ocaml camlp5 ];
|
||||
propagatedBuildInputs = [ num ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/lib/hol_light" "$out/bin"
|
||||
cp -a . $out/lib/hol_light
|
||||
echo "${start_script}" > "$out/bin/hol_light"
|
||||
chmod a+x "$out/bin/hol_light"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Interactive theorem prover based on Higher-Order Logic";
|
||||
homepage = "http://www.cl.cam.ac.uk/~jrh13/hol-light/";
|
||||
license = licenses.bsd2;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ thoughtpolice maggesi vbgl ];
|
||||
};
|
||||
}
|
||||
33
pkgs/applications/science/logic/iprover/default.nix
Normal file
33
pkgs/applications/science/logic/iprover/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchurl, ocaml, eprover, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "iprover";
|
||||
version = "3.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.cs.man.ac.uk/~korovink/iprover/iprover-v${version}.tar.gz";
|
||||
sha256 = "0lik8p7ayhjwpkln1iwf0ri84ramhch74j5nj6z7ph6wfi92pgg8";
|
||||
};
|
||||
|
||||
buildInputs = [ ocaml eprover zlib ];
|
||||
|
||||
preConfigure = "patchShebangs .";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
cp iproveropt "$out/bin"
|
||||
|
||||
mkdir -p "$out/share/${pname}-${version}"
|
||||
cp *.p "$out/share/${pname}-${version}"
|
||||
echo -e "#! ${stdenv.shell}\\n$out/bin/iproveropt --clausifier \"${eprover}/bin/eprover\" --clausifier_options \" --tstp-format --silent --cnf \" \"\$@\"" > "$out"/bin/iprover
|
||||
chmod a+x "$out"/bin/iprover
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An automated first-order logic theorem prover";
|
||||
homepage = "http://www.cs.man.ac.uk/~korovink/iprover/";
|
||||
maintainers = with maintainers; [ raskin gebner ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{ callPackage }:
|
||||
|
||||
{
|
||||
isabelle-linter = callPackage ./isabelle-linter.nix {};
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{ stdenv, lib, fetchFromGitHub, isabelle }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "isabelle-linter";
|
||||
version = "Isabelle2021-1-v1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "isabelle-prover";
|
||||
repo = "isabelle-linter";
|
||||
rev = version;
|
||||
sha256 = "0v6scc2rhj6bjv530gzz6i57czzcgpkw7a9iqnfdnm5gvs5qjk7a";
|
||||
};
|
||||
|
||||
installPhase = import ./mkBuild.nix { inherit isabelle; path = "${pname}-${version}"; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Linter component for Isabelle.";
|
||||
homepage = "https://github.com/isabelle-prover/isabelle-linter";
|
||||
maintainers = with maintainers; [ jvanbruegge ];
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
{ isabelle, path }:
|
||||
|
||||
let
|
||||
dir = "$out/isabelle/${isabelle.dirname}";
|
||||
iDir = "${isabelle}/${isabelle.dirname}";
|
||||
in ''
|
||||
shopt -s extglob
|
||||
mkdir -p ${dir}/lib/classes
|
||||
|
||||
cDir=$out/${isabelle.dirname}/contrib/${path}
|
||||
mkdir -p $cDir
|
||||
cp -r !(isabelle) $cDir
|
||||
|
||||
cd ${dir}
|
||||
ln -s ${iDir}/!(lib|bin) ./
|
||||
ln -s ${iDir}/lib/!(classes) lib/
|
||||
ln -s ${iDir}/lib/classes/* lib/classes/
|
||||
|
||||
mkdir bin/
|
||||
cp ${iDir}/bin/* bin/
|
||||
|
||||
export HOME=$TMP
|
||||
bin/isabelle components -u $cDir
|
||||
bin/isabelle scala_build
|
||||
|
||||
cd lib/classes
|
||||
for f in ${iDir}/lib/classes/*; do
|
||||
rm $(basename $f)
|
||||
done
|
||||
|
||||
lDir=$out/${isabelle.dirname}/lib/classes/
|
||||
mkdir -p $lDir
|
||||
cp -r * $lDir
|
||||
cd $out
|
||||
rm -rf isabelle
|
||||
''
|
||||
210
pkgs/applications/science/logic/isabelle/default.nix
Normal file
210
pkgs/applications/science/logic/isabelle/default.nix
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
{ lib, stdenv, fetchurl, coreutils, nettools, java, scala, polyml, z3, veriT, vampire, eprover-ho, naproche, rlwrap, perl, makeDesktopItem, isabelle-components, isabelle, symlinkJoin, fetchhg }:
|
||||
# nettools needed for hostname
|
||||
|
||||
let
|
||||
sha1 = stdenv.mkDerivation {
|
||||
pname = "isabelle-sha1";
|
||||
version = "2021-1";
|
||||
|
||||
src = fetchhg {
|
||||
url = "https://isabelle.sketis.net/repos/sha1";
|
||||
rev = "e0239faa6f42";
|
||||
sha256 = "sha256-4sxHzU/ixMAkSo67FiE6/ZqWJq9Nb9OMNhMoXH2bEy4=";
|
||||
};
|
||||
|
||||
buildPhase = (if stdenv.isDarwin then ''
|
||||
LDFLAGS="-dynamic -undefined dynamic_lookup -lSystem"
|
||||
'' else ''
|
||||
LDFLAGS="-fPIC -shared"
|
||||
'') + ''
|
||||
CFLAGS="-fPIC -I."
|
||||
$CC $CFLAGS -c sha1.c -o sha1.o
|
||||
$LD $LDFLAGS sha1.o -o libsha1.so
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp libsha1.so $out/lib/
|
||||
'';
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "isabelle";
|
||||
version = "2021-1";
|
||||
|
||||
dirname = "Isabelle${version}";
|
||||
|
||||
src =
|
||||
if stdenv.isDarwin
|
||||
then
|
||||
fetchurl
|
||||
{
|
||||
url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_macos.tar.gz";
|
||||
sha256 = "0n1ls9vwf0ps1x8zpb7c1xz1wkasgvc34h5bz280hy2z6iqwmwbc";
|
||||
}
|
||||
else
|
||||
fetchurl {
|
||||
url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_linux.tar.gz";
|
||||
sha256 = "0jfaqckhg388jh9b4msrpkv6wrd6xzlw18m0bngbby8k8ywalp9i";
|
||||
};
|
||||
|
||||
buildInputs = [ polyml z3 veriT vampire eprover-ho ]
|
||||
++ lib.optionals (!stdenv.isDarwin) [ nettools java ];
|
||||
|
||||
sourceRoot = dirname;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
|
||||
cat >contrib/z3*/etc/settings <<EOF
|
||||
Z3_HOME=${z3}
|
||||
Z3_VERSION=${z3.version}
|
||||
Z3_SOLVER=${z3}/bin/z3
|
||||
Z3_INSTALLED=yes
|
||||
EOF
|
||||
|
||||
cat >contrib/verit-*/etc/settings <<EOF
|
||||
ISABELLE_VERIT=${veriT}/bin/veriT
|
||||
EOF
|
||||
|
||||
cat >contrib/e-*/etc/settings <<EOF
|
||||
E_HOME=${eprover-ho}/bin
|
||||
E_VERSION=${eprover-ho.version}
|
||||
EOF
|
||||
|
||||
cat >contrib/vampire-*/etc/settings <<EOF
|
||||
VAMPIRE_HOME=${vampire}/bin
|
||||
VAMPIRE_VERSION=${vampire.version}
|
||||
VAMPIRE_EXTRA_OPTIONS="--mode casc"
|
||||
EOF
|
||||
|
||||
cat >contrib/polyml-*/etc/settings <<EOF
|
||||
ML_SYSTEM_64=true
|
||||
ML_SYSTEM=${polyml.name}
|
||||
ML_PLATFORM=${stdenv.system}
|
||||
ML_HOME=${polyml}/bin
|
||||
ML_OPTIONS="--minheap 1000"
|
||||
POLYML_HOME="\$COMPONENT"
|
||||
ML_SOURCES="\$POLYML_HOME/src"
|
||||
EOF
|
||||
|
||||
cat >contrib/jdk*/etc/settings <<EOF
|
||||
ISABELLE_JAVA_PLATFORM=${stdenv.system}
|
||||
ISABELLE_JDK_HOME=${java}
|
||||
EOF
|
||||
|
||||
rm contrib/naproche-*/x86*/Naproche-SAD
|
||||
ln -s ${naproche}/bin/Naproche-SAD contrib/naproche-*/x86*/
|
||||
|
||||
echo ISABELLE_LINE_EDITOR=${rlwrap}/bin/rlwrap >>etc/settings
|
||||
|
||||
for comp in contrib/jdk* contrib/polyml-* contrib/z3-* contrib/verit-* contrib/vampire-* contrib/e-*; do
|
||||
rm -rf $comp/x86*
|
||||
done
|
||||
|
||||
substituteInPlace lib/Tools/env \
|
||||
--replace /usr/bin/env ${coreutils}/bin/env
|
||||
|
||||
substituteInPlace src/Tools/Setup/src/Environment.java \
|
||||
--replace 'cmd.add("/usr/bin/env");' "" \
|
||||
--replace 'cmd.add("bash");' "cmd.add(\"$SHELL\");"
|
||||
|
||||
substituteInPlace src/Pure/General/sha1.ML \
|
||||
--replace '"$ML_HOME/" ^ (if ML_System.platform_is_windows then "sha1.dll" else "libsha1.so")' '"${sha1}/lib/libsha1.so"'
|
||||
|
||||
rm -r heaps
|
||||
'' + (if ! stdenv.isLinux then "" else ''
|
||||
arch=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"}
|
||||
for f in contrib/*/$arch/{bash_process,epclextract,nunchaku,SPASS,zipperposition}; do
|
||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f"
|
||||
done
|
||||
for d in contrib/kodkodi-*/jni/$arch; do
|
||||
patchelf --set-rpath "${lib.concatStringsSep ":" [ "${java}/lib/openjdk/lib/server" "${stdenv.cc.cc.lib}/lib" ]}" $d/*.so
|
||||
done
|
||||
'');
|
||||
|
||||
buildPhase = ''
|
||||
export HOME=$TMP # The build fails if home is not set
|
||||
setup_name=$(basename contrib/isabelle_setup*)
|
||||
|
||||
#The following is adapted from https://isabelle.sketis.net/repos/isabelle/file/Isabelle2021-1/Admin/lib/Tools/build_setup
|
||||
TARGET_DIR="contrib/$setup_name/lib"
|
||||
rm -rf "$TARGET_DIR"
|
||||
mkdir -p "$TARGET_DIR/isabelle/setup"
|
||||
declare -a ARGS=("-Xlint:unchecked")
|
||||
|
||||
SOURCES="$(${perl}/bin/perl -e 'while (<>) { if (m/(\S+\.java)/) { print "$1 "; } }' "src/Tools/Setup/etc/build.props")"
|
||||
for SRC in $SOURCES
|
||||
do
|
||||
ARGS["''${#ARGS[@]}"]="src/Tools/Setup/$SRC"
|
||||
done
|
||||
${java}/bin/javac -d "$TARGET_DIR" -classpath ${scala}/lib/scala-compiler.jar "''${ARGS[@]}"
|
||||
${java}/bin/jar -c -f "$TARGET_DIR/isabelle_setup.jar" -e "isabelle.setup.Setup" -C "$TARGET_DIR" isabelle
|
||||
rm -rf "$TARGET_DIR/isabelle"
|
||||
|
||||
# Prebuild HOL Session
|
||||
bin/isabelle build -v -o system_heaps -b HOL
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mv $TMP/$dirname $out
|
||||
cd $out/$dirname
|
||||
bin/isabelle install $out/bin
|
||||
|
||||
# icon
|
||||
mkdir -p "$out/share/icons/hicolor/isabelle/apps"
|
||||
cp "$out/Isabelle${version}/lib/icons/isabelle.xpm" "$out/share/icons/hicolor/isabelle/apps/"
|
||||
|
||||
# desktop item
|
||||
mkdir -p "$out/share"
|
||||
cp -r "${desktopItem}/share/applications" "$out/share/applications"
|
||||
'';
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "isabelle";
|
||||
exec = "isabelle jedit";
|
||||
icon = "isabelle";
|
||||
desktopName = "Isabelle";
|
||||
comment = meta.description;
|
||||
categories = [ "Education" "Science" "Math" ];
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A generic proof assistant";
|
||||
|
||||
longDescription = ''
|
||||
Isabelle is a generic proof assistant. It allows mathematical formulas
|
||||
to be expressed in a formal language and provides tools for proving those
|
||||
formulas in a logical calculus.
|
||||
'';
|
||||
homepage = "https://isabelle.in.tum.de/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.jwiegley maintainers.jvanbruegge ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
} // {
|
||||
withComponents = f:
|
||||
let
|
||||
base = "$out/${isabelle.dirname}";
|
||||
components = f isabelle-components;
|
||||
in symlinkJoin {
|
||||
name = "isabelle-with-components-${isabelle.version}";
|
||||
paths = [ isabelle ] ++ components;
|
||||
|
||||
postBuild = ''
|
||||
rm $out/bin/*
|
||||
|
||||
cd ${base}
|
||||
rm bin/*
|
||||
cp ${isabelle}/${isabelle.dirname}/bin/* bin/
|
||||
rm etc/components
|
||||
cat ${isabelle}/${isabelle.dirname}/etc/components > etc/components
|
||||
|
||||
export HOME=$TMP
|
||||
bin/isabelle install $out/bin
|
||||
patchShebangs $out/bin
|
||||
'' + lib.concatMapStringsSep "\n" (c: ''
|
||||
echo contrib/${c.pname}-${c.version} >> ${base}/etc/components
|
||||
'') components;
|
||||
};
|
||||
}
|
||||
121
pkgs/applications/science/logic/key/default.nix
Normal file
121
pkgs/applications/science/logic/key/default.nix
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, jdk
|
||||
, gradle_7
|
||||
, perl
|
||||
, jre
|
||||
, makeWrapper
|
||||
, makeDesktopItem
|
||||
, copyDesktopItems
|
||||
, testers
|
||||
, key
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "key";
|
||||
version = "2.10.0";
|
||||
src = fetchurl {
|
||||
url = "https://www.key-project.org/dist/${version}/key-${version}-sources.tgz";
|
||||
sha256 = "1f201cbcflqd1z6ysrkh3mff5agspw3v74ybdc3s2lfdyz3b858w";
|
||||
};
|
||||
sourceRoot = "key-${version}/key";
|
||||
|
||||
# fake build to pre-download deps into fixed-output derivation
|
||||
deps = stdenv.mkDerivation {
|
||||
pname = "${pname}-deps";
|
||||
inherit version src sourceRoot;
|
||||
nativeBuildInputs = [ gradle_7 perl ];
|
||||
buildPhase = ''
|
||||
export GRADLE_USER_HOME=$(mktemp -d)
|
||||
# https://github.com/gradle/gradle/issues/4426
|
||||
${lib.optionalString stdenv.isDarwin "export TERM=dumb"}
|
||||
gradle --no-daemon classes testClasses
|
||||
'';
|
||||
# perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar)
|
||||
installPhase = ''
|
||||
find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \
|
||||
| perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \
|
||||
| sh
|
||||
'';
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "sha256-GjBUwJxeyJA6vGrPQVtNpcHb4CJlNlY4kHt1PT21xjo=";
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
inherit pname version src sourceRoot;
|
||||
|
||||
nativeBuildInputs = [
|
||||
jdk
|
||||
gradle_7
|
||||
makeWrapper
|
||||
copyDesktopItems
|
||||
];
|
||||
|
||||
executable-name = "KeY";
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "KeY";
|
||||
exec = executable-name;
|
||||
icon = "key";
|
||||
comment = meta.description;
|
||||
desktopName = "KeY";
|
||||
genericName = "KeY";
|
||||
categories = [ "Science" ];
|
||||
})
|
||||
];
|
||||
|
||||
# disable tests (broken on darwin)
|
||||
gradleAction = if stdenv.isDarwin then "assemble" else "build";
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
export GRADLE_USER_HOME=$(mktemp -d)
|
||||
# https://github.com/gradle/gradle/issues/4426
|
||||
${lib.optionalString stdenv.isDarwin "export TERM=dumb"}
|
||||
# point to offline repo
|
||||
sed -ie "s#repositories {#repositories { maven { url '${deps}' }#g" build.gradle
|
||||
cat <(echo "pluginManagement { repositories { maven { url '${deps}' } } }") settings.gradle > settings_new.gradle
|
||||
mv settings_new.gradle settings.gradle
|
||||
gradle --offline --no-daemon ${gradleAction}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/java
|
||||
cp key.ui/build/libs/key-*-exe.jar $out/share/java/KeY.jar
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share/icons/hicolor/256x256/apps
|
||||
cp key.ui/src/main/resources/de/uka/ilkd/key/gui/images/key-color-icon-square.png $out/share/icons/hicolor/256x256/apps/key.png
|
||||
makeWrapper ${jre}/bin/java $out/bin/KeY \
|
||||
--add-flags "-cp $out/share/java/KeY.jar de.uka.ilkd.key.core.Main"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.tests.version =
|
||||
testers.testVersion {
|
||||
package = key;
|
||||
command = "KeY --help";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Java formal verification tool";
|
||||
homepage = "https://www.key-project.org"; # also https://formal.iti.kit.edu/key/
|
||||
longDescription = ''
|
||||
The KeY System is a formal software development tool that aims to
|
||||
integrate design, implementation, formal specification, and formal
|
||||
verification of object-oriented software as seamlessly as possible.
|
||||
At the core of the system is a novel theorem prover for the first-order
|
||||
Dynamic Logic for Java with a user-friendly graphical interface.
|
||||
'';
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ fgaz ];
|
||||
mainProgram = executable-name;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
54
pkgs/applications/science/logic/kissat/default.nix
Normal file
54
pkgs/applications/science/logic/kissat/default.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, drat-trim, p7zip
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kissat";
|
||||
version = "2.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arminbiere";
|
||||
repo = "kissat";
|
||||
# https://github.com/arminbiere/kissat/issues/18
|
||||
rev = "abfa45fb782fa3b7c6e2eb6b939febe74d7270b7";
|
||||
sha256 = "06pbmkjxgf2idhsrd1yzvbxr2wf8l06pjb38bzbygm6n9ami89b8";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "lib" ];
|
||||
|
||||
checkInputs = [ drat-trim p7zip ];
|
||||
doCheck = true;
|
||||
|
||||
# 'make test' assumes that /etc/passwd is not writable.
|
||||
patches = [ ./writable-passwd-is-ok.patch ];
|
||||
|
||||
# the configure script is not generated by autotools and does not accept the
|
||||
# arguments that the default configurePhase passes like --prefix and --libdir
|
||||
dontAddPrefix = true;
|
||||
setOutputFlags = false;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm0755 build/kissat "$out/bin/kissat"
|
||||
install -Dm0644 src/kissat.h "$dev/include/kissat.h"
|
||||
install -Dm0644 build/libkissat.a "$lib/lib/libkissat.a"
|
||||
mkdir -p "$out/share/doc/kissat/"
|
||||
install -Dm0644 {LICEN?E,README*,VERSION} "$out/share/doc/kissat/"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A 'keep it simple and clean bare metal SAT solver' written in C";
|
||||
longDescription = ''
|
||||
Kissat is a "keep it simple and clean bare metal SAT solver" written in C.
|
||||
It is a port of CaDiCaL back to C with improved data structures,
|
||||
better scheduling of inprocessing and optimized algorithms and implementation.
|
||||
'';
|
||||
maintainers = with maintainers; [ shnarazk ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.mit;
|
||||
homepage = "http://fmv.jku.at/kissat";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/test/testfile.c b/test/testfile.c
|
||||
index cb311d5..0726244 100644
|
||||
--- a/test/testfile.c
|
||||
+++ b/test/testfile.c
|
||||
@@ -92,8 +92,6 @@ do { \
|
||||
WRITABLE (true, "../test/file/non-existing");
|
||||
WRITABLE (false, "/kissat-test-file-writable");
|
||||
WRITABLE (false, "non-existing-directory/file-in-non-existing-directory");
|
||||
- if (kissat_file_exists ("/etc/passwd"))
|
||||
- WRITABLE (false, "/etc/passwd");
|
||||
#undef WRITABLE
|
||||
}
|
||||
|
||||
157
pkgs/applications/science/logic/klee/default.nix
Normal file
157
pkgs/applications/science/logic/klee/default.nix
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
{ lib
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, llvmPackages_9
|
||||
, clang_9
|
||||
, python3
|
||||
, zlib
|
||||
, z3
|
||||
, stp
|
||||
, cryptominisat
|
||||
, gperftools
|
||||
, sqlite
|
||||
, gtest
|
||||
, lit
|
||||
|
||||
# Build KLEE in debug mode. Defaults to false.
|
||||
, debug ? false
|
||||
|
||||
# Include debug info in the build. Defaults to true.
|
||||
, includeDebugInfo ? true
|
||||
|
||||
# Enable KLEE asserts. Defaults to true, since LLVM is built with them.
|
||||
, asserts ? true
|
||||
|
||||
# Build the KLEE runtime in debug mode. Defaults to true, as this improves
|
||||
# stack traces of the software under test.
|
||||
, debugRuntime ? true
|
||||
|
||||
# Enable runtime asserts. Default false.
|
||||
, runtimeAsserts ? false
|
||||
|
||||
# Extra klee-uclibc config.
|
||||
, extraKleeuClibcConfig ? {}
|
||||
}:
|
||||
|
||||
let
|
||||
# Python used for KLEE tests.
|
||||
kleePython = python3.withPackages (ps: with ps; [ tabulate ]);
|
||||
|
||||
# The klee-uclibc derivation.
|
||||
kleeuClibc = callPackage ./klee-uclibc.nix {
|
||||
inherit clang_9 llvmPackages_9 extraKleeuClibcConfig debugRuntime runtimeAsserts;
|
||||
};
|
||||
in
|
||||
clang_9.stdenv.mkDerivation rec {
|
||||
pname = "klee";
|
||||
version = "2.2";
|
||||
src = fetchFromGitHub {
|
||||
owner = "klee";
|
||||
repo = "klee";
|
||||
rev = "v${version}";
|
||||
sha256 = "Ar3BKfADjJvvP0dI9+x/l3RDs8ncx4jmO7ol4MgOr4M=";
|
||||
};
|
||||
buildInputs = [
|
||||
llvmPackages_9.llvm
|
||||
z3 stp cryptominisat
|
||||
gperftools sqlite
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
cmake clang_9
|
||||
];
|
||||
checkInputs = [
|
||||
gtest
|
||||
|
||||
# Should appear BEFORE lit, since lit passes through python rather
|
||||
# than the python environment we make.
|
||||
kleePython
|
||||
(lit.override { python3 = kleePython; })
|
||||
];
|
||||
|
||||
cmakeFlags = let
|
||||
onOff = val: if val then "ON" else "OFF";
|
||||
in [
|
||||
"-DCMAKE_BUILD_TYPE=${if debug then "Debug" else if !debug && includeDebugInfo then "RelWithDebInfo" else "MinSizeRel"}"
|
||||
"-DKLEE_RUNTIME_BUILD_TYPE=${if debugRuntime then "Debug" else "Release"}"
|
||||
"-DKLEE_ENABLE_TIMESTAMP=${onOff false}"
|
||||
"-DENABLE_KLEE_UCLIBC=${onOff true}"
|
||||
"-DKLEE_UCLIBC_PATH=${kleeuClibc}"
|
||||
"-DENABLE_KLEE_ASSERTS=${onOff asserts}"
|
||||
"-DENABLE_POSIX_RUNTIME=${onOff true}"
|
||||
"-DENABLE_UNIT_TESTS=${onOff true}"
|
||||
"-DENABLE_SYSTEM_TESTS=${onOff true}"
|
||||
"-DGTEST_SRC_DIR=${gtest.src}"
|
||||
"-DGTEST_INCLUDE_DIR=${gtest.src}/googletest/include"
|
||||
"-Wno-dev"
|
||||
];
|
||||
|
||||
# Silence various warnings during the compilation of fortified bitcode.
|
||||
NIX_CFLAGS_COMPILE = ["-Wno-macro-redefined"];
|
||||
|
||||
prePatch = ''
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
patches = map fetchpatch [
|
||||
/* This patch is currently necessary for the unit test suite to run correctly.
|
||||
* See https://www.mail-archive.com/klee-dev@imperial.ac.uk/msg03136.html
|
||||
* and https://github.com/klee/klee/pull/1458 for more information.
|
||||
*/
|
||||
{
|
||||
name = "fix-gtest";
|
||||
sha256 = "F+/6videwJZz4sDF9lnV4B8lMx6W11KFJ0Q8t1qUDf4=";
|
||||
url = "https://github.com/klee/klee/pull/1458.patch";
|
||||
}
|
||||
|
||||
# This patch fixes test compile issues with glibc 2.33+.
|
||||
{
|
||||
name = "fix-glibc-2.33";
|
||||
sha256 = "PzxqtFyLy9KF1eA9AAKg1tu+ggRdvu7leuvXifayIcc=";
|
||||
url = "https://github.com/klee/klee/pull/1385.patch";
|
||||
}
|
||||
|
||||
# /etc/mtab doesn't exist in the Nix build sandbox.
|
||||
{
|
||||
name = "fix-etc-mtab-in-tests";
|
||||
sha256 = "2Yb/rJA791esNNqq8uAXV+MML4YXIjPKkHBOufvyRoQ=";
|
||||
url = "https://github.com/klee/klee/pull/1471.patch";
|
||||
}
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
checkTarget = "check";
|
||||
|
||||
passthru = {
|
||||
# Let the user depend on `klee.uclibc` for klee-uclibc
|
||||
uclibc = kleeuClibc;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A symbolic virtual machine built on top of LLVM";
|
||||
longDescription = ''
|
||||
KLEE is a symbolic virtual machine built on top of the LLVM compiler
|
||||
infrastructure. Currently, there are two primary components:
|
||||
|
||||
1. The core symbolic virtual machine engine; this is responsible for
|
||||
executing LLVM bitcode modules with support for symbolic values. This
|
||||
is comprised of the code in lib/.
|
||||
|
||||
2. A POSIX/Linux emulation layer oriented towards supporting uClibc, with
|
||||
additional support for making parts of the operating system environment
|
||||
symbolic.
|
||||
|
||||
Additionally, there is a simple library for replaying computed inputs on
|
||||
native code (for closed programs). There is also a more complicated
|
||||
infrastructure for replaying the inputs generated for the POSIX/Linux
|
||||
emulation layer, which handles running native programs in an environment
|
||||
that matches a computed test input, including setting up files, pipes,
|
||||
environment variables, and passing command line arguments.
|
||||
'';
|
||||
homepage = "https://klee.github.io/";
|
||||
license = licenses.ncsa;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ numinit ];
|
||||
};
|
||||
}
|
||||
98
pkgs/applications/science/logic/klee/klee-uclibc.nix
Normal file
98
pkgs/applications/science/logic/klee/klee-uclibc.nix
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
{ lib
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, which
|
||||
, linuxHeaders
|
||||
, clang_9
|
||||
, llvmPackages_9
|
||||
, python3
|
||||
, debugRuntime ? true
|
||||
, runtimeAsserts ? false
|
||||
, extraKleeuClibcConfig ? {}
|
||||
}:
|
||||
|
||||
let
|
||||
localeSrcBase = "uClibc-locale-030818.tgz";
|
||||
localeSrc = fetchurl {
|
||||
url = "http://www.uclibc.org/downloads/${localeSrcBase}";
|
||||
sha256 = "xDYr4xijjxjZjcz0YtItlbq5LwVUi7k/ZSmP6a+uvVc=";
|
||||
};
|
||||
resolvedExtraKleeuClibcConfig = lib.mapAttrsToList (name: value: "${name}=${value}") (extraKleeuClibcConfig // {
|
||||
"UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA" = "n";
|
||||
"RUNTIME_PREFIX" = "/";
|
||||
"DEVEL_PREFIX" = "/";
|
||||
});
|
||||
in
|
||||
clang_9.stdenv.mkDerivation rec {
|
||||
pname = "klee-uclibc";
|
||||
version = "1.2";
|
||||
src = fetchFromGitHub {
|
||||
owner = "klee";
|
||||
repo = "klee-uclibc";
|
||||
rev = "klee_uclibc_v${version}";
|
||||
sha256 = "qdrGMw+2XwpDsfxdv6swnoaoACcF5a/RWgUxUYbtPrI=";
|
||||
};
|
||||
nativeBuildInputs = [
|
||||
clang_9
|
||||
llvmPackages_9.llvm
|
||||
python3
|
||||
which
|
||||
];
|
||||
|
||||
# Some uClibc sources depend on Linux headers.
|
||||
UCLIBC_KERNEL_HEADERS = "${linuxHeaders}/include";
|
||||
|
||||
# HACK: needed for cross-compile.
|
||||
# See https://www.mail-archive.com/klee-dev@imperial.ac.uk/msg03141.html
|
||||
KLEE_CFLAGS = "-idirafter ${clang_9}/resource-root/include";
|
||||
|
||||
prePatch = ''
|
||||
patchShebangs ./configure
|
||||
patchShebangs ./extra
|
||||
'';
|
||||
|
||||
# klee-uclibc configure does not support --prefix, so we override configurePhase entirely
|
||||
configurePhase = ''
|
||||
./configure ${lib.escapeShellArgs (
|
||||
["--make-llvm-lib"]
|
||||
++ lib.optional (!debugRuntime) "--enable-release"
|
||||
++ lib.optional runtimeAsserts "--enable-assertions"
|
||||
)}
|
||||
|
||||
# Set all the configs we care about.
|
||||
configs=(
|
||||
PREFIX=$out
|
||||
)
|
||||
for value in ${lib.escapeShellArgs resolvedExtraKleeuClibcConfig}; do
|
||||
configs+=("$value")
|
||||
done
|
||||
|
||||
for configFile in .config .config.cmd; do
|
||||
for config in "''${configs[@]}"; do
|
||||
prefix="''${config%%=*}="
|
||||
if grep -q "$prefix" "$configFile"; then
|
||||
sed -i "s"'\001'"''${prefix}"'\001'"#''${prefix}"'\001'"g" "$configFile"
|
||||
fi
|
||||
echo "$config" >> "$configFile"
|
||||
done
|
||||
done
|
||||
'';
|
||||
|
||||
# Link the locale source into the correct place
|
||||
preBuild = ''
|
||||
ln -sf ${localeSrc} extra/locale/${localeSrcBase}
|
||||
'';
|
||||
|
||||
makeFlags = ["HAVE_DOT_CONFIG=y"];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A modified version of uClibc for KLEE.";
|
||||
longDescription = ''
|
||||
klee-uclibc is a bitcode build of uClibc meant for compatibility with the
|
||||
KLEE symbolic virtual machine.
|
||||
'';
|
||||
homepage = "https://klee.github.io/";
|
||||
license = licenses.lgpl3;
|
||||
maintainers = with maintainers; [ numinit ];
|
||||
};
|
||||
}
|
||||
16
pkgs/applications/science/logic/lci/default.nix
Normal file
16
pkgs/applications/science/logic/lci/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{lib, stdenv, fetchurl, readline}:
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.6";
|
||||
pname = "lci";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/lci/${pname}-${version}.tar.gz";
|
||||
sha256="204f1ca5e2f56247d71ab320246811c220ed511bf08c9cb7f305cf180a93948e";
|
||||
};
|
||||
buildInputs = [readline];
|
||||
meta = {
|
||||
description = "Lambda calculus interpreter";
|
||||
maintainers = with lib.maintainers; [raskin];
|
||||
platforms = with lib.platforms; linux;
|
||||
license = lib.licenses.gpl3;
|
||||
};
|
||||
}
|
||||
50
pkgs/applications/science/logic/lean/default.nix
Normal file
50
pkgs/applications/science/logic/lean/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, gmp, coreutils }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lean";
|
||||
version = "3.43.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "leanprover-community";
|
||||
repo = "lean";
|
||||
# lean's version string contains the commit sha1 it was built
|
||||
# from. this is then used to check whether an olean file should be
|
||||
# rebuilt. don't use a tag as rev because this will get replaced into
|
||||
# src/githash.h.in in preConfigure.
|
||||
rev = "bfce34363b0efe86e93e3fe75de76ab3740c772d";
|
||||
sha256 = "100mb003zkgrv1wd2agbk41aipk3j78k8zcjbj7pv9ixh02c7ss8";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ gmp ];
|
||||
|
||||
cmakeDir = "../src";
|
||||
|
||||
# Running the tests is required to build the *.olean files for the core
|
||||
# library.
|
||||
doCheck = true;
|
||||
|
||||
preConfigure = assert builtins.stringLength src.rev == 40; ''
|
||||
substituteInPlace src/githash.h.in \
|
||||
--subst-var-by GIT_SHA1 "${src.rev}"
|
||||
substituteInPlace library/init/version.lean.in \
|
||||
--subst-var-by GIT_SHA1 "${src.rev}"
|
||||
'';
|
||||
|
||||
postPatch = "patchShebangs .";
|
||||
|
||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace $out/bin/leanpkg \
|
||||
--replace "greadlink" "${coreutils}/bin/readlink"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Automatic and interactive theorem prover";
|
||||
homepage = "https://leanprover.github.io/";
|
||||
changelog = "https://github.com/leanprover-community/lean/blob/v${version}/doc/changes.md";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ thoughtpolice gebner ];
|
||||
};
|
||||
}
|
||||
|
||||
46
pkgs/applications/science/logic/lean2/default.nix
Normal file
46
pkgs/applications/science/logic/lean2/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ lib, stdenv, fetchpatch, fetchFromGitHub, cmake, gmp, mpfr, python3
|
||||
, jemalloc, ninja, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "lean2";
|
||||
version = "2018-10-01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "leanprover";
|
||||
repo = "lean2";
|
||||
rev = "8072fdf9a0b31abb9d43ab894d7a858639e20ed7";
|
||||
sha256 = "12bscgihdgvaq5xi0hqf5r4w386zxm3nkx1n150lv5smhg8ga3gg";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/leanprover/lean2/pull/13
|
||||
(fetchpatch {
|
||||
name = "lean2-fix-compilation-error.patch";
|
||||
url = "https://github.com/collares/lean2/commit/09b316ce75fd330b3b140d138bcdae2b0e909234.patch";
|
||||
sha256 = "060mvqn9y8lsn4l20q9rhamkymzsgh0r1vzkjw78gnj8kjw67jl5";
|
||||
})
|
||||
];
|
||||
nativeBuildInputs = [ cmake makeWrapper ninja ];
|
||||
buildInputs = [ gmp mpfr python3 jemalloc ];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs bin/leantags
|
||||
cd src
|
||||
'';
|
||||
|
||||
cmakeFlags = [ "-GNinja" ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/linja --prefix PATH : $out/bin:${ninja}/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Automatic and interactive theorem prover (version with HoTT support)";
|
||||
homepage = "http://leanprover.github.io";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ thoughtpolice gebner ];
|
||||
broken = stdenv.isAarch64;
|
||||
mainProgram = "lean";
|
||||
};
|
||||
}
|
||||
49
pkgs/applications/science/logic/leo2/default.nix
Normal file
49
pkgs/applications/science/logic/leo2/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, makeWrapper, eprover, ocaml, camlp4, perl, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "leo2";
|
||||
version = "1.7.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://page.mi.fu-berlin.de/cbenzmueller/leo/leo2_v${version}.tgz";
|
||||
sha256 = "sha256:1b2q7vsz6s9ighypsigqjm1mzjiq3xgnz5id5ssb4rh9zm190r82";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ eprover ocaml camlp4 perl zlib ];
|
||||
|
||||
patches = [ (fetchpatch {
|
||||
url = "https://github.com/niklasso/minisat/commit/7eb6015313561a2586032574788fcb133eeaa19f.patch";
|
||||
stripLen = 1;
|
||||
extraPrefix = "lib/";
|
||||
sha256 = "sha256:01ln7hi6nvvkqkhn9hciqizizz5qspvqffgksvgmzn9x7kdd9pnh";
|
||||
})
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
cd src
|
||||
patchShebangs configure
|
||||
substituteInPlace Makefile.pre \
|
||||
--replace '+camlp4' "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4"
|
||||
'';
|
||||
|
||||
buildFlags = [ "opt" ];
|
||||
|
||||
preInstall = "mkdir -p $out/bin";
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p "$out/etc"
|
||||
echo -e "e = ${eprover}/bin/eprover\\nepclextract = ${eprover}/bin/epclextract" > "$out/etc/leoatprc"
|
||||
|
||||
wrapProgram $out/bin/leo \
|
||||
--add-flags "--atprc $out/etc/leoatprc"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A high-performance typed higher order prover";
|
||||
maintainers = [ maintainers.raskin ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.bsd3;
|
||||
homepage = "http://www.leoprover.org/";
|
||||
};
|
||||
}
|
||||
29
pkgs/applications/science/logic/leo3/binary.nix
Normal file
29
pkgs/applications/science/logic/leo3/binary.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{lib, stdenv, fetchurl, openjdk, runtimeShell}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "leo3";
|
||||
version = "1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/leoprover/Leo-III/releases/download/v${version}/leo3.jar";
|
||||
sha256 = "1lgwxbr1rnk72rnvc8raq5i1q71ckhn998pwd9xk6zf27wlzijk7";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out"/{bin,lib/java/leo3}
|
||||
cp "${src}" "$out/lib/java/leo3/leo3.jar"
|
||||
echo "#!${runtimeShell}" > "$out/bin/leo3"
|
||||
echo "'${openjdk}/bin/java' -jar '$out/lib/java/leo3/leo3.jar' \"\$@\"" >> "$out/bin/leo3"
|
||||
chmod a+x "$out/bin/leo3"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An automated theorem prover for classical higher-order logic with choice";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.bsd3;
|
||||
maintainers = [maintainers.raskin];
|
||||
platforms = platforms.linux;
|
||||
homepage = "https://page.mi.fu-berlin.de/lex/leo3/";
|
||||
};
|
||||
}
|
||||
48
pkgs/applications/science/logic/lingeling/default.nix
Normal file
48
pkgs/applications/science/logic/lingeling/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, aiger
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "lingeling";
|
||||
# This is the version used in satcomp2020
|
||||
version = "pre1_708beb26";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arminbiere";
|
||||
repo = "lingeling";
|
||||
rev = "708beb26a7d5b5d5e7abd88d6f552fb1946b07c1";
|
||||
sha256 = "1lb2g37nd8qq5hw5g6l691nx5095336yb2zlbaw43mg56hkj8357";
|
||||
};
|
||||
|
||||
configurePhase = ''
|
||||
./configure.sh
|
||||
|
||||
# Rather than patch ./configure, just sneak in use of aiger here, since it
|
||||
# doesn't handle real build products very well (it works on a build-time
|
||||
# dir, not installed copy)... This is so we can build 'blimc'
|
||||
substituteInPlace ./makefile \
|
||||
--replace 'targets: liblgl.a' 'targets: liblgl.a blimc' \
|
||||
--replace '$(AIGER)/aiger.o' '${aiger.lib}/lib/aiger.o' \
|
||||
--replace '$(AIGER)/aiger.h' '${aiger.dev}/include/aiger.h' \
|
||||
--replace '-I$(AIGER)' '-I${aiger.dev}/include'
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $lib/lib $dev/include
|
||||
|
||||
cp lglib.h $dev/include
|
||||
cp liblgl.a $lib/lib
|
||||
|
||||
cp lingeling plingeling treengeling ilingeling blimc $out/bin
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" "lib" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast SAT solver";
|
||||
homepage = "http://fmv.jku.at/lingeling/";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
{ lib, stdenv, fetchurl, jre, makeWrapper, copyDesktopItems, makeDesktopItem, unzip }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "logisim-evolution";
|
||||
version = "3.7.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/logisim-evolution/logisim-evolution/releases/download/v${version}/logisim-evolution-${version}-all.jar";
|
||||
sha256 = "sha256-RI+ioOHj13UAGuPzseAAy3oQBQYkja/ucjj4QMeRZhw=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper copyDesktopItems unzip ];
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = pname;
|
||||
desktopName = "Logisim-evolution";
|
||||
exec = "logisim-evolution";
|
||||
icon = "logisim-evolution";
|
||||
comment = meta.description;
|
||||
categories = [ "Education" ];
|
||||
})
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${jre}/bin/java $out/bin/logisim-evolution --add-flags "-jar $src"
|
||||
|
||||
# Create icons
|
||||
unzip $src "resources/logisim/img/*"
|
||||
for size in 16 32 48 128 256; do
|
||||
install -D "./resources/logisim/img/logisim-icon-$size.png" "$out/share/icons/hicolor/''${size}x''${size}/apps/logisim-evolution.png"
|
||||
done
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/logisim-evolution/logisim-evolution";
|
||||
description = "Digital logic designer and simulator";
|
||||
maintainers = with maintainers; [ emilytrau ];
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
51
pkgs/applications/science/logic/logisim/default.nix
Normal file
51
pkgs/applications/science/logic/logisim/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib, stdenv, fetchurl, jre, makeWrapper, copyDesktopItems, makeDesktopItem, unzip }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "logisim";
|
||||
version = "2.7.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/circuit/${lib.versions.majorMinor version}.x/${version}/logisim-generic-${version}.jar";
|
||||
sha256 = "1hkvc9zc7qmvjbl9579p84hw3n8wl3275246xlzj136i5b0phain";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper copyDesktopItems unzip ];
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = pname;
|
||||
desktopName = "Logisim";
|
||||
exec = "logisim";
|
||||
icon = "logisim";
|
||||
comment = meta.description;
|
||||
categories = [ "Education" ];
|
||||
})
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${jre}/bin/java $out/bin/logisim --add-flags "-jar $src"
|
||||
|
||||
# Create icons
|
||||
unzip $src "resources/logisim/img/*"
|
||||
for size in 16 20 24 48 64 128
|
||||
do
|
||||
install -D "./resources/logisim/img/logisim-icon-$size.png" "$out/share/icons/hicolor/''${size}x''${size}/apps/logisim.png"
|
||||
done
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.cburch.com/logisim/";
|
||||
description = "Educational tool for designing and simulating digital logic circuits";
|
||||
maintainers = with maintainers; [ emilytrau ];
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
31
pkgs/applications/science/logic/ltl2ba/default.nix
Normal file
31
pkgs/applications/science/logic/ltl2ba/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ fetchurl, lib, stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ltl2ba";
|
||||
version = "1.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.lsv.ens-cachan.fr/~gastin/ltl2ba/${pname}-${version}.tar.gz";
|
||||
sha256 = "1bz9gjpvby4mnvny0nmxgd81rim26mqlcnjlznnxxk99575pfa4i";
|
||||
};
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "CC=gcc" ""
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mv ltl2ba $out/bin
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Fast translation from LTL formulae to Buchi automata";
|
||||
homepage = "http://www.lsv.ens-cachan.fr/~gastin/ltl2ba";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.darwin ++ lib.platforms.linux;
|
||||
maintainers = [ lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
}
|
||||
31
pkgs/applications/science/logic/mcrl2/default.nix
Normal file
31
pkgs/applications/science/logic/mcrl2/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{lib, stdenv, fetchurl, cmake, libGLU, libGL, qt5, boost}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "201707";
|
||||
build_nr = "1";
|
||||
pname = "mcrl2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.mcrl2.org/download/release/mcrl2-${version}.${build_nr}.tar.gz";
|
||||
sha256 = "1c8h94ja7271ph61zrcgnjgblxppld6v22f7f900prjgzbcfy14m";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ libGLU libGL qt5.qtbase boost ];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "A toolset for model-checking concurrent systems and protocols";
|
||||
longDescription = ''
|
||||
A formal specification language with an associated toolset,
|
||||
that can be used for modelling, validation and verification of
|
||||
concurrent systems and protocols
|
||||
'';
|
||||
homepage = "https://www.mcrl2.org/";
|
||||
license = licenses.boost;
|
||||
maintainers = with maintainers; [ moretea ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
51
pkgs/applications/science/logic/mcy/default.nix
Normal file
51
pkgs/applications/science/logic/mcy/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, yosys, symbiyosys, python3
|
||||
}:
|
||||
|
||||
let
|
||||
python = python3.withPackages (p: with p; [ flask ]);
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "mcy";
|
||||
version = "2020.08.03";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "YosysHQ";
|
||||
repo = "mcy";
|
||||
rev = "62048e69df13f8e03670424626755ae8ef4c36ff";
|
||||
sha256 = "15xxgzx1zxzx5kshqyrxnfx33cz6cjzxcdcn6z98jhs9bwyvf96f";
|
||||
};
|
||||
|
||||
buildInputs = [ python ];
|
||||
patchPhase = ''
|
||||
chmod +x scripts/create_mutated.sh
|
||||
patchShebangs .
|
||||
|
||||
substituteInPlace mcy.py \
|
||||
--replace yosys '${yosys}/bin/yosys' \
|
||||
--replace 'os.execvp("mcy-dash"' "os.execvp(\"$out/bin/mcy-dash\""
|
||||
substituteInPlace mcy-dash.py \
|
||||
--replace 'app.run(debug=True)' 'app.run(host="0.0.0.0",debug=True)' \
|
||||
--replace 'subprocess.Popen(["mcy"' "subprocess.Popen([\"$out/bin/mcy\""
|
||||
substituteInPlace scripts/create_mutated.sh \
|
||||
--replace yosys '${yosys}/bin/yosys'
|
||||
'';
|
||||
|
||||
# the build needs a bit of work...
|
||||
buildPhase = "true";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/mcy/{dash,scripts}
|
||||
install mcy.py $out/bin/mcy && chmod +x $out/bin/mcy
|
||||
install mcy-dash.py $out/bin/mcy-dash && chmod +x $out/bin/mcy-dash
|
||||
cp -r dash/. $out/share/mcy/dash/.
|
||||
cp -r scripts/. $out/share/mcy/scripts/.
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Mutation-based coverage testing for hardware designs, with Yosys";
|
||||
homepage = "https://github.com/YosysHQ/mcy";
|
||||
license = lib.licenses.isc;
|
||||
maintainers = with lib.maintainers; [ thoughtpolice ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
32
pkgs/applications/science/logic/metis-prover/default.nix
Normal file
32
pkgs/applications/science/logic/metis-prover/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchFromGitHub, perl, mlton }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "metis-prover";
|
||||
version = "2.3.20160713";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gilith";
|
||||
repo = "metis";
|
||||
rev = "f0b1a17cd57eb098077e963ab092477aee9fb340";
|
||||
sha256 = "1i7paax7b4byk8110f5zk4071mh5603r82bq7hbprqzljvsiipk7";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
buildInputs = [ mlton ];
|
||||
|
||||
patchPhase = "patchShebangs .";
|
||||
|
||||
buildPhase = "make mlton";
|
||||
|
||||
installPhase = ''
|
||||
install -Dm0755 bin/mlton/metis $out/bin/metis
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Automatic theorem prover for first-order logic with equality";
|
||||
homepage = "http://www.gilith.com/research/metis/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ gebner ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
24
pkgs/applications/science/logic/minisat/default.nix
Normal file
24
pkgs/applications/science/logic/minisat/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "minisat";
|
||||
version = "2.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "stp";
|
||||
repo = pname;
|
||||
rev = "releases/${version}";
|
||||
sha256 = "14vcbjnlia00lpyv2fhbmw3wbc9bk9h7bln9zpyc3nwiz5cbjz4a";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ zlib ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Compact and readable SAT solver";
|
||||
maintainers = with maintainers; [ gebner raskin ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.mit;
|
||||
homepage = "http://minisat.se/";
|
||||
};
|
||||
}
|
||||
96
pkgs/applications/science/logic/monosat/default.nix
Normal file
96
pkgs/applications/science/logic/monosat/default.nix
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
{ lib, stdenv, fetchpatch, fetchFromGitHub, cmake, zlib, gmp, jdk8,
|
||||
# The JDK we use on Darwin currenly makes extensive use of rpaths which are
|
||||
# annoying and break the python library, so let's not bother for now
|
||||
includeJava ? !stdenv.hostPlatform.isDarwin, includeGplCode ? true }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
boolToCmake = x: if x then "ON" else "OFF";
|
||||
|
||||
rev = "1.8.0";
|
||||
sha256 = "0q3a8x3iih25xkp2bm842sm2hxlb8hxlls4qmvj7vzwrh4lvsl7b";
|
||||
|
||||
pname = "monosat";
|
||||
version = rev;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sambayless";
|
||||
repo = pname;
|
||||
inherit rev sha256;
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Python 3.8 compatibility
|
||||
(fetchpatch {
|
||||
url = "https://github.com/sambayless/monosat/commit/a5079711d0df0451f9840f3a41248e56dbb03967.patch";
|
||||
sha256 = "1p2y0jw8hb9c90nbffhn86k1dxd6f6hk5v70dfmpzka3y6g1ksal";
|
||||
})
|
||||
];
|
||||
|
||||
# source behind __linux__ check assumes system is also x86 and
|
||||
# tries to disable x86/x87-specific extended precision mode
|
||||
# https://github.com/sambayless/monosat/issues/33
|
||||
commonPostPatch = lib.optionalString (!stdenv.hostPlatform.isx86) ''
|
||||
substituteInPlace src/monosat/Main.cc \
|
||||
--replace 'defined(__linux__)' '0'
|
||||
'';
|
||||
|
||||
core = stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
inherit src patches;
|
||||
postPatch = commonPostPatch;
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ zlib gmp jdk8 ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_STATIC=OFF"
|
||||
"-DJAVA=${boolToCmake includeJava}"
|
||||
"-DGPL=${boolToCmake includeGplCode}"
|
||||
];
|
||||
|
||||
postInstall = optionalString includeJava ''
|
||||
mkdir -p $out/share/java
|
||||
cp monosat.jar $out/share/java
|
||||
'';
|
||||
|
||||
passthru = { inherit python; };
|
||||
|
||||
meta = {
|
||||
description = "SMT solver for Monotonic Theories";
|
||||
platforms = platforms.unix;
|
||||
license = if includeGplCode then licenses.gpl2 else licenses.mit;
|
||||
homepage = "https://github.com/sambayless/monosat";
|
||||
maintainers = [ maintainers.acairncross ];
|
||||
};
|
||||
};
|
||||
|
||||
python = { buildPythonPackage, cython, pytestCheckHook }: buildPythonPackage {
|
||||
inherit pname version src patches;
|
||||
|
||||
propagatedBuildInputs = [ core cython ];
|
||||
|
||||
# This tells setup.py to use cython, which should produce faster bindings
|
||||
MONOSAT_CYTHON = true;
|
||||
|
||||
# After patching src, move to where the actually relevant source is. This could just be made
|
||||
# the sourceRoot if it weren't for the patch.
|
||||
postPatch = commonPostPatch + ''
|
||||
cd src/monosat/api/python
|
||||
'' +
|
||||
# The relative paths here don't make sense for our Nix build
|
||||
# TODO: do we want to just reference the core monosat library rather than copying the
|
||||
# shared lib? The current setup.py copies the .dylib/.so...
|
||||
''
|
||||
substituteInPlace setup.py \
|
||||
--replace 'library_dir = "../../../../"' 'library_dir = "${core}/lib/"'
|
||||
'';
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
|
||||
disabledTests = [
|
||||
"test_assertAtMostOne"
|
||||
"test_assertEqual"
|
||||
];
|
||||
};
|
||||
in core
|
||||
38
pkgs/applications/science/logic/naproche/default.nix
Normal file
38
pkgs/applications/science/logic/naproche/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, fetchFromGitHub, haskellPackages, makeWrapper, eprover }:
|
||||
|
||||
with haskellPackages; mkDerivation {
|
||||
pname = "Naproche-SAD";
|
||||
version = "2022-04-19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "naproche";
|
||||
repo = "naproche";
|
||||
rev = "2514c04e715395b7a839e11b63046eafb9c6a1da";
|
||||
sha256 = "1bdgyk4fk65xi7n778rbgddpg4zhggj8wjslxbizrzi81my9a3vm";
|
||||
};
|
||||
|
||||
isExecutable = true;
|
||||
|
||||
buildTools = [ hpack makeWrapper ];
|
||||
executableHaskellDepends = [
|
||||
base array bytestring containers ghc-prim megaparsec mtl network process
|
||||
split temporary text threads time transformers uuid
|
||||
];
|
||||
|
||||
prePatch = "hpack";
|
||||
|
||||
checkPhase = ''
|
||||
export NAPROCHE_EPROVER=${eprover}/bin/eprover
|
||||
dist/build/Naproche-SAD/Naproche-SAD examples/cantor.ftl.tex -t 60 --tex=on
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/Naproche-SAD \
|
||||
--set-default NAPROCHE_EPROVER ${eprover}/bin/eprover
|
||||
'';
|
||||
|
||||
homepage = "https://github.com/naproche/naproche#readme";
|
||||
description = "Write formal proofs in natural language and LaTeX";
|
||||
maintainers = with lib.maintainers; [ jvanbruegge ];
|
||||
license = lib.licenses.gpl3Only;
|
||||
}
|
||||
33
pkgs/applications/science/logic/nuXmv/default.nix
Normal file
33
pkgs/applications/science/logic/nuXmv/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchurl, gmp, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nuXmv";
|
||||
version = "2.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://es-static.fbk.eu/tools/nuxmv/downloads/nuXmv-${version}-${if stdenv.isDarwin then "macosx64" else "linux64"}.tar.gz";
|
||||
sha256 = if stdenv.isDarwin
|
||||
then "sha256-48I+FhJUUam1nMCMMM47CwGO82BYsNz0eHDHXBfqO2E="
|
||||
else "sha256-Gf+QgAjTrysZj7qTtt1wcQPganDtO0YtRY4ykhLPzVo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ gmp ];
|
||||
installPhase= ''
|
||||
runHook preInstall
|
||||
install -Dm755 -t $out/bin ./bin/nuXmv
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString stdenv.isDarwin ''
|
||||
wrapProgram $out/bin/nuXmv --prefix DYLD_LIBRARY_PATH : ${gmp}/lib
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Symbolic model checker for analysis of finite and infinite state systems";
|
||||
homepage = "https://nuxmv.fbk.eu/pmwiki.php";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ siraben ];
|
||||
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
29
pkgs/applications/science/logic/open-wbo/default.nix
Normal file
29
pkgs/applications/science/logic/open-wbo/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchFromGitHub, zlib, gmp }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "open-wbo";
|
||||
version = "2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sat-group";
|
||||
repo = "open-wbo";
|
||||
rev = "f193a3bd802551b13d6424bc1baba6ad35ec6ba6";
|
||||
sha256 = "1742i15qfsbf49c4r837wz35c1p7yafvz7ar6vmgcj6cmfwr8jb4";
|
||||
};
|
||||
|
||||
buildInputs = [ zlib gmp ];
|
||||
|
||||
makeFlags = [ "r" ];
|
||||
installPhase = ''
|
||||
install -Dm0755 open-wbo_release $out/bin/open-wbo
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
broken = (stdenv.isLinux && stdenv.isAarch64);
|
||||
description = "State-of-the-art MaxSAT and Pseudo-Boolean solver";
|
||||
maintainers = with maintainers; [ gebner ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.mit;
|
||||
homepage = "http://sat.inesc-id.pt/open-wbo/";
|
||||
};
|
||||
}
|
||||
39
pkgs/applications/science/logic/opensmt/default.nix
Normal file
39
pkgs/applications/science/logic/opensmt/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ stdenv, lib, fetchFromGitHub
|
||||
, cmake, libedit, gmpxx, bison, flex
|
||||
, enableReadline ? false, readline
|
||||
, gtest
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "opensmt";
|
||||
version = "2.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "usi-verification-and-security";
|
||||
repo = "opensmt";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-3F4Q/ZWlgkiiW7QVjnaaDLSNLVdfAOSmwYdQo1v9Lv4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake bison flex ];
|
||||
buildInputs = [ libedit gmpxx ]
|
||||
++ lib.optional enableReadline readline;
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace test/CMakeLists.txt \
|
||||
--replace 'FetchContent_Populate' '#FetchContent_Populate'
|
||||
'';
|
||||
cmakeFlags = [
|
||||
"-Dgoogletest_SOURCE_DIR=${gtest.src}"
|
||||
"-Dgoogletest_BINARY_DIR=./gtest-build"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
broken = (stdenv.isLinux && stdenv.isAarch64);
|
||||
description = "A satisfiability modulo theory (SMT) solver";
|
||||
maintainers = [ maintainers.raskin ];
|
||||
platforms = platforms.linux;
|
||||
license = if enableReadline then licenses.gpl2Plus else licenses.mit;
|
||||
homepage = "https://github.com/usi-verification-and-security/opensmt";
|
||||
};
|
||||
}
|
||||
45
pkgs/applications/science/logic/ott/default.nix
Normal file
45
pkgs/applications/science/logic/ott/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, ocaml, opaline }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ott";
|
||||
version = "0.32";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ott-lang";
|
||||
repo = "ott";
|
||||
rev = version;
|
||||
sha256 = "sha256-vdDsfsIi1gRW1Sowf29VyQ4C5UKyQZaVgS2uTb8VeW4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config opaline ];
|
||||
buildInputs = [ ocaml ];
|
||||
|
||||
installTargets = "ott.install";
|
||||
|
||||
postInstall = ''
|
||||
opaline -prefix $out
|
||||
''
|
||||
# There is `emacsPackages.ott-mode` for this now.
|
||||
+ ''
|
||||
rm -r $out/share/emacs
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A tool for the working semanticist";
|
||||
longDescription = ''
|
||||
Ott is a tool for writing definitions of programming languages and
|
||||
calculi. It takes as input a definition of a language syntax and
|
||||
semantics, in a concise and readable ASCII notation that is close to
|
||||
what one would write in informal mathematics. It generates LaTeX to
|
||||
build a typeset version of the definition, and Coq, HOL, and Isabelle
|
||||
versions of the definition. Additionally, it can be run as a filter,
|
||||
taking a LaTeX/Coq/Isabelle/HOL source file with embedded (symbolic)
|
||||
terms of the defined language, parsing them and replacing them by
|
||||
target-system terms.
|
||||
'';
|
||||
homepage = "http://www.cl.cam.ac.uk/~pes20/ott";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ jwiegley ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
28
pkgs/applications/science/logic/petrinizer/default.nix
Normal file
28
pkgs/applications/science/logic/petrinizer/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ mkDerivation
|
||||
, async, base, bytestring, containers, fetchFromGitLab, mtl
|
||||
, parallel-io, parsec, lib, stm, transformers, sbv_7_13, z3
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "petrinizer";
|
||||
version = "0.9.1.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.lrz.de";
|
||||
owner = "i7";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1n7fzm96gq5rxm2f8w8sr1yzm1zcxpf0b473c6xnhsgqsis5j4xw";
|
||||
};
|
||||
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
executableHaskellDepends = [
|
||||
async base bytestring containers mtl parallel-io parsec sbv_7_13 stm
|
||||
transformers
|
||||
];
|
||||
description = "Safety and Liveness Analysis of Petri Nets with SMT solvers";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [ raskin ];
|
||||
inherit (sbv_7_13.meta) platforms;
|
||||
}
|
||||
44
pkgs/applications/science/logic/picosat/default.nix
Normal file
44
pkgs/applications/science/logic/picosat/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "picosat";
|
||||
version = "965";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://fmv.jku.at/picosat/${pname}-${version}.tar.gz";
|
||||
sha256 = "0m578rpa5rdn08d10kr4lbsdwp4402hpavrz6n7n53xs517rn5hm";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace picosat.c --replace "sys/unistd.h" "unistd.h"
|
||||
|
||||
substituteInPlace makefile.in \
|
||||
--replace 'ar rc' '$(AR) rc' \
|
||||
--replace 'ranlib' '$(RANLIB)'
|
||||
'';
|
||||
|
||||
configurePhase = "./configure.sh --shared --trace";
|
||||
|
||||
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/";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ roconnor thoughtpolice ];
|
||||
};
|
||||
}
|
||||
27
pkgs/applications/science/logic/poly/default.nix
Normal file
27
pkgs/applications/science/logic/poly/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{lib, stdenv, fetchFromGitHub, gmp, cmake, python3}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libpoly";
|
||||
version = "0.1.11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SRI-CSL";
|
||||
repo = "libpoly";
|
||||
# they've pushed to the release branch, use explicit tag
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-vrYB6RQYShipZ0c0j1KcSTJR1h0rQKAAeJvODMar1GM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ gmp python3 ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/SRI-CSL/libpoly";
|
||||
description = "C library for manipulating polynomials";
|
||||
license = licenses.lgpl3;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
45
pkgs/applications/science/logic/potassco/clingcon.nix
Normal file
45
pkgs/applications/science/logic/potassco/clingcon.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, clingo
|
||||
, catch2
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "clingcon";
|
||||
version = "5.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "potassco";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1g2xkz9nsgqnrw3fdf5jchl16f0skj5mm32va61scc2yrchll166";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./clingcon_limits.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
cp ${catch2}/include/catch2/catch.hpp libclingcon/tests/catch.hpp
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake clingo ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCLINGCON_MANAGE_RPATH=ON"
|
||||
"-DPYCLINGCON_ENABLE=OFF"
|
||||
"-DCLINGCON_BUILD_TESTS=ON"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "Extension of clingo to handle constraints over integers";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
homepage = "https://potassco.org/";
|
||||
downloadPage = "https://github.com/potassco/clingcon/releases/";
|
||||
changelog = "https://github.com/potassco/clingcon/releases/tag/v${version}";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
diff --git i/libclingcon/clingcon/base.hh w/libclingcon/clingcon/base.hh
|
||||
index 2d449fe..0b5fa17 100644
|
||||
--- i/libclingcon/clingcon/base.hh
|
||||
+++ w/libclingcon/clingcon/base.hh
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <clingo.hh>
|
||||
#include <optional>
|
||||
#include <forward_list>
|
||||
+#include <limits>
|
||||
|
||||
//! @file clingcon/base.hh
|
||||
//! Basic data types.
|
||||
diff --git i/libclingcon/clingcon/util.hh w/libclingcon/clingcon/util.hh
|
||||
index df4cddd..308259e 100644
|
||||
--- i/libclingcon/clingcon/util.hh
|
||||
+++ w/libclingcon/clingcon/util.hh
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <map>
|
||||
#include <cstdlib>
|
||||
#include <stdexcept>
|
||||
+#include <limits>
|
||||
|
||||
//! @file clingcon/util.hh
|
||||
//! Very general utility functions.
|
||||
26
pkgs/applications/science/logic/potassco/clingo.nix
Normal file
26
pkgs/applications/science/logic/potassco/clingo.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "clingo";
|
||||
version = "5.5.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "potassco";
|
||||
repo = "clingo";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-fBf7MRFkd5SfHDQ5OvWx4lP/N716SrF9uY4JF7SiWRk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [ "-DCLINGO_BUILD_WITH_PYTHON=OFF" ];
|
||||
|
||||
meta = {
|
||||
description = "ASP system to ground and solve logic programs";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [lib.maintainers.raskin];
|
||||
platforms = lib.platforms.unix;
|
||||
homepage = "https://potassco.org/";
|
||||
downloadPage = "https://github.com/potassco/clingo/releases/";
|
||||
};
|
||||
}
|
||||
43
pkgs/applications/science/logic/prooftree/default.nix
Normal file
43
pkgs/applications/science/logic/prooftree/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, ncurses, ocamlPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "prooftree";
|
||||
version = "0.13";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://askra.de/software/prooftree/releases/prooftree-${version}.tar.gz";
|
||||
sha256 = "0z1z4wqbqwgppkh2bm89fgy07a0y2m6g4lvcyzs09sm1ysklk2dh";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ ncurses ] ++ (with ocamlPackages; [
|
||||
ocaml findlib camlp5 lablgtk ]);
|
||||
|
||||
dontAddPrefix = true;
|
||||
configureFlags = [ "--prefix" "$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A program for proof-tree visualization";
|
||||
longDescription = ''
|
||||
Prooftree is a program for proof-tree visualization during interactive
|
||||
proof development in a theorem prover. It is currently being developed
|
||||
for Coq and Proof General. Prooftree helps against getting lost between
|
||||
different subgoals in interactive proof development. It clearly shows
|
||||
where the current subgoal comes from and thus helps in developing the
|
||||
right plan for solving it.
|
||||
|
||||
Prooftree uses different colors for the already proven subgoals, the
|
||||
current branch in the proof and the still open subgoals. Sequent texts
|
||||
are not displayed in the proof tree itself, but they are shown as a
|
||||
tool-tip when the mouse rests over a sequent symbol. Long proof commands
|
||||
are abbreviated in the tree display, but show up in full length as
|
||||
tool-tip. Both, sequents and proof commands, can be shown in the display
|
||||
below the tree (on single click) or in a separate window (on double or
|
||||
shift-click).
|
||||
'';
|
||||
homepage = "http://askra.de/software/prooftree";
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.jwiegley ];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
46
pkgs/applications/science/logic/prover9/default.nix
Normal file
46
pkgs/applications/science/logic/prover9/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "prover9";
|
||||
version = "2009-11a";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.cs.unm.edu/~mccune/mace4/download/LADR-2009-11A.tar.gz";
|
||||
sha256 = "1l2i3d3h5z7nnbzilb6z92r0rbx0kh6yaxn2c5qhn3000xcfsay3";
|
||||
};
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
postPatch = ''
|
||||
RM=$(type -tp rm)
|
||||
MV=$(type -tp mv)
|
||||
CP=$(type -tp cp)
|
||||
for f in Makefile */Makefile; do
|
||||
substituteInPlace $f --replace "/bin/rm" "$RM" \
|
||||
--replace "/bin/mv" "$MV" \
|
||||
--replace "/bin/cp" "$CP";
|
||||
done
|
||||
'';
|
||||
|
||||
buildFlags = [ "all" ];
|
||||
|
||||
checkPhase = "make test1";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp bin/* $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.cs.unm.edu/~mccune/mace4/";
|
||||
license = licenses.gpl1;
|
||||
description = "Automated theorem prover for first-order and equational logic";
|
||||
longDescription = ''
|
||||
Prover9 is a resolution/paramodulation automated theorem prover
|
||||
for first-order and equational logic. Prover9 is a successor of
|
||||
the Otter Prover. This is the LADR command-line version.
|
||||
'';
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
29
pkgs/applications/science/logic/proverif/default.nix
Normal file
29
pkgs/applications/science/logic/proverif/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchurl, ocamlPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "proverif";
|
||||
version = "2.04";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://bblanche.gitlabpages.inria.fr/proverif/proverif${version}.tar.gz";
|
||||
sha256 = "sha256:0xgwnp59779xc40sb7ck8rmfn620pilxyq79l3bymj9m7z0mwvm9";
|
||||
};
|
||||
|
||||
buildInputs = with ocamlPackages; [ ocaml findlib ];
|
||||
|
||||
buildPhase = "./build -nointeract";
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -D -t $out/bin proverif proveriftotex
|
||||
install -D -t $out/share/emacs/site-lisp/ emacs/proverif.el
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Cryptographic protocol verifier in the formal model";
|
||||
homepage = "https://bblanche.gitlabpages.inria.fr/proverif/";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ thoughtpolice vbgl ];
|
||||
};
|
||||
}
|
||||
37
pkgs/applications/science/logic/redprl/default.nix
Normal file
37
pkgs/applications/science/logic/redprl/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, stdenv, fetchFromGitHub, mlton }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "redprl";
|
||||
version = "unstable-2019-11-04";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "RedPRL";
|
||||
repo = "sml-redprl";
|
||||
rev = "c72190de76f7ed1cfbe1d2046c96e99ac5022b0c";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "sha256-xrQT5o0bsIN+mCYUOz9iY4+j3HGROb1I6R2ADcLy8n4=";
|
||||
};
|
||||
|
||||
buildInputs = [ mlton ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./script/
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
./script/mlton.sh
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mv ./bin/redprl $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A proof assistant for Nominal Computational Type Theory";
|
||||
homepage = "http://www.redprl.org/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ acowley ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
41
pkgs/applications/science/logic/sad/default.nix
Normal file
41
pkgs/applications/science/logic/sad/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib, stdenv, fetchurl, haskell, spass }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "system-for-automated-deduction";
|
||||
version = "2.3.25";
|
||||
src = fetchurl {
|
||||
url = "http://nevidal.org/download/sad-${version}.tar.gz";
|
||||
sha256 = "10jd93xgarik7xwys5lq7fx4vqp7c0yg1gfin9cqfch1k1v8ap4b";
|
||||
};
|
||||
buildInputs = [ haskell.compiler.ghc844 spass ];
|
||||
patches = [
|
||||
./patch.patch
|
||||
# Since the LTS 12.0 update, <> is an operator in Prelude, colliding with
|
||||
# the <> operator with a different meaning defined by this package
|
||||
./monoid.patch
|
||||
];
|
||||
postPatch = ''
|
||||
substituteInPlace Alice/Main.hs --replace init.opt $out/init.opt
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,provers}
|
||||
install alice $out/bin
|
||||
install provers/moses $out/provers
|
||||
substituteAll provers/provers.dat $out/provers/provers.dat
|
||||
substituteAll init.opt $out/init.opt
|
||||
cp -r examples $out
|
||||
'';
|
||||
inherit spass;
|
||||
meta = {
|
||||
description = "A program for automated proving of mathematical texts";
|
||||
longDescription = ''
|
||||
The system for automated deduction is intended for automated processing of formal mathematical texts
|
||||
written in a special language called ForTheL (FORmal THEory Language) or in a traditional first-order language
|
||||
'';
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = [ lib.maintainers.schmitthenner ];
|
||||
homepage = "http://nevidal.org/sad.en.html";
|
||||
platforms = lib.platforms.linux;
|
||||
broken = true; # ghc-8.4.4 is gone from Nixpkgs
|
||||
};
|
||||
}
|
||||
51
pkgs/applications/science/logic/sad/monoid.patch
Normal file
51
pkgs/applications/science/logic/sad/monoid.patch
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
diff --git a/Alice/Core/Check.hs b/Alice/Core/Check.hs
|
||||
index 0700fa0388f..69815864710 100644
|
||||
--- a/Alice/Core/Check.hs
|
||||
+++ b/Alice/Core/Check.hs
|
||||
@@ -18,8 +18,12 @@
|
||||
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-}
|
||||
|
||||
+{-# LANGUAGE NoImplicitPrelude #-}
|
||||
+
|
||||
module Alice.Core.Check (fillDef) where
|
||||
|
||||
+import Prelude hiding ((<>))
|
||||
+
|
||||
import Control.Monad
|
||||
import Data.Maybe
|
||||
|
||||
diff --git a/Alice/Core/Reason.hs b/Alice/Core/Reason.hs
|
||||
index c361bcf220d..4e493d8c91b 100644
|
||||
--- a/Alice/Core/Reason.hs
|
||||
+++ b/Alice/Core/Reason.hs
|
||||
@@ -17,9 +17,12 @@
|
||||
- You should have received a copy of the GNU General Public License
|
||||
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-}
|
||||
+{-# LANGUAGE NoImplicitPrelude #-}
|
||||
|
||||
module Alice.Core.Reason where
|
||||
|
||||
+import Prelude hiding ((<>))
|
||||
+
|
||||
import Control.Monad
|
||||
|
||||
import Alice.Core.Base
|
||||
diff --git a/Alice/Core/Verify.hs b/Alice/Core/Verify.hs
|
||||
index 4f8550bdf11..0f59d135b16 100644
|
||||
--- a/Alice/Core/Verify.hs
|
||||
+++ b/Alice/Core/Verify.hs
|
||||
@@ -18,8 +18,12 @@
|
||||
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-}
|
||||
|
||||
+{-# LANGUAGE NoImplicitPrelude #-}
|
||||
+
|
||||
module Alice.Core.Verify (verify) where
|
||||
|
||||
+import Prelude hiding ((<>))
|
||||
+
|
||||
import Control.Monad
|
||||
import Data.IORef
|
||||
import Data.Maybe
|
||||
200
pkgs/applications/science/logic/sad/patch.patch
Normal file
200
pkgs/applications/science/logic/sad/patch.patch
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
diff -aur serious/sad-2.3-25/Alice/Core/Base.hs sad-2.3-25/Alice/Core/Base.hs
|
||||
--- serious/sad-2.3-25/Alice/Core/Base.hs 2008-03-29 18:24:12.000000000 +0000
|
||||
+++ sad-2.3-25/Alice/Core/Base.hs 2015-11-27 06:38:28.740840823 +0000
|
||||
@@ -21,6 +21,7 @@
|
||||
module Alice.Core.Base where
|
||||
|
||||
import Control.Monad
|
||||
+import Control.Applicative
|
||||
import Data.IORef
|
||||
import Data.List
|
||||
import Data.Time
|
||||
@@ -61,10 +62,21 @@
|
||||
type CRMC a b = IORef RState -> IO a -> (b -> IO a) -> IO a
|
||||
newtype CRM b = CRM { runCRM :: forall a . CRMC a b }
|
||||
|
||||
+instance Functor CRM where
|
||||
+ fmap = liftM
|
||||
+
|
||||
+instance Applicative CRM where
|
||||
+ pure = return
|
||||
+ (<*>) = ap
|
||||
+
|
||||
instance Monad CRM where
|
||||
return r = CRM $ \ _ _ k -> k r
|
||||
m >>= n = CRM $ \ s z k -> runCRM m s z (\ r -> runCRM (n r) s z k)
|
||||
|
||||
+instance Alternative CRM where
|
||||
+ (<|>) = mplus
|
||||
+ empty = mzero
|
||||
+
|
||||
instance MonadPlus CRM where
|
||||
mzero = CRM $ \ _ z _ -> z
|
||||
mplus m n = CRM $ \ s z k -> runCRM m s (runCRM n s z k) k
|
||||
diff -aur serious/sad-2.3-25/Alice/Core/Thesis.hs sad-2.3-25/Alice/Core/Thesis.hs
|
||||
--- serious/sad-2.3-25/Alice/Core/Thesis.hs 2008-03-05 13:10:50.000000000 +0000
|
||||
+++ sad-2.3-25/Alice/Core/Thesis.hs 2015-11-27 06:35:08.311015166 +0000
|
||||
@@ -21,6 +21,7 @@
|
||||
module Alice.Core.Thesis (thesis) where
|
||||
|
||||
import Control.Monad
|
||||
+import Control.Applicative
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
|
||||
@@ -126,11 +127,22 @@
|
||||
|
||||
newtype TM res = TM { runTM :: [String] -> [([String], res)] }
|
||||
|
||||
+instance Functor TM where
|
||||
+ fmap = liftM
|
||||
+
|
||||
+instance Applicative TM where
|
||||
+ pure = return
|
||||
+ (<*>) = ap
|
||||
+
|
||||
instance Monad TM where
|
||||
return r = TM $ \ s -> [(s, r)]
|
||||
m >>= k = TM $ \ s -> concatMap apply (runTM m s)
|
||||
where apply (s, r) = runTM (k r) s
|
||||
|
||||
+instance Alternative TM where
|
||||
+ (<|>) = mplus
|
||||
+ empty = mzero
|
||||
+
|
||||
instance MonadPlus TM where
|
||||
mzero = TM $ \ _ -> []
|
||||
mplus m k = TM $ \ s -> runTM m s ++ runTM k s
|
||||
diff -aur serious/sad-2.3-25/Alice/Export/Base.hs sad-2.3-25/Alice/Export/Base.hs
|
||||
--- serious/sad-2.3-25/Alice/Export/Base.hs 2008-03-09 09:36:39.000000000 +0000
|
||||
+++ sad-2.3-25/Alice/Export/Base.hs 2015-11-27 06:32:47.782738005 +0000
|
||||
@@ -39,7 +39,7 @@
|
||||
-- Database reader
|
||||
|
||||
readPrDB :: String -> IO [Prover]
|
||||
-readPrDB file = do inp <- catch (readFile file) $ die . ioeGetErrorString
|
||||
+readPrDB file = do inp <- catchIOError (readFile file) $ die . ioeGetErrorString
|
||||
|
||||
let dws = dropWhile isSpace
|
||||
cln = reverse . dws . reverse . dws
|
||||
diff -aur serious/sad-2.3-25/Alice/Export/Prover.hs sad-2.3-25/Alice/Export/Prover.hs
|
||||
--- serious/sad-2.3-25/Alice/Export/Prover.hs 2008-03-09 09:36:39.000000000 +0000
|
||||
+++ sad-2.3-25/Alice/Export/Prover.hs 2015-11-27 06:36:47.632919161 +0000
|
||||
@@ -60,7 +60,7 @@
|
||||
when (askIB IBPdmp False ins) $ putStrLn tsk
|
||||
|
||||
seq (length tsk) $ return $
|
||||
- do (wh,rh,eh,ph) <- catch run
|
||||
+ do (wh,rh,eh,ph) <- catchIOError run
|
||||
$ \ e -> die $ "run error: " ++ ioeGetErrorString e
|
||||
|
||||
hPutStrLn wh tsk ; hClose wh
|
||||
diff -aur serious/sad-2.3-25/Alice/ForTheL/Base.hs sad-2.3-25/Alice/ForTheL/Base.hs
|
||||
--- serious/sad-2.3-25/Alice/ForTheL/Base.hs 2008-03-09 09:36:39.000000000 +0000
|
||||
+++ sad-2.3-25/Alice/ForTheL/Base.hs 2015-11-27 06:31:51.921230428 +0000
|
||||
@@ -226,7 +226,7 @@
|
||||
varlist = do vs <- chainEx (char ',') var
|
||||
nodups vs ; return vs
|
||||
|
||||
-nodups vs = unless (null $ dups vs) $
|
||||
+nodups vs = unless ((null :: [a] -> Bool) $ dups vs) $
|
||||
fail $ "duplicate names: " ++ show vs
|
||||
|
||||
hidden = askPS psOffs >>= \ n -> return ('h':show n)
|
||||
diff -aur serious/sad-2.3-25/Alice/Import/Reader.hs sad-2.3-25/Alice/Import/Reader.hs
|
||||
--- serious/sad-2.3-25/Alice/Import/Reader.hs 2008-03-09 09:36:39.000000000 +0000
|
||||
+++ sad-2.3-25/Alice/Import/Reader.hs 2015-11-27 06:36:41.818866167 +0000
|
||||
@@ -24,7 +24,7 @@
|
||||
import Control.Monad
|
||||
import System.IO
|
||||
import System.IO.Error
|
||||
-import System.Exit
|
||||
+import System.Exit hiding (die)
|
||||
|
||||
import Alice.Data.Text
|
||||
import Alice.Data.Instr
|
||||
@@ -44,7 +44,7 @@
|
||||
readInit "" = return []
|
||||
|
||||
readInit file =
|
||||
- do input <- catch (readFile file) $ die file . ioeGetErrorString
|
||||
+ do input <- catchIOError (readFile file) $ die file . ioeGetErrorString
|
||||
let tkn = tokenize input ; ips = initPS ()
|
||||
inp = ips { psRest = tkn, psFile = file, psLang = "Init" }
|
||||
liftM fst $ fireLPM instf inp
|
||||
@@ -74,7 +74,7 @@
|
||||
reader lb fs (ps:ss) [TI (InStr ISfile file)] =
|
||||
do let gfl = if null file then hGetContents stdin
|
||||
else readFile file
|
||||
- input <- catch gfl $ die file . ioeGetErrorString
|
||||
+ input <- catchIOError gfl $ die file . ioeGetErrorString
|
||||
let tkn = tokenize input
|
||||
ips = initPS $ (psProp ps) { tvr_expr = [] }
|
||||
sps = ips { psRest = tkn, psFile = file, psOffs = psOffs ps }
|
||||
diff -aur serious/sad-2.3-25/Alice/Parser/Base.hs sad-2.3-25/Alice/Parser/Base.hs
|
||||
--- serious/sad-2.3-25/Alice/Parser/Base.hs 2008-03-09 09:36:40.000000000 +0000
|
||||
+++ sad-2.3-25/Alice/Parser/Base.hs 2015-11-27 06:14:28.616734527 +0000
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
module Alice.Parser.Base where
|
||||
|
||||
+import Control.Applicative
|
||||
import Control.Monad
|
||||
import Data.List
|
||||
|
||||
@@ -45,11 +46,22 @@
|
||||
type CPMC a b c = (c -> CPMS a b) -> (String -> CPMS a b) -> CPMS a b
|
||||
newtype CPM a c = CPM { runCPM :: forall b . CPMC a b c }
|
||||
|
||||
+instance Functor (CPM a) where
|
||||
+ fmap = liftM
|
||||
+
|
||||
+instance Applicative (CPM a) where
|
||||
+ pure = return
|
||||
+ (<*>) = ap
|
||||
+
|
||||
instance Monad (CPM a) where
|
||||
return r = CPM $ \ k _ -> k r
|
||||
m >>= n = CPM $ \ k l -> runCPM m (\ b -> runCPM (n b) k l) l
|
||||
fail e = CPM $ \ _ l -> l e
|
||||
|
||||
+instance Alternative (CPM a) where
|
||||
+ (<|>) = mplus
|
||||
+ empty = mzero
|
||||
+
|
||||
instance MonadPlus (CPM a) where
|
||||
mzero = CPM $ \ _ _ _ z -> z
|
||||
mplus m n = CPM $ \ k l s -> runCPM m k l s . runCPM n k l s
|
||||
diff -aur serious/sad-2.3-25/init.opt sad-2.3-25/init.opt
|
||||
--- serious/sad-2.3-25/init.opt 2007-10-11 15:25:45.000000000 +0000
|
||||
+++ sad-2.3-25/init.opt 2015-11-27 07:23:41.372816854 +0000
|
||||
@@ -1,6 +1,6 @@
|
||||
# Alice init options
|
||||
-[library examples]
|
||||
-[provers provers/provers.dat]
|
||||
+[library @out@/examples]
|
||||
+[provers @out@/provers/provers.dat]
|
||||
[prover spass]
|
||||
[timelimit 3]
|
||||
[depthlimit 7]
|
||||
diff -aur serious/sad-2.3-25/provers/provers.dat sad-2.3-25/provers/provers.dat
|
||||
--- serious/sad-2.3-25/provers/provers.dat 2008-08-26 21:20:25.000000000 +0000
|
||||
+++ sad-2.3-25/provers/provers.dat 2015-11-27 07:24:18.878169702 +0000
|
||||
@@ -3,7 +3,7 @@
|
||||
Pmoses
|
||||
LMoses
|
||||
Fmoses
|
||||
-Cprovers/moses
|
||||
+C@out@/provers/moses
|
||||
Yproved in
|
||||
Nfound unprovable in
|
||||
Utimeout in
|
||||
@@ -12,7 +12,7 @@
|
||||
Pspass
|
||||
LSPASS
|
||||
Fdfg
|
||||
-Cprovers/SPASS -CNFOptSkolem=0 -PProblem=0 -PGiven=0 -Stdin -TimeLimit=%d
|
||||
+C@spass@/bin/SPASS -CNFOptSkolem=0 -PProblem=0 -PGiven=0 -Stdin -TimeLimit=%d
|
||||
YSPASS beiseite: Proof found.
|
||||
NSPASS beiseite: Completion found.
|
||||
USPASS beiseite: Ran out of time.
|
||||
70
pkgs/applications/science/logic/satallax/default.nix
Normal file
70
pkgs/applications/science/logic/satallax/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{lib, stdenv, fetchurl, ocaml, zlib, which, eprover, makeWrapper, coq}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "satallax";
|
||||
version = "2.7";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ocaml zlib which eprover coq];
|
||||
src = fetchurl {
|
||||
url = "https://www.ps.uni-saarland.de/~cebrown/satallax/downloads/${pname}-${version}.tar.gz";
|
||||
sha256 = "1kvxn8mc35igk4vigi5cp7w3wpxk2z3bgwllfm4n3h2jfs0vkpib";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# GCC9 doesn't allow default value in friend declaration.
|
||||
./fix-declaration-gcc9.patch
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
mkdir fake-tools
|
||||
echo "echo 'Nix-build-host.localdomain'" > fake-tools/hostname
|
||||
chmod a+x fake-tools/hostname
|
||||
export PATH="$PATH:$PWD/fake-tools"
|
||||
|
||||
(
|
||||
cd picosat-*
|
||||
./configure
|
||||
make
|
||||
)
|
||||
export PATH="$PATH:$PWD/libexec/satallax"
|
||||
|
||||
mkdir -p "$out/libexec/satallax"
|
||||
cp picosat-*/picosat picosat-*/picomus "$out/libexec/satallax"
|
||||
|
||||
(
|
||||
cd minisat
|
||||
export MROOT=$PWD
|
||||
cd core
|
||||
make
|
||||
cd ../simp
|
||||
make
|
||||
)
|
||||
'';
|
||||
|
||||
postBuild = "echo testing; ! (bash ./test | grep ERROR)";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/share/doc/satallax" "$out/bin" "$out/lib" "$out/lib/satallax"
|
||||
cp bin/satallax.opt "$out/bin/satallax"
|
||||
wrapProgram "$out/bin/satallax" \
|
||||
--suffix PATH : "${lib.makeBinPath [ coq eprover ]}:$out/libexec/satallax" \
|
||||
--add-flags "-M" --add-flags "$out/lib/satallax/modes"
|
||||
|
||||
cp LICENSE README "$out/share/doc/satallax"
|
||||
|
||||
cp bin/*.so "$out/lib"
|
||||
|
||||
cp -r modes "$out/lib/satallax/"
|
||||
cp -r problems "$out/lib/satallax/"
|
||||
cp -r coq* "$out/lib/satallax/"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Automated theorem prover for higher-order logic";
|
||||
license = lib.licenses.mit ;
|
||||
maintainers = [lib.maintainers.raskin];
|
||||
platforms = lib.platforms.linux;
|
||||
downloadPage = "http://www.ps.uni-saarland.de/~cebrown/satallax/downloads.php";
|
||||
homepage = "http://www.ps.uni-saarland.de/~cebrown/satallax/index.php";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
diff --git i/minisat/core/SolverTypes.h w/minisat/core/SolverTypes.h
|
||||
--- i/minisat/core/SolverTypes.h
|
||||
+++ w/minisat/core/SolverTypes.h
|
||||
@@ -47,7 +47,7 @@ struct Lit {
|
||||
int x;
|
||||
|
||||
// Use this as a constructor:
|
||||
- friend Lit mkLit(Var var, bool sign = false);
|
||||
+ friend Lit mkLit(Var var, bool sign);
|
||||
|
||||
bool operator == (Lit p) const { return x == p.x; }
|
||||
bool operator != (Lit p) const { return x != p.x; }
|
||||
@@ -55,7 +55,7 @@ struct Lit {
|
||||
};
|
||||
|
||||
|
||||
-inline Lit mkLit (Var var, bool sign) { Lit p; p.x = var + var + (int)sign; return p; }
|
||||
+inline Lit mkLit (Var var, bool sign = false) { Lit p; p.x = var + var + (int)sign; return p; }
|
||||
inline Lit operator ~(Lit p) { Lit q; q.x = p.x ^ 1; return q; }
|
||||
inline Lit operator ^(Lit p, bool b) { Lit q; q.x = p.x ^ (unsigned int)b; return q; }
|
||||
inline bool sign (Lit p) { return p.x & 1; }
|
||||
58
pkgs/applications/science/logic/saw-tools/default.nix
Normal file
58
pkgs/applications/science/logic/saw-tools/default.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ lib, stdenv, fetchurl, gmp4, ncurses, zlib, clang }:
|
||||
|
||||
let
|
||||
libPath = lib.makeLibraryPath
|
||||
[ stdenv.cc.libc
|
||||
stdenv.cc.cc
|
||||
gmp4
|
||||
ncurses
|
||||
zlib
|
||||
] + ":${stdenv.cc.cc.lib}/lib64";
|
||||
|
||||
url = "https://github.com/GaloisInc/saw-script/releases/download";
|
||||
|
||||
saw-bin =
|
||||
if stdenv.hostPlatform.system == "i686-linux"
|
||||
then fetchurl {
|
||||
url = url + "/v0.1.1-dev/saw-0.1.1-dev-2015-07-31-CentOS6-32.tar.gz";
|
||||
sha256 = "126iag5nnvndi78c921z7vjrjfwcspn1hlxwwhzmqm4rvbhhr9v9";
|
||||
}
|
||||
else fetchurl {
|
||||
url = url + "/v0.1.1-dev/saw-0.1.1-dev-2015-07-31-CentOS6-64.tar.gz";
|
||||
sha256 = "07gyf319v6ama6n1aj96403as04bixi8mbisfy7f7va689zklflr";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "saw-tools";
|
||||
version = "0.1.1-20150731";
|
||||
|
||||
src = saw-bin;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib $out/share
|
||||
|
||||
mv bin $out/bin
|
||||
mv doc $out/share
|
||||
|
||||
ln -s ${ncurses.out}/lib/libtinfo.so.5 $out/lib/libtinfo.so.5
|
||||
ln -s ${stdenv.cc.libc}/lib/libpthread.so.0 $out/lib/libpthread.so.0
|
||||
|
||||
# Add a clang symlink for easy building with a suitable compiler.
|
||||
ln -s ${clang}/bin/clang $out/bin/saw-clang
|
||||
'';
|
||||
|
||||
fixupPhase = ''
|
||||
for x in bin/bcdump bin/extcore-info bin/jss bin/llvm-disasm bin/lss bin/saw; do
|
||||
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$out/lib:${libPath}" $out/$x;
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Tools for software verification and analysis";
|
||||
homepage = "https://saw.galois.com";
|
||||
license = lib.licenses.bsd3;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = [ lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
}
|
||||
42
pkgs/applications/science/logic/spass/default.nix
Normal file
42
pkgs/applications/science/logic/spass/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchurl, bison, flex }:
|
||||
|
||||
let
|
||||
baseVersion="3";
|
||||
minorVersion="9";
|
||||
|
||||
extraTools = "FLOTTER prolog2dfg dfg2otter dfg2dimacs dfg2tptp"
|
||||
+ " dfg2ascii dfg2dfg tptp2dfg dimacs2dfg pgen rescmp";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "spass";
|
||||
version = "${baseVersion}.${minorVersion}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.spass-prover.org/download/sources/spass${baseVersion}${minorVersion}.tgz";
|
||||
sha256 = "11cyn3kcff4r79rsw2s0xm6rdb8bi0kpkazv2b48jhcms7xw75qp";
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
nativeBuildInputs = [ bison flex ];
|
||||
|
||||
buildPhase = ''
|
||||
make RM="rm -f" proparser.c ${extraTools} opt
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -m0755 SPASS ${extraTools} $out/bin/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Automated theorem prover for first-order logic";
|
||||
maintainers = with maintainers;
|
||||
[
|
||||
raskin
|
||||
];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.bsd2;
|
||||
downloadPage = "http://www.spass-prover.org/download/index.html";
|
||||
};
|
||||
}
|
||||
34
pkgs/applications/science/logic/statverif/default.nix
Normal file
34
pkgs/applications/science/logic/statverif/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, stdenv, fetchurl, ocaml }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "statverif";
|
||||
version = "1.86pl4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://prosecco.gforge.inria.fr/personal/bblanche/proverif/proverif${version}.tar.gz";
|
||||
sha256 = "163vdcixs764jj8xa08w80qm4kcijf7xj911yp8jvz6pi1q5g13i";
|
||||
};
|
||||
|
||||
pf-patch = fetchurl {
|
||||
url = "http://markryan.eu/research/statverif/files/proverif-${version}-statverif-2657ab4.patch";
|
||||
sha256 = "113jjhi1qkcggbsmbw8fa9ln8vs7vy2r288szks7rn0jjn0wxmbw";
|
||||
};
|
||||
|
||||
buildInputs = [ ocaml ];
|
||||
|
||||
patchPhase = "patch -p1 < ${pf-patch}";
|
||||
buildPhase = "./build";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ./proverif $out/bin/statverif
|
||||
cp ./proveriftotex $out/bin/statveriftotex
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Verification of stateful processes (via Proverif)";
|
||||
homepage = "https://markryan.eu/research/statverif/";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
}
|
||||
33
pkgs/applications/science/logic/stp/default.nix
Normal file
33
pkgs/applications/science/logic/stp/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, cmake, boost, bison, flex, fetchFromGitHub, perl
|
||||
, python3, python3Packages, zlib, minisat, cryptominisat }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "stp";
|
||||
version = "2.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "stp";
|
||||
repo = "stp";
|
||||
rev = version;
|
||||
sha256 = "1yg2v4wmswh1sigk47drwsxyayr472mf4i47lqmlcgn9hhbx1q87";
|
||||
};
|
||||
|
||||
buildInputs = [ boost zlib minisat cryptominisat python3 ];
|
||||
nativeBuildInputs = [ cmake bison flex perl ];
|
||||
preConfigure = ''
|
||||
python_install_dir=$out/${python3Packages.python.sitePackages}
|
||||
mkdir -p $python_install_dir
|
||||
cmakeFlagsArray=(
|
||||
$cmakeFlagsArray
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DPYTHON_LIB_INSTALL_DIR=$python_install_dir"
|
||||
)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Simple Theorem Prover";
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
62
pkgs/applications/science/logic/symbiyosys/default.nix
Normal file
62
pkgs/applications/science/logic/symbiyosys/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, bash, python3, yosys
|
||||
, yices, boolector, z3, aiger
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "symbiyosys";
|
||||
version = "2021.11.30";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "YosysHQ";
|
||||
repo = "SymbiYosys";
|
||||
rev = "b409b1179e36d2a3fff66c85b7d4e271769a2d9e";
|
||||
hash = "sha256-S7of2upntiMkSdh4kf1RsrjriS31Eh8iEcVvG36isQg=";
|
||||
};
|
||||
|
||||
buildInputs = [ ];
|
||||
patchPhase = ''
|
||||
patchShebangs .
|
||||
|
||||
# Fix up Yosys imports
|
||||
substituteInPlace sbysrc/sby.py \
|
||||
--replace "##yosys-sys-path##" \
|
||||
"sys.path += [p + \"/share/yosys/python3/\" for p in [\"$out\", \"${yosys}\"]]"
|
||||
|
||||
# Fix various executable references
|
||||
substituteInPlace sbysrc/sby_core.py \
|
||||
--replace '"/usr/bin/env", "bash"' '"${bash}/bin/bash"' \
|
||||
--replace ', "btormc"' ', "${boolector}/bin/btormc"' \
|
||||
--replace ', "aigbmc"' ', "${aiger}/bin/aigbmc"'
|
||||
|
||||
substituteInPlace sbysrc/sby_core.py \
|
||||
--replace '##yosys-program-prefix##' '"${yosys}/bin/"'
|
||||
|
||||
substituteInPlace sbysrc/sby.py \
|
||||
--replace '/usr/bin/env python3' '${python3}/bin/python'
|
||||
'';
|
||||
|
||||
buildPhase = "true";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/yosys/python3
|
||||
|
||||
cp sbysrc/sby_*.py $out/share/yosys/python3/
|
||||
cp sbysrc/sby.py $out/bin/sby
|
||||
|
||||
chmod +x $out/bin/sby
|
||||
'';
|
||||
|
||||
doCheck = false; # not all provers are yet packaged...
|
||||
checkInputs = [ python3 yosys boolector yices z3 aiger ];
|
||||
checkPhase = "make test";
|
||||
|
||||
meta = {
|
||||
description = "Tooling for Yosys-based verification flows";
|
||||
homepage = "https://symbiyosys.readthedocs.io/";
|
||||
license = lib.licenses.isc;
|
||||
maintainers = with lib.maintainers; [ thoughtpolice emily ];
|
||||
mainProgram = "sby";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
26
pkgs/applications/science/logic/symfpu/default.nix
Normal file
26
pkgs/applications/science/logic/symfpu/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "symfpu";
|
||||
version = "unstable-2019-05-17";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "martin-cs";
|
||||
repo = "symfpu";
|
||||
rev = "8fbe139bf0071cbe0758d2f6690a546c69ff0053";
|
||||
sha256 = "1jf5lkn67q136ppfacw3lsry369v7mdr1rhidzjpbz18jfy9zl9q";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/symfpu
|
||||
cp -r * $out/symfpu/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A (concrete or symbolic) implementation of IEEE-754 / SMT-LIB floating-point";
|
||||
homepage = "https://github.com/martin-cs/symfpu";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ shadaj ];
|
||||
};
|
||||
}
|
||||
97
pkgs/applications/science/logic/tamarin-prover/default.nix
Normal file
97
pkgs/applications/science/logic/tamarin-prover/default.nix
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
{ haskellPackages, mkDerivation, fetchFromGitHub, lib
|
||||
# the following are non-haskell dependencies
|
||||
, makeWrapper, which, maude, graphviz
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.6.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tamarin-prover";
|
||||
repo = "tamarin-prover";
|
||||
rev = version;
|
||||
sha256 = "sha256:0cz1v7k4d0im749ag632nc34n91b51b0pq4z05rzw1p59a5lza92";
|
||||
};
|
||||
|
||||
# tamarin has its own dependencies, but they're kept inside the repo,
|
||||
# no submodules. this factors out the common metadata among all derivations
|
||||
common = pname: src: {
|
||||
inherit pname version src;
|
||||
|
||||
license = lib.licenses.gpl3;
|
||||
homepage = "https://tamarin-prover.github.io";
|
||||
description = "Security protocol verification in the symbolic model";
|
||||
maintainers = [ lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
|
||||
# tamarin use symlinks to the LICENSE and Setup.hs files, so for these sublibraries
|
||||
# we set the patchPhase to fix that. otherwise, cabal cries a lot.
|
||||
replaceSymlinks = ''
|
||||
cp --remove-destination ${src}/LICENSE .;
|
||||
cp --remove-destination ${src}/Setup.hs .;
|
||||
'';
|
||||
|
||||
tamarin-prover-utils = mkDerivation (common "tamarin-prover-utils" (src + "/lib/utils") // {
|
||||
postPatch = replaceSymlinks;
|
||||
libraryHaskellDepends = with haskellPackages; [
|
||||
base64-bytestring blaze-builder
|
||||
dlist exceptions fclabels safe SHA syb
|
||||
];
|
||||
});
|
||||
|
||||
tamarin-prover-term = mkDerivation (common "tamarin-prover-term" (src + "/lib/term") // {
|
||||
postPatch = replaceSymlinks;
|
||||
libraryHaskellDepends = (with haskellPackages; [
|
||||
attoparsec HUnit
|
||||
]) ++ [ tamarin-prover-utils ];
|
||||
});
|
||||
|
||||
tamarin-prover-theory = mkDerivation (common "tamarin-prover-theory" (src + "/lib/theory") // {
|
||||
postPatch = replaceSymlinks;
|
||||
doHaddock = false; # broken
|
||||
libraryHaskellDepends = (with haskellPackages; [
|
||||
aeson aeson-pretty parallel uniplate
|
||||
]) ++ [ tamarin-prover-utils tamarin-prover-term ];
|
||||
});
|
||||
|
||||
tamarin-prover-sapic = mkDerivation (common "tamarin-prover-sapic" (src + "/lib/sapic") // {
|
||||
postPatch = "cp --remove-destination ${src}/LICENSE .";
|
||||
doHaddock = false; # broken
|
||||
libraryHaskellDepends = (with haskellPackages; [
|
||||
raw-strings-qq
|
||||
]) ++ [ tamarin-prover-theory ];
|
||||
});
|
||||
|
||||
in
|
||||
mkDerivation (common "tamarin-prover" src // {
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
|
||||
# strip out unneeded deps manually
|
||||
doHaddock = false;
|
||||
enableSharedExecutables = false;
|
||||
postFixup = "rm -rf $out/lib $out/nix-support $out/share/doc";
|
||||
|
||||
# wrap the prover to be sure it can find maude, sapic, etc
|
||||
executableToolDepends = [ makeWrapper which maude graphviz ];
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/tamarin-prover \
|
||||
--prefix PATH : ${lib.makeBinPath [ which maude graphviz ]}
|
||||
# so that the package can be used as a vim plugin to install syntax coloration
|
||||
install -Dt $out/share/vim-plugins/tamarin-prover/syntax/ etc/syntax/spthy.vim
|
||||
install etc/filetype.vim -D $out/share/vim-plugins/tamarin-prover/ftdetect/tamarin.vim
|
||||
# Emacs SPTHY major mode
|
||||
install -Dt $out/share/emacs/site-lisp etc/spthy-mode.el
|
||||
'';
|
||||
|
||||
checkPhase = "./dist/build/tamarin-prover/tamarin-prover test";
|
||||
|
||||
executableHaskellDepends = (with haskellPackages; [
|
||||
binary-instances binary-orphans blaze-html conduit file-embed
|
||||
gitrev http-types lifted-base monad-control
|
||||
resourcet shakespeare threads wai warp yesod-core yesod-static
|
||||
]) ++ [ tamarin-prover-utils
|
||||
tamarin-prover-sapic
|
||||
tamarin-prover-term
|
||||
tamarin-prover-theory
|
||||
];
|
||||
})
|
||||
38
pkgs/applications/science/logic/tlaplus/default.nix
Normal file
38
pkgs/applications/science/logic/tlaplus/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchurl, makeWrapper, adoptopenjdk-bin, jre }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tlaplus";
|
||||
version = "1.7.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/tlaplus/tlaplus/releases/download/v${version}/tla2tools.jar";
|
||||
sha256 = "sha256-+hhUPkTtWXSoW9LGDA3BZiCuEXaA6o5pPSaRmZ7ZCyI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ adoptopenjdk-bin ];
|
||||
|
||||
dontUnpack = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/java $out/bin
|
||||
cp $src $out/share/java/tla2tools.jar
|
||||
|
||||
makeWrapper ${jre}/bin/java $out/bin/tlc \
|
||||
--add-flags "-XX:+UseParallelGC -cp $out/share/java/tla2tools.jar tlc2.TLC"
|
||||
makeWrapper ${jre}/bin/java $out/bin/tlasany \
|
||||
--add-flags "-XX:+UseParallelGC -cp $out/share/java/tla2tools.jar tla2sany.SANY"
|
||||
makeWrapper ${jre}/bin/java $out/bin/pcal \
|
||||
--add-flags "-XX:+UseParallelGC -cp $out/share/java/tla2tools.jar pcal.trans"
|
||||
makeWrapper ${jre}/bin/java $out/bin/tlatex \
|
||||
--add-flags "-XX:+UseParallelGC -cp $out/share/java/tla2tools.jar tla2tex.TLA"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "An algorithm specification language with model checking tools";
|
||||
homepage = "http://lamport.azurewebsites.net/tla/tla.html";
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ florentc thoughtpolice ];
|
||||
};
|
||||
}
|
||||
58
pkgs/applications/science/logic/tlaplus/tlaps.nix
Normal file
58
pkgs/applications/science/logic/tlaplus/tlaps.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ fetchurl
|
||||
, lib
|
||||
, stdenv
|
||||
, ocaml
|
||||
, isabelle
|
||||
, cvc3
|
||||
, perl
|
||||
, wget
|
||||
, which
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tlaps";
|
||||
version = "1.4.5";
|
||||
src = fetchurl {
|
||||
url = "https://tla.msr-inria.inria.fr/tlaps/dist/${version}/tlaps-${version}.tar.gz";
|
||||
sha256 = "c296998acd14d5b93a8d5be7ee178007ef179957465966576bda26944b1b7fca";
|
||||
};
|
||||
|
||||
buildInputs = [ ocaml isabelle cvc3 perl wget which ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -pv "$out"
|
||||
export HOME="$out"
|
||||
export PATH=$out/bin:$PATH
|
||||
|
||||
pushd zenon
|
||||
./configure --prefix $out
|
||||
make
|
||||
make install
|
||||
popd
|
||||
|
||||
pushd isabelle
|
||||
isabelle build -b Pure
|
||||
popd
|
||||
|
||||
pushd tlapm
|
||||
./configure --prefix $out
|
||||
make all
|
||||
make install
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Mechanically check TLA+ proofs";
|
||||
longDescription = ''
|
||||
TLA+ is a general-purpose formal specification language that is
|
||||
particularly useful for describing concurrent and distributed
|
||||
systems. The TLA+ proof language is declarative, hierarchical,
|
||||
and scalable to large system specifications. It provides a
|
||||
consistent abstraction over the various “backend” verifiers.
|
||||
'';
|
||||
homepage = "https://tla.msr-inria.inria.fr/tlaps/content/Home.html";
|
||||
license = lib.licenses.bsd2;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ florentc ];
|
||||
};
|
||||
|
||||
}
|
||||
103
pkgs/applications/science/logic/tlaplus/toolbox.nix
Normal file
103
pkgs/applications/science/logic/tlaplus/toolbox.nix
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
{ lib
|
||||
, fetchzip
|
||||
, makeShellWrapper
|
||||
, makeDesktopItem
|
||||
, stdenv
|
||||
, gtk3
|
||||
, libXtst
|
||||
, glib
|
||||
, zlib
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
let
|
||||
desktopItem = makeDesktopItem rec {
|
||||
name = "TLA+Toolbox";
|
||||
exec = "tla-toolbox";
|
||||
icon = "tla-toolbox";
|
||||
comment = "IDE for TLA+";
|
||||
desktopName = name;
|
||||
genericName = comment;
|
||||
categories = [ "Development" ];
|
||||
startupWMClass = "TLA+ Toolbox";
|
||||
};
|
||||
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tla-toolbox";
|
||||
version = "1.7.1";
|
||||
src = fetchzip {
|
||||
url = "https://tla.msr-inria.inria.fr/tlatoolbox/products/TLAToolbox-${version}-linux.gtk.x86_64.zip";
|
||||
sha256 = "02a2y2mkfab5cczw8g604m61h4xr0apir49zbd1aq6mmgcgngw80";
|
||||
};
|
||||
|
||||
buildInputs = [ gtk3 ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeShellWrapper
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p "$out/bin"
|
||||
cp -r "$src" "$out/toolbox"
|
||||
chmod -R +w "$out/toolbox"
|
||||
|
||||
fixupPhase
|
||||
gappsWrapperArgsHook
|
||||
|
||||
patchelf \
|
||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||
"$out/toolbox/toolbox"
|
||||
|
||||
patchelf \
|
||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||
--set-rpath "${lib.makeLibraryPath [ zlib ]}:$(patchelf --print-rpath $(find "$out/toolbox" -name java))" \
|
||||
"$(find "$out/toolbox" -name java)"
|
||||
|
||||
patchelf \
|
||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||
"$(find "$out/toolbox" -name jspawnhelper)"
|
||||
|
||||
makeShellWrapper $out/toolbox/toolbox $out/bin/tla-toolbox \
|
||||
--chdir "$out/toolbox" \
|
||||
--add-flags "-data ~/.tla-toolbox" \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gtk3 libXtst glib zlib ]}" \
|
||||
"''${gappsWrapperArgs[@]}"
|
||||
|
||||
echo -e "\nCreating TLA Toolbox icons..."
|
||||
pushd "$src"
|
||||
for icon_in in $(find . -path "./plugins/*/icons/full/etool16/tla_launch_check_wiz_*.png")
|
||||
do
|
||||
icon_size=$(echo $icon_in | grep -Po "wiz_\K[0-9]+")
|
||||
icon_out="$out/share/icons/hicolor/$icon_size""x$icon_size/apps/tla-toolbox.png"
|
||||
mkdir -p "$(dirname $icon_out)"
|
||||
cp "$icon_in" "$icon_out"
|
||||
done
|
||||
popd
|
||||
|
||||
echo -e "\nCreating TLA Toolbox desktop entry..."
|
||||
cp -r "${desktopItem}/share/applications"* "$out/share/applications"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://research.microsoft.com/en-us/um/people/lamport/tla/toolbox.html";
|
||||
description = "IDE for the TLA+ tools";
|
||||
longDescription = ''
|
||||
Integrated development environment for the TLA+ tools, based on Eclipse. You can use it
|
||||
to create and edit your specs, run the PlusCal translator, view the pretty-printed
|
||||
versions of your modules, run the TLC model checker, and run TLAPS, the TLA+ proof system.
|
||||
'';
|
||||
# http://lamport.azurewebsites.net/tla/license.html
|
||||
license = with lib.licenses; [ mit ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
49
pkgs/applications/science/logic/tptp/default.nix
Normal file
49
pkgs/applications/science/logic/tptp/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ lib, stdenv, fetchurl, yap, tcsh, perl, patchelf }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "TPTP";
|
||||
version = "7.2.0";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"http://tptp.cs.miami.edu/TPTP/Distribution/TPTP-v${version}.tgz"
|
||||
"http://tptp.cs.miami.edu/TPTP/Archive/TPTP-v${version}.tgz"
|
||||
];
|
||||
sha256 = "0yq8452b6mym4yscy46pshg0z2my8xi74b5bp2qlxd5bjwcrg6rl";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ patchelf ];
|
||||
buildInputs = [ tcsh yap perl ];
|
||||
|
||||
installPhase = ''
|
||||
sharedir=$out/share/tptp
|
||||
|
||||
mkdir -p $sharedir
|
||||
cp -r ./ $sharedir
|
||||
|
||||
export TPTP=$sharedir
|
||||
|
||||
tcsh $sharedir/Scripts/tptp2T_install -default
|
||||
|
||||
substituteInPlace $sharedir/TPTP2X/tptp2X_install --replace /bin/mv mv
|
||||
tcsh $sharedir/TPTP2X/tptp2X_install -default
|
||||
|
||||
patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $sharedir/Scripts/tptp4X
|
||||
|
||||
mkdir -p $out/bin
|
||||
ln -s $sharedir/TPTP2X/tptp2X $out/bin
|
||||
ln -s $sharedir/Scripts/tptp2T $out/bin
|
||||
ln -s $sharedir/Scripts/tptp4X $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Thousands of problems for theorem provers and tools";
|
||||
maintainers = with maintainers; [ raskin gebner ];
|
||||
# 6.3 GiB of data. Installation is unpacking and editing a few files.
|
||||
# No sense in letting Hydra build it.
|
||||
# Also, it is unclear what is covered by "verbatim" - we will edit configs
|
||||
hydraPlatforms = [];
|
||||
platforms = platforms.all;
|
||||
license = licenses.unfreeRedistributable;
|
||||
};
|
||||
}
|
||||
51
pkgs/applications/science/logic/twelf/default.nix
Normal file
51
pkgs/applications/science/logic/twelf/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, smlnj, rsync }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "twelf";
|
||||
version = "1.7.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://twelf.plparty.org/releases/twelf-src-${version}.tar.gz";
|
||||
sha256 = "0fi1kbs9hrdrm1x4k13angpjasxlyd1gc3ys8ah54i75qbcd9c4i";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ smlnj rsync ];
|
||||
|
||||
buildPhase = ''
|
||||
export SMLNJ_HOME=${smlnj}
|
||||
make smlnj
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
rsync -av bin/{*,.heap} $out/bin/
|
||||
bin/.mkexec ${smlnj}/bin/sml $out/ twelf-server twelf-server
|
||||
|
||||
substituteInPlace emacs/twelf-init.el \
|
||||
--replace '(concat twelf-root "emacs")' '(concat twelf-root "share/emacs/site-lisp/twelf")'
|
||||
|
||||
mkdir -p $out/share/emacs/site-lisp/twelf/
|
||||
rsync -av emacs/ $out/share/emacs/site-lisp/twelf/
|
||||
|
||||
mkdir -p $out/share/twelf/examples
|
||||
rsync -av examples/ $out/share/twelf/examples/
|
||||
mkdir -p $out/share/twelf/vim
|
||||
rsync -av vim/ $out/share/twelf/vim/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Logic proof assistant";
|
||||
longDescription = ''
|
||||
Twelf is a language used to specify, implement, and prove properties of
|
||||
deductive systems such as programming languages and logics. Large
|
||||
research projects using Twelf include the TALT typed assembly language,
|
||||
a foundational proof-carrying-code system, and a type safety proof for
|
||||
Standard ML.
|
||||
'';
|
||||
homepage = "http://twelf.org/wiki/Main_Page";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ jwiegley ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue