2022-04-20 09:45:15 +00:00
|
|
|
{ stdenv, lib, fetchurl, ocamlPackages, mpfr, ppl }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jasmin-compiler";
|
2023-06-09 08:45:23 +00:00
|
|
|
version = "2023.06.0";
|
2022-04-20 09:45:15 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/jasmin-lang/jasmin/releases/download/v${version}/jasmin-compiler-v${version}.tar.bz2";
|
2023-06-09 08:45:23 +00:00
|
|
|
hash = "sha256-yQBQGDNZQhNATs62nqWsgl/HzQCH24EHPp87B3I0Dxo=";
|
2022-04-20 09:45:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "jasmin-compiler-v${version}/compiler";
|
|
|
|
|
2023-06-09 08:45:23 +00:00
|
|
|
nativeBuildInputs = with ocamlPackages; [ ocaml findlib dune_3 menhir camlidl cmdliner ];
|
2022-04-20 09:45:15 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
mpfr
|
|
|
|
ppl
|
|
|
|
] ++ (with ocamlPackages; [
|
|
|
|
apron
|
|
|
|
batteries
|
|
|
|
menhirLib
|
|
|
|
yojson
|
|
|
|
zarith
|
|
|
|
]);
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
2023-06-09 08:45:23 +00:00
|
|
|
for p in jasminc jazz2tex
|
|
|
|
do
|
|
|
|
cp _build/default/entry/$p.exe $out/bin/$p
|
|
|
|
done
|
|
|
|
mkdir -p $out/lib/jasmin/easycrypt
|
|
|
|
cp ../eclib/*.ec $out/lib/jasmin/easycrypt
|
2022-04-20 09:45:15 +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-05 00:46:39 +00:00
|
|
|
mainProgram = "jasminc";
|
|
|
|
platforms = lib.platforms.all;
|
2022-04-20 09:45:15 +00:00
|
|
|
};
|
|
|
|
}
|