Currently, when F and KaRaMeL are built using Nix and FSTAR_HOME properly set to the result of the F derivation:
krml -version provides us with an empty string;
the header of extracted files contains the following line: F* version: <unknown>;
the header of extracted files contains the following line: KaRaMeL version: <unknown>.
About 1. and 2.: the Nix build environment source of KaRaMeL is just the content of the specified revision of the git repository, not the git repository itself. Thus, make lib/Version.ml does not work properly, as git rev-parse HEAD fails. Fixed by adding the GIT_REV environment variable during a Nix build, and using it if git rev-parse HEAD fails.
About 3.: in lib/Driver.ml, if $FSTAR_HOME does not point to a git repository (e.g. when F is also built using Nix), fstar_rev is not set. This could be fixed by retrieving the F version using something like fstar.exe --version | grep commit | cut -d "=" -f 2 instead. What do you think about this? I can add a corresponding commit.
HACL does not have this issue, as the header is replaced by the HACL license and the versions of the different used binaries are added to dist/ manually into INFO.txt file , see .nix/hacl.nix file within HACL* repository.
Currently, when F and KaRaMeL are built using Nix and
FSTAR_HOME
properly set to the result of the F derivation:krml -version
provides us with an empty string;F* version: <unknown>
;KaRaMeL version: <unknown>
.About 1. and 2.: the Nix build environment source of KaRaMeL is just the content of the specified revision of the git repository, not the git repository itself. Thus,
make lib/Version.ml
does not work properly, asgit rev-parse HEAD
fails. Fixed by adding theGIT_REV
environment variable during a Nix build, and using it ifgit rev-parse HEAD
fails.About 3.: in
lib/Driver.ml
, if$FSTAR_HOME
does not point to a git repository (e.g. when F is also built using Nix),fstar_rev
is not set. This could be fixed by retrieving the F version using something likefstar.exe --version | grep commit | cut -d "=" -f 2
instead. What do you think about this? I can add a corresponding commit.HACL does not have this issue, as the header is replaced by the HACL license and the versions of the different used binaries are added to
dist/
manually intoINFO.txt
file , see.nix/hacl.nix
file within HACL* repository.