-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2815 from FStarLang/_taramana_dune
Build F* with `dune` instead of `ocamlbuild`
- Loading branch information
Showing
402 changed files
with
94,578 additions
and
1,371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ fstar, fstar-dune, fstar-ocaml-snapshot, fstar-ulib, stdenv }: | ||
|
||
let | ||
ocaml-src = stdenv.mkDerivation { | ||
name = "src"; | ||
src = fstar-ocaml-snapshot; | ||
dontBuild = true; | ||
installPhase = '' | ||
mkdir -p $out/ocaml | ||
mv ./* $out/ocaml | ||
cp ${../version.txt} $out/version.txt | ||
''; | ||
}; | ||
fstar-dune-bootstrap = fstar-dune.overrideAttrs (_: { | ||
pname = "fstar-bootstrap-dune"; | ||
src = ocaml-src; | ||
}); | ||
fstar-ulib-bootstrap = (fstar-ulib.override | ||
(_: { fstar-dune = fstar-dune-bootstrap; })).overrideAttrs | ||
(_: { pname = "fstar-bootstrap-ulib"; }); | ||
|
||
in (fstar.override (_: { | ||
fstar-dune = fstar-dune-bootstrap; | ||
fstar-ulib = fstar-ulib-bootstrap; | ||
})).overrideAttrs (_: { pname = "fstar-bootstrap"; }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ callPackage, fstar-dune, fstar-ulib, installShellFiles, lib, makeWrapper | ||
, stdenv, version, z3 }: | ||
|
||
stdenv.mkDerivation { | ||
pname = "fstar"; | ||
inherit version; | ||
|
||
buildInputs = [ installShellFiles makeWrapper ]; | ||
|
||
src = lib.sourceByRegex ./.. [ | ||
".common.mk" | ||
"doc.*" | ||
"examples.*" | ||
"src(/ocaml-output(/Makefile)?)?" | ||
"ucontrib.*" | ||
]; | ||
|
||
dontBuild = true; | ||
|
||
installPhase = '' | ||
mkdir $out | ||
CP="cp -r --no-preserve=mode" | ||
$CP ${fstar-dune}/* $out | ||
$CP ${fstar-ulib}/* $out | ||
PREFIX=$out make -C src/ocaml-output install-sides | ||
for binary in $out/bin/* | ||
do | ||
chmod +x $binary | ||
wrapProgram $binary --prefix PATH ":" ${z3}/bin | ||
done | ||
cd $out | ||
installShellCompletion --bash ${../.completion/bash/fstar.exe.bash} | ||
installShellCompletion --fish ${../.completion/fish/fstar.exe.fish} | ||
installShellCompletion --zsh --name _fstar.exe ${ | ||
../.completion/zsh/__fstar.exe | ||
} | ||
''; | ||
} |
Oops, something went wrong.