commit 459f6a78888f806112e8a008a5923ed57120bb35 Author: Michael Zhang Date: Mon Apr 22 13:29:13 2024 -0500 init dune project diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..296fc8c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.direnv +_build diff --git a/bin/dune b/bin/dune new file mode 100644 index 0000000..cb42d58 --- /dev/null +++ b/bin/dune @@ -0,0 +1,4 @@ +(executable + (public_name poplpaper) + (name main) + (libraries poplpaper)) diff --git a/bin/main.ml b/bin/main.ml new file mode 100644 index 0000000..7bf6048 --- /dev/null +++ b/bin/main.ml @@ -0,0 +1 @@ +let () = print_endline "Hello, World!" diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..f708166 --- /dev/null +++ b/default.nix @@ -0,0 +1,7 @@ +{ buildDunePackage, nix-gitignore }: + +buildDunePackage { + pname = "poplpaper"; + version = "0.0"; + src = nix-gitignore.gitignoreSource [ ./.gitignore ] ./.; +} diff --git a/dune-project b/dune-project new file mode 100644 index 0000000..c994249 --- /dev/null +++ b/dune-project @@ -0,0 +1 @@ +(lang dune 2.9) diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..3ab3a32 --- /dev/null +++ b/flake.lock @@ -0,0 +1,58 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "id": "flake-utils", + "type": "indirect" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1663551060, + "narHash": "sha256-e2SR4cVx9p7aW/XnVsGsWZBplApA9ZJUjc0fejJhnYo=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8a5b9ee7b7a2b38267c9481f5c629c015108ab0d", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..fa27f8e --- /dev/null +++ b/flake.nix @@ -0,0 +1,13 @@ +{ + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + flakePkgs = { main = pkgs.ocamlPackages.callPackage ./. { }; }; + in { + devShell = pkgs.mkShell { + inputsFrom = with flakePkgs; [ main ]; + packages = with pkgs; [ ocamlPackages.ocaml-lsp ]; + }; + }); +} diff --git a/lib/dune b/lib/dune new file mode 100644 index 0000000..a2fa703 --- /dev/null +++ b/lib/dune @@ -0,0 +1,2 @@ +(library + (name poplpaper)) diff --git a/poplpaper.opam b/poplpaper.opam new file mode 100644 index 0000000..e69de29 diff --git a/test/dune b/test/dune new file mode 100644 index 0000000..6597498 --- /dev/null +++ b/test/dune @@ -0,0 +1,2 @@ +(test + (name poplpaper)) diff --git a/test/poplpaper.ml b/test/poplpaper.ml new file mode 100644 index 0000000..e69de29