summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorSon Ho2022-11-16 14:10:44 +0100
committerSon HO2022-11-16 15:45:32 +0100
commitcc8cd4b9d55e21dd50fac7714203ab8a8f06242b (patch)
treed0d6b63c8d3dcc51b6d533987415e1d4bd563723 /flake.nix
parent8bf0452f91c44ff390556db77bf42697c0443b67 (diff)
Add the aeneas-verify-fstar derivation
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix32
1 files changed, 21 insertions, 11 deletions
diff --git a/flake.nix b/flake.nix
index e3c5129f..1b3e4b31 100644
--- a/flake.nix
+++ b/flake.nix
@@ -5,9 +5,10 @@
charon.url = "github:aeneasverif/charon";
flake-utils.follows = "charon/flake-utils";
nixpkgs.follows = "charon/nixpkgs";
+ hacl-nix.url = "github:hacl-star/hacl-nix";
};
- outputs = { self, charon, flake-utils, nixpkgs }:
+ outputs = { self, charon, flake-utils, nixpkgs, hacl-nix }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs { inherit system; };
@@ -40,6 +41,7 @@
echo charon.packages.${system}.tests
'';
};
+ # Run the translation on various files.
# Make sure we don't need to recompile the package whenever we make
# unnecessary changes - we list the exact files and folders the package
# depends upon.
@@ -54,28 +56,36 @@
|| pkgs.lib.hasPrefix (toString ./tests) path;
};
buildPhase = ''
- # We need to provide the paths to the Charon tests derivations
- export CHARON_TESTS_REGULAR_DIR=${charon.checks.${system}.tests}
- export CHARON_TESTS_POLONIUS_DIR=${charon.checks.${system}.tests-polonius}
+ # We need to provide the paths to the Charon tests derivations
+ export CHARON_TESTS_REGULAR_DIR=${charon.checks.${system}.tests}
+ export CHARON_TESTS_POLONIUS_DIR=${charon.checks.${system}.tests-polonius}
- # Copy the Aeneas executable, and update the path to it
- cp ${aeneas}/bin/aeneas_driver aeneas.exe
- export AENEAS_EXE=./aeneas.exe
+ # Copy the Aeneas executable, and update the path to it
+ cp ${aeneas}/bin/aeneas_driver aeneas.exe
+ export AENEAS_EXE=./aeneas.exe
- # Run the tests
- make tests
+ # Run the tests
+ make tests
'';
# Tests don't generate anything new as the generated files are
# versionned, but the installation phase still needs to prodocue
# something, otherwise Nix will consider the build has failed.
installPhase = "touch $out";
};
+ # Replay the F* proofs.
+ aeneas-verify-fstar = pkgs.stdenv.mkDerivation {
+ name = "aeneas_tests";
+ src = ./tests/fstar;
+ FSTAR_EXE = "${hacl-nix.packages.${system}.fstar}/bin/fstar.exe";
+ # Tests don't generate anything
+ installPhase = "touch $out";
+ };
in {
packages = {
inherit aeneas;
default = aeneas;
};
- checks = { inherit aeneas aeneas-tests; };
- hydraJobs = { inherit aeneas aeneas-tests; };
+ checks = { inherit aeneas aeneas-tests aeneas-verify-fstar; };
+ hydraJobs = { inherit aeneas aeneas-tests aeneas-verify-fstar; };
});
}