2017-10-02 10:19:41 +00:00
|
|
|
{ stdenv, fetchFromGitHub, z3, ocamlPackages, makeWrapper }:
|
2016-01-19 00:44:21 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "fstar-${version}";
|
2017-10-02 10:19:41 +00:00
|
|
|
version = "0.9.5.0";
|
2016-01-19 00:44:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FStarLang";
|
|
|
|
repo = "FStar";
|
2016-03-13 08:32:28 +00:00
|
|
|
rev = "v${version}";
|
2017-10-02 10:19:41 +00:00
|
|
|
sha256 = "1pi2ny3kpmvm85x8w98anhjf0hp0wccc51m7v697qypn5cl4ydqk";
|
2016-01-19 00:44:21 +00:00
|
|
|
};
|
|
|
|
|
2016-03-13 08:32:28 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2016-01-19 00:44:21 +00:00
|
|
|
buildInputs = with ocamlPackages; [
|
2017-10-02 10:19:41 +00:00
|
|
|
z3 ocaml findlib ocaml_batteries menhir stdint
|
|
|
|
zarith camlp4 yojson pprint
|
2016-01-19 00:44:21 +00:00
|
|
|
];
|
|
|
|
|
2017-10-02 10:19:41 +00:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2016-01-19 00:44:21 +00:00
|
|
|
|
2017-10-02 10:19:41 +00:00
|
|
|
preBuild = ''
|
2017-05-10 08:33:16 +00:00
|
|
|
patchShebangs src/tools
|
|
|
|
patchShebangs bin
|
2016-01-19 00:44:21 +00:00
|
|
|
'';
|
2017-10-02 10:19:41 +00:00
|
|
|
buildFlags = "-C src/ocaml-output";
|
2016-01-19 00:44:21 +00:00
|
|
|
|
|
|
|
installFlags = "-C src/ocaml-output";
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/fstar.exe --prefix PATH ":" "${z3}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "ML-like functional programming language aimed at program verification";
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = https://www.fstar-lang.org;
|
2016-01-19 00:44:21 +00:00
|
|
|
license = licenses.asl20;
|
2016-06-30 15:57:32 +00:00
|
|
|
platforms = with platforms; darwin ++ linux;
|
2017-10-02 10:19:41 +00:00
|
|
|
maintainers = with maintainers; [ gebner ];
|
2016-01-19 00:44:21 +00:00
|
|
|
};
|
|
|
|
}
|