2017-10-02 13:19:41 +03:00
|
|
|
{ stdenv, fetchFromGitHub, z3, ocamlPackages, makeWrapper }:
|
2016-01-19 03:44:21 +03:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "fstar-${version}";
|
2018-05-25 11:27:02 +03:00
|
|
|
version = "0.9.6.0";
|
2016-01-19 03:44:21 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FStarLang";
|
|
|
|
repo = "FStar";
|
2016-03-13 11:32:28 +03:00
|
|
|
rev = "v${version}";
|
2018-05-25 11:27:02 +03:00
|
|
|
sha256 = "0wix7l229afkn6c6sk4nwkfq0nznsiqdkds4ixi2yyf72immwmmb";
|
2016-01-19 03:44:21 +03:00
|
|
|
};
|
|
|
|
|
2016-03-13 11:32:28 +03:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2016-01-19 03:44:21 +03:00
|
|
|
buildInputs = with ocamlPackages; [
|
2017-11-14 20:43:21 +03:00
|
|
|
z3 ocaml findlib batteries menhir stdint
|
2017-10-02 13:19:41 +03:00
|
|
|
zarith camlp4 yojson pprint
|
2018-05-25 11:27:02 +03:00
|
|
|
ulex ocaml-migrate-parsetree process ppx_deriving ppx_deriving_yojson ocamlbuild
|
2016-01-19 03:44:21 +03:00
|
|
|
];
|
|
|
|
|
2017-10-02 13:19:41 +03:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2016-01-19 03:44:21 +03:00
|
|
|
|
2017-10-02 13:19:41 +03:00
|
|
|
preBuild = ''
|
2017-05-10 11:33:16 +03:00
|
|
|
patchShebangs src/tools
|
|
|
|
patchShebangs bin
|
2016-01-19 03:44:21 +03:00
|
|
|
'';
|
2017-10-02 13:19:41 +03:00
|
|
|
buildFlags = "-C src/ocaml-output";
|
2016-01-19 03:44:21 +03:00
|
|
|
|
2018-05-25 11:27:02 +03:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/fstarlib
|
|
|
|
'';
|
2016-01-19 03:44:21 +03: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 23:03:30 +03:00
|
|
|
homepage = https://www.fstar-lang.org;
|
2016-01-19 03:44:21 +03:00
|
|
|
license = licenses.asl20;
|
2016-06-30 18:57:32 +03:00
|
|
|
platforms = with platforms; darwin ++ linux;
|
2017-10-02 13:19:41 +03:00
|
|
|
maintainers = with maintainers; [ gebner ];
|
2016-01-19 03:44:21 +03:00
|
|
|
};
|
|
|
|
}
|