forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fstar: build with dune (NixOS#275924)
- Loading branch information
1 parent
f78d313
commit 0c0f4c3
Showing
3 changed files
with
120 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ batteries | ||
, buildDunePackage | ||
, memtrace | ||
, menhir | ||
, menhirLib | ||
, pprint | ||
, ppx_deriving | ||
, ppx_deriving_yojson | ||
, ppxlib | ||
, process | ||
, sedlex | ||
, src | ||
, stdint | ||
, version | ||
, yojson | ||
, zarith | ||
}: | ||
|
||
buildDunePackage { | ||
pname = "fstar"; | ||
inherit version src; | ||
|
||
postPatch = '' | ||
patchShebangs ocaml/fstar-lib/make_fstar_version.sh | ||
cd ocaml | ||
''; | ||
|
||
nativeBuildInputs = [ | ||
menhir | ||
]; | ||
|
||
buildInputs = [ | ||
memtrace | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
batteries | ||
menhirLib | ||
pprint | ||
ppx_deriving | ||
ppx_deriving_yojson | ||
ppxlib | ||
process | ||
sedlex | ||
stdint | ||
yojson | ||
zarith | ||
]; | ||
|
||
enableParallelBuilding = true; | ||
} |
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,26 @@ | ||
{ fstar-dune | ||
, src | ||
, stdenv | ||
, version | ||
, z3 | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
pname = "fstar-ulib"; | ||
inherit version src; | ||
|
||
nativeBuildInputs = [ | ||
z3 | ||
]; | ||
|
||
postPatch = '' | ||
mkdir -p bin | ||
cp ${fstar-dune}/bin/fstar.exe bin | ||
patchShebangs ulib/install-ulib.sh | ||
cd ulib | ||
''; | ||
|
||
makeFlags = [ "PREFIX=$(out)" ]; | ||
|
||
enableParallelBuilding = true; | ||
} |