forked from formosa-crypto/formosa-mlkem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
47 lines (43 loc) · 1.14 KB
/
shell.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
{ pkgs ?
import (fetchTarball {
url = https://github.com/NixOS/nixpkgs/archive/51063ed4f2343a59fdeebb279bb81d87d453942b.tar.gz;
sha256 = "sha256:0my8bdc7js7gdcl8z8ik49sl9gccqz39xg8q335sharf5qxq13ww";
}) {}
, full ? true
}:
with pkgs;
let
oc = ocaml-ng.ocamlPackages_4_14;
why = why3.override {
ocamlPackages = oc;
ideSupport = false;
coqPackages = { coq = null; flocq = null; };
};
ecVersion = "a8274feb63b62d281db350cd6dd8940c69aca835";
ec = (easycrypt.overrideAttrs (_: {
src = fetchFromGitHub {
owner = "EasyCrypt";
repo = "easycrypt";
rev = ecVersion;
hash = "sha256-Rbs3alnnnDPbKrAqPq1pj/kedHWC+PvPFES4d+V8EAk=";
};
postPatch = ''
substituteInPlace dune-project --replace '(name easycrypt)' '(name easycrypt)(version ${ecVersion})'
'';
})).override {
ocamlPackages = oc;
why3 = why;
};
altergo = alt-ergo.override { ocamlPackages = oc; } ;
in
mkShell ({
JASMINC = "${jasmin-compiler.bin}/bin/jasminc";
} // lib.optionalAttrs full {
packages = [
ec
altergo
cvc4
z3
];
EC_RDIRS = "Jasmin:${jasmin-compiler.lib}/lib/jasmin/easycrypt";
})