504525a148
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
49 lines
1.3 KiB
Nix
49 lines
1.3 KiB
Nix
{ stdenv, lib, fetchurl, ocamlPackages, mpfr, ppl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "jasmin-compiler";
|
|
version = "2023.06.2";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/jasmin-lang/jasmin/releases/download/v${version}/jasmin-compiler-v${version}.tar.bz2";
|
|
hash = "sha256-I3+MP2Q7ENOdQdvvCqcyD+I8ImF6c+9HQDpY6QUWuY8=";
|
|
};
|
|
|
|
sourceRoot = "jasmin-compiler-v${version}/compiler";
|
|
|
|
nativeBuildInputs = with ocamlPackages; [ ocaml findlib dune_3 menhir camlidl cmdliner ];
|
|
|
|
buildInputs = [
|
|
mpfr
|
|
ppl
|
|
] ++ (with ocamlPackages; [
|
|
apron
|
|
yojson
|
|
]);
|
|
|
|
propagatedBuildInputs = with ocamlPackages; [
|
|
batteries
|
|
menhirLib
|
|
zarith
|
|
];
|
|
|
|
outputs = [ "bin" "lib" "out" ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
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
|
|
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 ];
|
|
mainProgram = "jasminc";
|
|
platforms = lib.platforms.all;
|
|
};
|
|
}
|