From 1a4307af6dfcdc3b097f03a26feec9181920381d Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 20 Apr 2022 11:45:15 +0200 Subject: [PATCH] jasmin-compiler: init at 21.0 --- .../compilers/jasmin-compiler/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/compilers/jasmin-compiler/default.nix diff --git a/pkgs/development/compilers/jasmin-compiler/default.nix b/pkgs/development/compilers/jasmin-compiler/default.nix new file mode 100644 index 000000000000..7642ae4aff26 --- /dev/null +++ b/pkgs/development/compilers/jasmin-compiler/default.nix @@ -0,0 +1,41 @@ +{ stdenv, lib, fetchurl, ocamlPackages, mpfr, ppl }: + +stdenv.mkDerivation rec { + pname = "jasmin-compiler"; + version = "21.0"; + + src = fetchurl { + url = "https://github.com/jasmin-lang/jasmin/releases/download/v${version}/jasmin-compiler-v${version}.tar.bz2"; + sha256 = "sha256:1px17fpc00gca5ayfcr4k008srkyw120c25rnyf7cgzfs1gpylj2"; + }; + + sourceRoot = "jasmin-compiler-v${version}/compiler"; + + nativeBuildInputs = with ocamlPackages; [ ocaml findlib ocamlbuild menhir camlidl ]; + + buildInputs = [ + mpfr + ppl + ] ++ (with ocamlPackages; [ + apron + batteries + menhirLib + yojson + zarith + ]); + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp jasminc.native $out/bin/jasminc + runHook postInstall + ''; + + meta = { + description = "A workbench for high-assurance and high-speed cryptography"; + homepage = "https://github.com/jasmin-lang/jasmin/"; + platforms = lib.platforms.all; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a50d9838a4fa..af7a375696e7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7172,6 +7172,8 @@ with pkgs; usePulseaudio = true; }; + jasmin-compiler = callPackage ../development/compilers/jasmin-compiler { }; + jazzy = callPackage ../development/tools/jazzy { }; jc = with python3Packages; toPythonApplication jc;