Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the Jasmin compiler #128

Merged
merged 8 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 33 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 43 additions & 33 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,53 @@
description = "Libjade";

inputs = {
nixpkgs.url = "nixpkgs/release-23.11";
easycrypt.url = "github:EasyCrypt/easycrypt/4201fddc14b81d2a69a33f034c9c7db4dfd58d0e";
nixpkgs.url = "nixpkgs/release-24.05";

easycrypt.url = "github:EasyCrypt/easycrypt/a9e31ff5f758ef62453d76de382a10ee718afc51";
jasmin = {
url = "github:jasmin-lang/jasmin/e84c0c59b4f4e005f2be4de5fdfbcaf1e3e2f975";
url = "github:jasmin-lang/jasmin/e4640e7dcdb01d1ba63617a5d78456e1209d699c";
flake = false;
};

flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, easycrypt, jasmin, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
jasminc = pkgs.callPackage "${jasmin}/default.nix" { inherit pkgs; };
ec = easycrypt.packages.${system}.default;
in
{
packages.${system}.default = pkgs.callPackage ./default.nix { inherit pkgs jasminc; };

devShells.${system}.default = pkgs.mkShell {
name = "libjade";
src = self.packages.${system}.default.src;

packages = self.packages.${system}.default.nativeBuildInputs ++
[
ec
pkgs.valgrind
pkgs.cvc4
pkgs.cvc5
pkgs.z3
];

EASYCRYPT = "${ec}/bin/easycrypt";
ECARGS = "-I Jasmin:${jasmin}/eclib";

shellHook = ''
easycrypt why3config
'';
};
outputs = inputs@{ self, flake-parts, easycrypt, jasmin, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ ];
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { pkgs, system, self', ... }:
let
ec = easycrypt.packages.${system}.default;
jasminc = pkgs.callPackage "${jasmin}/default.nix" { inherit pkgs; };
in
{
packages.default = pkgs.callPackage ./default.nix { inherit pkgs jasminc; };

devShells.default = pkgs.mkShell {
name = "libjade";
src = self'.packages.default.src;

packages = self.packages.${system}.default.nativeBuildInputs ++ [
ec
pkgs.cvc4
pkgs.cvc5
pkgs.z3
pkgs.why3
(pkgs.lib.optional pkgs.stdenv.isLinux pkgs.valgrind)
pkgs.emacs
pkgs.emacsPackages.proof-general
];

ECARGS = "-I Jasmin:${jasmin}/eclib";

shellHook = ''
easycrypt why3config
'';
};
};
};
}
2 changes: 1 addition & 1 deletion scripts/ci/config/jasmin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7be631a8da1dc3f7c966681028138ae56d8e4610
e4640e7dcdb01d1ba63617a5d78456e1209d699c
Loading