From 79dc25b48dde3af3a4b21323713cd21f90803fa7 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 21 Sep 2023 00:55:10 +0200 Subject: [PATCH 1/3] licenses: add inria-zelus --- lib/licenses.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/licenses.nix b/lib/licenses.nix index 0fd641085374..980cce8712b2 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -615,6 +615,12 @@ in mkLicense lset) ({ free = false; }; + inria-zelus = { + fullName = "INRIA Non-Commercial License Agreement for the ZĂ©lus compiler"; + url = "https://github.com/INRIA/zelus/raw/829f2b97cba93b0543a9ca0272269e6b8fdad356/LICENSE"; + free = false; + }; + ipa = { spdxId = "IPA"; fullName = "IPA Font License"; From cd8f19163af376d76c5aa295550e2fa48161d687 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:11:22 +0200 Subject: [PATCH 2/3] ocamlPackages.zelus: init at 2.2 --- .../ocaml-modules/zelus/default.nix | 42 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/ocaml-modules/zelus/default.nix diff --git a/pkgs/development/ocaml-modules/zelus/default.nix b/pkgs/development/ocaml-modules/zelus/default.nix new file mode 100644 index 000000000000..d326e234c0d0 --- /dev/null +++ b/pkgs/development/ocaml-modules/zelus/default.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, buildDunePackage +, fetchFromGitHub +, menhir +, menhirLib +}: + +buildDunePackage rec { + pname = "zelus"; + version = "2.2"; + + minimalOCamlVersion = "4.08.1"; + + src = fetchFromGitHub { + owner = "INRIA"; + repo = "zelus"; + rev = version; + hash = "sha256-NcGX343LProADtzJwlq1kmihLaya1giY6xv9ScvdgTA="; + }; + + # ./configure: cannot execute: required file not found + postPatch = lib.optionalString stdenv.isLinux '' + patchShebangs configure + ''; + + nativeBuildInputs = [ + menhir + ]; + + buildInputs = [ + menhirLib + ]; + + meta = with lib; { + description = "A synchronous language with ODEs"; + homepage = "https://zelus.di.ens.fr"; + license = licenses.inria-zelus; + mainProgram = "zeluc"; + maintainers = with maintainers; [ wegank ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 71fc1d9a460f..82dacd87a0d3 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1880,6 +1880,8 @@ let zed = callPackage ../development/ocaml-modules/zed { }; + zelus = callPackage ../development/ocaml-modules/zelus { }; + zmq = callPackage ../development/ocaml-modules/zmq { }; zmq-lwt = callPackage ../development/ocaml-modules/zmq/lwt.nix { }; From bc1d216bb2c25e049435901f900c333a6f27498a Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:11:26 +0200 Subject: [PATCH 3/3] ocamlPackages.zelus-gtk: init at 2.2 --- .../ocaml-modules/zelus-gtk/default.nix | 24 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/ocaml-modules/zelus-gtk/default.nix diff --git a/pkgs/development/ocaml-modules/zelus-gtk/default.nix b/pkgs/development/ocaml-modules/zelus-gtk/default.nix new file mode 100644 index 000000000000..c0e0e586066a --- /dev/null +++ b/pkgs/development/ocaml-modules/zelus-gtk/default.nix @@ -0,0 +1,24 @@ +{ buildDunePackage +, zelus +, lablgtk +}: + +buildDunePackage { + pname = "zelus-gtk"; + inherit (zelus) version src postPatch; + + minimalOCamlVersion = "4.08.1"; + + nativeBuildInputs = [ + zelus + ]; + + buildInputs = [ + lablgtk + ]; + + meta = { + description = "Zelus GTK library"; + inherit (zelus.meta) homepage license maintainers; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 82dacd87a0d3..19dadc316045 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1882,6 +1882,8 @@ let zelus = callPackage ../development/ocaml-modules/zelus { }; + zelus-gtk = callPackage ../development/ocaml-modules/zelus-gtk { }; + zmq = callPackage ../development/ocaml-modules/zmq { }; zmq-lwt = callPackage ../development/ocaml-modules/zmq/lwt.nix { };