blob: 7abdf132b51e36f0025b23b60b659b9e625b5af3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
{ lib, stdenv, fetchFromGitHub, z3, ocamlPackages, makeWrapper, installShellFiles }:
stdenv.mkDerivation rec {
pname = "fstar";
version = "0.9.6.0";
src = fetchFromGitHub {
owner = "FStarLang";
repo = "FStar";
rev = "v${version}";
sha256 = "0wix7l229afkn6c6sk4nwkfq0nznsiqdkds4ixi2yyf72immwmmb";
};
nativeBuildInputs = [ makeWrapper installShellFiles ];
buildInputs = with ocamlPackages; [
z3 ocaml findlib batteries menhir menhirLib stdint
zarith camlp4 yojson pprint
ulex ocaml-migrate-parsetree process ppx_deriving ppx_deriving_yojson ocamlbuild
];
makeFlags = [ "PREFIX=$(out)" ];
preBuild = ''
patchShebangs src/tools
patchShebangs bin
'';
buildFlags = [ "-C" "src/ocaml-output" ];
preInstall = ''
mkdir -p $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/fstarlib
'';
installFlags = [ "-C" "src/ocaml-output" ];
postInstall = ''
wrapProgram $out/bin/fstar.exe --prefix PATH ":" "${z3}/bin"
installShellCompletion --bash .completion/bash/fstar.exe.bash
installShellCompletion --fish .completion/fish/fstar.exe.fish
installShellCompletion --zsh --name _fstar.exe .completion/zsh/__fstar.exe
'';
meta = with lib; {
description = "ML-like functional programming language aimed at program verification";
homepage = "https://www.fstar-lang.org";
license = licenses.asl20;
platforms = with platforms; darwin ++ linux;
maintainers = with maintainers; [ gebner ];
};
}
|