Skip to content

Commit

Permalink
Fix Nix build: krml -version was empty
Browse files Browse the repository at this point in the history
git rev-parse HEAD does not work
within Nix build environment
  • Loading branch information
Antonin Reitz committed Oct 22, 2023
1 parent 32dff93 commit 829fb27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .nix/karamel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ stdenv.mkDerivation {
]);

FSTAR_HOME = fstar;
GIT_REV = version;

configurePhase = "export KRML_HOME=$(pwd)";

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ lib/AutoConfig.ml:

.PHONY: src/Version.ml
lib/Version.ml:
@echo "let version = \"$(shell git rev-parse HEAD)\"" > $@ \
@echo "let version = \"$(shell git rev-parse HEAD || echo ${GIT_REV})\"" > $@

clean:
rm -rf krml
Expand Down

0 comments on commit 829fb27

Please sign in to comment.