Initial commit
This commit is contained in:
commit
0ed194ed53
11 changed files with 162 additions and 0 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake
|
31
.gitignore
vendored
Normal file
31
.gitignore
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
*.annot
|
||||
*.cmo
|
||||
*.cma
|
||||
*.cmi
|
||||
*.a
|
||||
*.o
|
||||
*.cmx
|
||||
*.cmxs
|
||||
*.cmxa
|
||||
|
||||
# ocamlbuild working directory
|
||||
_build/
|
||||
|
||||
# ocamlbuild targets
|
||||
*.byte
|
||||
*.native
|
||||
|
||||
# oasis generated files
|
||||
setup.data
|
||||
setup.log
|
||||
|
||||
# Merlin configuring file for Vim and Emacs
|
||||
.merlin
|
||||
|
||||
# Dune generated files
|
||||
*.install
|
||||
|
||||
# Local OPAM switch
|
||||
_opam/
|
||||
|
||||
.direnv/
|
4
bin/dune
Normal file
4
bin/dune
Normal file
|
@ -0,0 +1,4 @@
|
|||
(executable
|
||||
(public_name helloworld)
|
||||
(name main)
|
||||
(libraries helloworld))
|
1
bin/main.ml
Normal file
1
bin/main.ml
Normal file
|
@ -0,0 +1 @@
|
|||
let () = print_endline "Hello, World!"
|
26
dune-project
Normal file
26
dune-project
Normal file
|
@ -0,0 +1,26 @@
|
|||
(lang dune 3.18)
|
||||
|
||||
(name helloworld)
|
||||
|
||||
(generate_opam_files true)
|
||||
|
||||
(source
|
||||
(github username/reponame))
|
||||
|
||||
(authors "Author Name <author@example.com>")
|
||||
|
||||
(maintainers "Maintainer Name <maintainer@example.com>")
|
||||
|
||||
(license LICENSE)
|
||||
|
||||
(documentation https://url/to/documentation)
|
||||
|
||||
(package
|
||||
(name helloworld)
|
||||
(synopsis "A short synopsis")
|
||||
(description "A longer description")
|
||||
(depends ocaml)
|
||||
(tags
|
||||
("add topics" "to describe" your project)))
|
||||
|
||||
; See the complete stanza docs at https://dune.readthedocs.io/en/stable/reference/dune-project/index.html
|
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1743964447,
|
||||
"narHash": "sha256-nEo1t3Q0F+0jQ36HJfbJtiRU4OI+/0jX/iITURKe3EE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "063dece00c5a77e4a0ea24e5e5a5bd75232806f8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
36
flake.nix
Normal file
36
flake.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
description = "";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
overlays = [];
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
meta = with nixpkgs.lib; {
|
||||
#homepage = "https://example.com";
|
||||
#license = [ licenses.gpl3 ];
|
||||
platforms = [ system ];
|
||||
#maintainers = with maintainers; [ ];
|
||||
};
|
||||
in {
|
||||
devShells.${system}.default = with pkgs; mkShell {
|
||||
#packages = [];
|
||||
inputsFrom = with self.packages.${system}; [ helloworld ];
|
||||
};
|
||||
packages.${system} = {
|
||||
default = self.packages.${system}.helloworld;
|
||||
helloworld = pkgs.ocamlPackages.buildDunePackage rec {
|
||||
pname = "helloworld";
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
inherit meta;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
32
helloworld.opam
Normal file
32
helloworld.opam
Normal file
|
@ -0,0 +1,32 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
synopsis: "A short synopsis"
|
||||
description: "A longer description"
|
||||
maintainer: ["Maintainer Name <maintainer@example.com>"]
|
||||
authors: ["Author Name <author@example.com>"]
|
||||
license: "LICENSE"
|
||||
tags: ["add topics" "to describe" "your" "project"]
|
||||
homepage: "https://github.com/username/reponame"
|
||||
doc: "https://url/to/documentation"
|
||||
bug-reports: "https://github.com/username/reponame/issues"
|
||||
depends: [
|
||||
"dune" {>= "3.18"}
|
||||
"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://github.com/username/reponame.git"
|
||||
x-maintenance-intent: ["(latest)"]
|
2
lib/dune
Normal file
2
lib/dune
Normal file
|
@ -0,0 +1,2 @@
|
|||
(library
|
||||
(name helloworld))
|
2
test/dune
Normal file
2
test/dune
Normal file
|
@ -0,0 +1,2 @@
|
|||
(test
|
||||
(name test_helloworld))
|
0
test/test_helloworld.ml
Normal file
0
test/test_helloworld.ml
Normal file
Loading…
Add table
Reference in a new issue