-
Notifications
You must be signed in to change notification settings - Fork 20
/
flake.nix
54 lines (46 loc) · 1.54 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
description = "Libjade";
inputs = {
nixpkgs.url = "nixpkgs/release-24.05";
easycrypt.url = "github:EasyCrypt/easycrypt/a9e31ff5f758ef62453d76de382a10ee718afc51";
jasmin = {
url = "github:jasmin-lang/jasmin/e4640e7dcdb01d1ba63617a5d78456e1209d699c";
flake = false;
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
};
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
'';
};
};
};
}