Hello I’m noob on both Nixos and Ocaml. I tried to import a module and run the code simply with ocaml.
open Re
I have this flake.nix inspired from a template.
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
packages.hello = pkgs.openRe;
devShell = pkgs.mkShell { buildInputs = [
pkgs.dune_3
pkgs.ocamlPackages.re
pkgs.ocaml
]; };
});
}
What is missing to make the .ml code working please ?
I want to favor the simplest solution first. Like in C language that only needs a option in the command to include a header. The tools such findlib or Dune should be used if there is no alternative.
Sorry for the very noob question, I learn better with minimal working examples.