nixpkgs: init sapic 0.9
Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
parent
a31bdc0739
commit
3813ab2589
28
pkgs/applications/science/logic/sapic/default.nix
Normal file
28
pkgs/applications/science/logic/sapic/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
38
pkgs/applications/science/logic/sapic/native.patch
Normal file
38
pkgs/applications/science/logic/sapic/native.patch
Normal 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
|
@ -19026,6 +19026,8 @@ with pkgs;
|
|||||||
|
|
||||||
proverif = callPackage ../applications/science/logic/proverif { };
|
proverif = callPackage ../applications/science/logic/proverif { };
|
||||||
|
|
||||||
|
sapic = callPackage ../applications/science/logic/sapic { };
|
||||||
|
|
||||||
satallax = callPackage ../applications/science/logic/satallax {
|
satallax = callPackage ../applications/science/logic/satallax {
|
||||||
ocaml = ocamlPackages_4_01_0.ocaml;
|
ocaml = ocamlPackages_4_01_0.ocaml;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user