nixpkgs/pkgs/by-name/ja/jasmin-compiler/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

51 lines
1.3 KiB
Nix

{ stdenv, lib, fetchurl, ocamlPackages, mpfr, ppl }:
stdenv.mkDerivation rec {
pname = "jasmin-compiler";
version = "2024.07.1";
src = fetchurl {
url = "https://github.com/jasmin-lang/jasmin/releases/download/v${version}/jasmin-compiler-v${version}.tar.bz2";
hash = "sha256-at6jWm/Dv/duKmBBCIFkKborMxsQEpqEDO6NrJgzhz8=";
};
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; [
angstrom
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 = "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;
};
}