init dune project

This commit is contained in:
Michael Zhang 2024-04-22 13:29:13 -05:00
commit 459f6a7888
Signed by: michael
GPG Key ID: BDA47A31A3C8EE6B
12 changed files with 91 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.direnv
_build

4
bin/dune Normal file
View File

@ -0,0 +1,4 @@
(executable
(public_name poplpaper)
(name main)
(libraries poplpaper))

1
bin/main.ml Normal file
View File

@ -0,0 +1 @@
let () = print_endline "Hello, World!"

7
default.nix Normal file
View File

@ -0,0 +1,7 @@
{ buildDunePackage, nix-gitignore }:
buildDunePackage {
pname = "poplpaper";
version = "0.0";
src = nix-gitignore.gitignoreSource [ ./.gitignore ] ./.;
}

1
dune-project Normal file
View File

@ -0,0 +1 @@
(lang dune 2.9)

58
flake.lock Normal file
View File

@ -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
}

13
flake.nix Normal file
View File

@ -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 ];
};
});
}

2
lib/dune Normal file
View File

@ -0,0 +1,2 @@
(library
(name poplpaper))

0
poplpaper.opam Normal file
View File

2
test/dune Normal file
View File

@ -0,0 +1,2 @@
(test
(name poplpaper))

0
test/poplpaper.ml Normal file
View File