2023-02-09 11:40:11 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, ocamlbuild
|
|
|
|
, findlib
|
|
|
|
, ocaml
|
|
|
|
, num
|
|
|
|
, zarith
|
|
|
|
}:
|
|
|
|
|
|
|
|
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.07")
|
|
|
|
"lem is not available for OCaml ${ocaml.version}"
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ocaml${ocaml.version}-lem";
|
|
|
|
version = "2022-12-10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rems-project";
|
|
|
|
repo = "lem";
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-ZQgcuIVRkJS0KtpzjbO4OPHGg6B0TadWA6XpRir30y8=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ocamlbuild findlib ocaml ];
|
|
|
|
propagatedBuildInputs = [ zarith num ];
|
|
|
|
|
|
|
|
installFlags = [ "INSTALL_DIR=$(out)" ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/lem --set LEMLIB $out/share/lem/library
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/rems-project/lem";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool for lightweight executable mathematics";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "lem";
|
2023-02-09 11:40:11 +00:00
|
|
|
maintainers = with maintainers; [ genericnerdyusername ];
|
|
|
|
license = with licenses; [ bsd3 gpl2 ];
|
|
|
|
platforms = ocaml.meta.platforms;
|
|
|
|
};
|
|
|
|
}
|