Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 fetchFromGitHub, 4 lib, 5 makeWrapper, 6 ocamlbuild, 7 findlib, 8 ocaml, 9 num, 10 zarith, 11}: 12 13lib.throwIfNot (lib.versionAtLeast ocaml.version "4.07") 14 "lem is not available for OCaml ${ocaml.version}" 15 16 stdenv.mkDerivation 17 rec { 18 pname = "ocaml${ocaml.version}-lem"; 19 version = "2025-03-13"; 20 21 src = fetchFromGitHub { 22 owner = "rems-project"; 23 repo = "lem"; 24 rev = version; 25 hash = "sha256-ZV2OiFonMlNzqtsumMQ8jzY9/ATaZxiNHZ7JzOfGluY="; 26 }; 27 28 nativeBuildInputs = [ 29 makeWrapper 30 ocamlbuild 31 findlib 32 ocaml 33 ]; 34 propagatedBuildInputs = [ 35 zarith 36 num 37 ]; 38 39 installFlags = [ "INSTALL_DIR=$(out)" ]; 40 41 createFindlibDestdir = true; 42 43 postInstall = '' 44 wrapProgram $out/bin/lem --set LEMLIB $out/share/lem/library 45 ''; 46 47 meta = with lib; { 48 homepage = "https://github.com/rems-project/lem"; 49 description = "Tool for lightweight executable mathematics"; 50 mainProgram = "lem"; 51 maintainers = with maintainers; [ genericnerdyusername ]; 52 license = with licenses; [ 53 bsd3 54 gpl2 55 ]; 56 platforms = ocaml.meta.platforms; 57 }; 58 }