3
0
Fork 0
forked from mirrors/nixpkgs

nixpkgs: init sapic 0.9

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2017-12-30 18:59:39 -06:00
parent a31bdc0739
commit 3813ab2589
3 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,28 @@
{ stdenv, fetchurl, unzip, ocaml }:
stdenv.mkDerivation rec {
name = "sapic-${version}";
version = "0.9";
src = fetchurl {
url = "http://sapic.gforge.inria.fr/${name}.zip";
sha256 = "1ckl090lpyfh90mkjhnpcys5grs3nrl9wlbn9nfkxxnaivn2yx9y";
};
nativeBuildInputs = [ unzip ];
buildInputs = [ ocaml ];
patches = [ ./native.patch ]; # create a native binary, not a bytecode one
buildPhase = "make depend && make";
installPhase = ''
mkdir -p $out/bin
cp ./sapic $out/bin
'';
meta = {
description = "Stateful applied Pi Calculus for protocol verification";
homepage = http://sapic.gforge.inria.fr/;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
};
}

View file

@ -0,0 +1,38 @@
diff --git a/Makefile b/Makefile
index a1de94d..f9e2eb8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
TARGET = sapic
-OBJS=lexer.cmo apip.cmo firsttranslation.cmo main.cmo #secondtranslation.cmo thirdtranslation.cmo main.cmo
+OBJS=lexer.cmx apip.cmx firsttranslation.cmx main.cmx
sapic: $(OBJS)
- ocamlc -o $@ $(OBJS)
+ ocamlopt.opt -o $@ $(OBJS)
depend:
ocamldep *.ml *.mli > .depend
@@ -13,17 +13,17 @@ clean:
rm -rf *.cmi *.cmo $(TARGET)
rm -rf apip.ml apip.mli lexer.ml lexer.mli
-.SUFFIXES: .ml .mli .mll .mly .cmo .cmi
+.SUFFIXES: .ml .mli .mll .mly .cmo .cmi .cmx
-.ml.cmo:
- ocamlc -c $<
+.ml.cmx:
+ ocamlopt.opt -c $<
.mli.cmi:
- ocamlc -c $<
+ ocamlopt.opt -c $<
.mll.ml:
ocamllex $<
.mly.ml:
ocamlyacc $<
.ml.mli:
- ocamlc -i $< > $@
+ ocamlopt.opt -i $< > $@
-include .depend

View file

@ -19026,6 +19026,8 @@ with pkgs;
proverif = callPackage ../applications/science/logic/proverif { };
sapic = callPackage ../applications/science/logic/sapic { };
satallax = callPackage ../applications/science/logic/satallax {
ocaml = ocamlPackages_4_01_0.ocaml;
};