From e8b489dd6f48429e196510b708a3ef4f3ecfeaf1 Mon Sep 17 00:00:00 2001 From: jutty Date: Mon, 31 Mar 2025 10:09:43 -0300 Subject: [PATCH] Scaffold OCaml project --- ocaml/.gitignore | 1 + ocaml/bin/dune | 4 ++++ ocaml/bin/main.ml | 1 + ocaml/dune-project | 27 +++++++++++++++++++++++++++ ocaml/lib/dune | 2 ++ ocaml/test/dune | 2 ++ ocaml/test/test_tori.ml | 0 ocaml/tori.opam | 32 ++++++++++++++++++++++++++++++++ 8 files changed, 69 insertions(+) create mode 100644 ocaml/.gitignore create mode 100644 ocaml/bin/dune create mode 100644 ocaml/bin/main.ml create mode 100644 ocaml/dune-project create mode 100644 ocaml/lib/dune create mode 100644 ocaml/test/dune create mode 100644 ocaml/test/test_tori.ml create mode 100644 ocaml/tori.opam diff --git a/ocaml/.gitignore b/ocaml/.gitignore new file mode 100644 index 0000000..e35d885 --- /dev/null +++ b/ocaml/.gitignore @@ -0,0 +1 @@ +_build diff --git a/ocaml/bin/dune b/ocaml/bin/dune new file mode 100644 index 0000000..d19048e --- /dev/null +++ b/ocaml/bin/dune @@ -0,0 +1,4 @@ +(executable + (public_name tori) + (name main) + (libraries tori)) diff --git a/ocaml/bin/main.ml b/ocaml/bin/main.ml new file mode 100644 index 0000000..4ff50b1 --- /dev/null +++ b/ocaml/bin/main.ml @@ -0,0 +1 @@ +let () = print_endline "Hello, OCaml!" diff --git a/ocaml/dune-project b/ocaml/dune-project new file mode 100644 index 0000000..47fb9c4 --- /dev/null +++ b/ocaml/dune-project @@ -0,0 +1,27 @@ +(lang dune 3.17) + +(name tori) +(version 0.8.0) + +(generate_opam_files true) + +(homepage https://tori.jutty.dev) +(source (uri git+https://brew.bsd.cafe/tori/tori.git)) + +(authors "Juno Takano ") + +(maintainers "Juno Takano ") + +(license GPL-3.0-only) + +(documentation https://tori.jutty.dev/docs) + +(package + (name tori) + (synopsis "Track system configurations and replicate them") + (description "tori lets you define several characteristics of a unix system and track how they change along time, tracking how they changed and choosing whether or not to commit them. It aims for portability and declarative configuration practices, meaning you tell it what your system is, not how to reproduce it.") + (depends ocaml) + (tags + ("operating systems" "unix" "configuration management"))) + +; See the complete stanza docs at https://dune.readthedocs.io/en/stable/reference/dune-project/index.html diff --git a/ocaml/lib/dune b/ocaml/lib/dune new file mode 100644 index 0000000..0945884 --- /dev/null +++ b/ocaml/lib/dune @@ -0,0 +1,2 @@ +(library + (name tori)) diff --git a/ocaml/test/dune b/ocaml/test/dune new file mode 100644 index 0000000..807a851 --- /dev/null +++ b/ocaml/test/dune @@ -0,0 +1,2 @@ +(test + (name test_tori)) diff --git a/ocaml/test/test_tori.ml b/ocaml/test/test_tori.ml new file mode 100644 index 0000000..e69de29 diff --git a/ocaml/tori.opam b/ocaml/tori.opam new file mode 100644 index 0000000..dc0dfaa --- /dev/null +++ b/ocaml/tori.opam @@ -0,0 +1,32 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +version: "0.8.0" +synopsis: "A tool to track system configurations and replicate them." +description: + "tori lets you define several characteristics of a unix system and track how they change along time, tracking how they changed and choosing whether or not to commit them. It aims for portability and declarative configuration practices, meaning you tell it what your system is, not how to reproduce it." +maintainer: ["Juno Takano "] +authors: ["Juno Takano "] +license: "GPL-3.5-only" +tags: ["operating systems" "unix" "configuration management"] +homepage: "https://tori.jutty.dev" +doc: "https://tori.jutty.dev/docs" +depends: [ + "dune" {>= "3.17"} + "ocaml" + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://brew.bsd.cafe/tori/tori.git"