nixos/manual: Must disable secure boot on UEFI installs (#364406)
[NixPkgs.git] / pkgs / development / ocaml-modules / lem / default.nix
blob6c1ff08f44dd3597abfe2c8fc4e8f3b16b34de9c
2   stdenv,
3   fetchFromGitHub,
4   lib,
5   makeWrapper,
6   ocamlbuild,
7   findlib,
8   ocaml,
9   num,
10   zarith,
13 lib.throwIfNot (lib.versionAtLeast ocaml.version "4.07")
14   "lem is not available for OCaml ${ocaml.version}"
16   stdenv.mkDerivation
17   rec {
18     pname = "ocaml${ocaml.version}-lem";
19     version = "2022-12-10";
21     src = fetchFromGitHub {
22       owner = "rems-project";
23       repo = "lem";
24       rev = version;
25       hash = "sha256-ZQgcuIVRkJS0KtpzjbO4OPHGg6B0TadWA6XpRir30y8=";
26     };
28     nativeBuildInputs = [
29       makeWrapper
30       ocamlbuild
31       findlib
32       ocaml
33     ];
34     propagatedBuildInputs = [
35       zarith
36       num
37     ];
39     installFlags = [ "INSTALL_DIR=$(out)" ];
41     createFindlibDestdir = true;
43     postInstall = ''
44       wrapProgram $out/bin/lem --set LEMLIB $out/share/lem/library
45     '';
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   }