nixpkgs/pkgs/development/compilers/jasmin-compiler/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.3 KiB
Nix
Raw Normal View History

2022-04-20 09:45:15 +00:00
{ stdenv, lib, fetchurl, ocamlPackages, mpfr, ppl }:
stdenv.mkDerivation rec {
pname = "jasmin-compiler";
version = "2023.06.1";
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";
hash = "sha256-3+eIR8wkBlcUQVDsugHo/rHNHbE2vpE9gutp55kRY4Y=";
2022-04-20 09:45:15 +00:00
};
sourceRoot = "jasmin-compiler-v${version}/compiler";
nativeBuildInputs = with ocamlPackages; [ ocaml findlib dune_3 menhir camlidl cmdliner ];
2022-04-20 09:45:15 +00:00
buildInputs = [
mpfr
ppl
] ++ (with ocamlPackages; [
apron
yojson
]);
propagatedBuildInputs = with ocamlPackages; [
2022-04-20 09:45:15 +00:00
batteries
menhirLib
zarith
];
outputs = [ "bin" "lib" "out" ];
2022-04-20 09:45:15 +00:00
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
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 ];
mainProgram = "jasminc";
platforms = lib.platforms.all;
2022-04-20 09:45:15 +00:00
};
}