567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
56 lines
1.0 KiB
Nix
56 lines
1.0 KiB
Nix
{
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
lib,
|
|
makeWrapper,
|
|
ocamlbuild,
|
|
findlib,
|
|
ocaml,
|
|
num,
|
|
zarith,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ocaml${ocaml.version}-lem";
|
|
version = "2025-03-13";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rems-project";
|
|
repo = "lem";
|
|
rev = version;
|
|
hash = "sha256-ZV2OiFonMlNzqtsumMQ8jzY9/ATaZxiNHZ7JzOfGluY=";
|
|
};
|
|
|
|
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 = {
|
|
homepage = "https://github.com/rems-project/lem";
|
|
description = "Tool for lightweight executable mathematics";
|
|
mainProgram = "lem";
|
|
maintainers = with lib.maintainers; [ genericnerdyusername ];
|
|
license = with lib.licenses; [
|
|
bsd3
|
|
gpl2
|
|
];
|
|
platforms = ocaml.meta.platforms;
|
|
broken = !(lib.versionAtLeast ocaml.version "4.07");
|
|
};
|
|
}
|