2022-04-27 09:35:20 +00:00
|
|
|
{ stdenv, lib, fetchurl, ocamlPackages, mpfr, ppl }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jasmin-compiler";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2023.06.2";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/jasmin-lang/jasmin/releases/download/v${version}/jasmin-compiler-v${version}.tar.bz2";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-I3+MP2Q7ENOdQdvvCqcyD+I8ImF6c+9HQDpY6QUWuY8=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "jasmin-compiler-v${version}/compiler";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = with ocamlPackages; [ ocaml findlib dune_3 menhir camlidl cmdliner ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
mpfr
|
|
|
|
ppl
|
|
|
|
] ++ (with ocamlPackages; [
|
|
|
|
apron
|
2023-07-15 17:15:38 +00:00
|
|
|
yojson
|
|
|
|
]);
|
|
|
|
|
|
|
|
propagatedBuildInputs = with ocamlPackages; [
|
2022-04-27 09:35:20 +00:00
|
|
|
batteries
|
|
|
|
menhirLib
|
|
|
|
zarith
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
outputs = [ "bin" "lib" "out" ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2023-07-15 17:15:38 +00:00
|
|
|
dune build @install
|
|
|
|
dune install --prefix=$bin --libdir=$out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib
|
|
|
|
mkdir -p $lib/lib/jasmin/easycrypt
|
|
|
|
cp ../eclib/*.ec $lib/lib/jasmin/easycrypt
|
2022-04-27 09:35:20 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A workbench for high-assurance and high-speed cryptography";
|
|
|
|
homepage = "https://github.com/jasmin-lang/jasmin/";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "jasminc";
|
|
|
|
platforms = lib.platforms.all;
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
}
|