nixpkgs: init sapic 0.9

Signed-off-by: Austin Seipp <aseipp@pobox.com>

+68
+28
pkgs/applications/science/logic/sapic/default.nix
··· 1 + { stdenv, fetchurl, unzip, ocaml }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "sapic-${version}"; 5 + version = "0.9"; 6 + 7 + src = fetchurl { 8 + url = "http://sapic.gforge.inria.fr/${name}.zip"; 9 + sha256 = "1ckl090lpyfh90mkjhnpcys5grs3nrl9wlbn9nfkxxnaivn2yx9y"; 10 + }; 11 + 12 + nativeBuildInputs = [ unzip ]; 13 + buildInputs = [ ocaml ]; 14 + patches = [ ./native.patch ]; # create a native binary, not a bytecode one 15 + 16 + buildPhase = "make depend && make"; 17 + installPhase = '' 18 + mkdir -p $out/bin 19 + cp ./sapic $out/bin 20 + ''; 21 + 22 + meta = { 23 + description = "Stateful applied Pi Calculus for protocol verification"; 24 + homepage = http://sapic.gforge.inria.fr/; 25 + platforms = stdenv.lib.platforms.unix; 26 + maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; 27 + }; 28 + }
+38
pkgs/applications/science/logic/sapic/native.patch
··· 1 + diff --git a/Makefile b/Makefile 2 + index a1de94d..f9e2eb8 100644 3 + --- a/Makefile 4 + +++ b/Makefile 5 + @@ -1,8 +1,8 @@ 6 + TARGET = sapic 7 + -OBJS=lexer.cmo apip.cmo firsttranslation.cmo main.cmo #secondtranslation.cmo thirdtranslation.cmo main.cmo 8 + +OBJS=lexer.cmx apip.cmx firsttranslation.cmx main.cmx 9 + 10 + sapic: $(OBJS) 11 + - ocamlc -o $@ $(OBJS) 12 + + ocamlopt.opt -o $@ $(OBJS) 13 + 14 + depend: 15 + ocamldep *.ml *.mli > .depend 16 + @@ -13,17 +13,17 @@ clean: 17 + rm -rf *.cmi *.cmo $(TARGET) 18 + rm -rf apip.ml apip.mli lexer.ml lexer.mli 19 + 20 + -.SUFFIXES: .ml .mli .mll .mly .cmo .cmi 21 + +.SUFFIXES: .ml .mli .mll .mly .cmo .cmi .cmx 22 + 23 + -.ml.cmo: 24 + - ocamlc -c $< 25 + +.ml.cmx: 26 + + ocamlopt.opt -c $< 27 + .mli.cmi: 28 + - ocamlc -c $< 29 + + ocamlopt.opt -c $< 30 + .mll.ml: 31 + ocamllex $< 32 + .mly.ml: 33 + ocamlyacc $< 34 + .ml.mli: 35 + - ocamlc -i $< > $@ 36 + + ocamlopt.opt -i $< > $@ 37 + 38 + -include .depend
+2
pkgs/top-level/all-packages.nix
··· 19026 19026 19027 19027 proverif = callPackage ../applications/science/logic/proverif { }; 19028 19028 19029 + sapic = callPackage ../applications/science/logic/sapic { }; 19030 + 19029 19031 satallax = callPackage ../applications/science/logic/satallax { 19030 19032 ocaml = ocamlPackages_4_01_0.ocaml; 19031 19033 };