basic commit with testing data
This commit is contained in:
commit
bc251b3af0
14 changed files with 382 additions and 0 deletions
4
.envrc
Normal file
4
.envrc
Normal file
|
@ -0,0 +1,4 @@
|
|||
# shellcheck shell=bash
|
||||
# For use with direnv.
|
||||
# Installing nix-direnv will ensure a smoother experience.
|
||||
use flake
|
30
.gitignore
vendored
Normal file
30
.gitignore
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
.direnv/*
|
||||
*.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/
|
31
NicksLearning/NicksLearning.opam
Normal file
31
NicksLearning/NicksLearning.opam
Normal file
|
@ -0,0 +1,31 @@
|
|||
# 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"]
|
||||
authors: ["Author Name"]
|
||||
license: "LICENSE"
|
||||
tags: ["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: [
|
||||
"ocaml"
|
||||
"dune" {>= "3.12"}
|
||||
"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"
|
1
NicksLearning/_build/.lock
Normal file
1
NicksLearning/_build/.lock
Normal file
|
@ -0,0 +1 @@
|
|||
759614
|
31
NicksLearning/_build/log
Normal file
31
NicksLearning/_build/log
Normal file
|
@ -0,0 +1,31 @@
|
|||
# dune build -w
|
||||
# OCAMLPARAM: unset
|
||||
# Shared cache: disabled
|
||||
# Shared cache location: /home/nixolas/.cache/dune/db
|
||||
# Workspace root: /home/nixolas/Documents/ocaml_testing/NicksLearning
|
||||
# Auto-detected concurrency: 12
|
||||
# Dune context:
|
||||
# { name = "default"
|
||||
# ; kind = "default"
|
||||
# ; profile = Dev
|
||||
# ; merlin = true
|
||||
# ; fdo_target_exe = None
|
||||
# ; build_dir = In_build_dir "default"
|
||||
# ; installed_env =
|
||||
# map
|
||||
# { "INSIDE_DUNE" :
|
||||
# "/home/nixolas/Documents/ocaml_testing/NicksLearning/_build/default"
|
||||
# ; "OCAML_COLOR" : "always"
|
||||
# ; "OPAMCOLOR" : "always"
|
||||
# }
|
||||
# ; instrument_with = []
|
||||
# }
|
||||
$ /nix/store/9j24zr09jz1wgi8m306avyccwirbl229-ocaml-base-compiler-5.1.1_rc1/bin/ocamlc.opt -config > /tmp/dune_da31cc_output
|
||||
$ (cd _build/default && /nix/store/9j24zr09jz1wgi8m306avyccwirbl229-ocaml-base-compiler-5.1.1_rc1/bin/ocamlopt.opt -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -I bin/.main.eobjs/byte -I bin/.main.eobjs/native -I lib/.NicksLearning.objs/byte -I lib/.NicksLearning.objs/native -intf-suffix .ml -no-alias-deps -opaque -o bin/.main.eobjs/native/dune__exe__Main.cmx -c -impl bin/main.ml)
|
||||
> File "bin/main.ml", line 5, characters 0-0:
|
||||
> Error: Syntax error
|
||||
[2]
|
||||
$ (cd _build/default && /nix/store/9j24zr09jz1wgi8m306avyccwirbl229-ocaml-base-compiler-5.1.1_rc1/bin/ocamlopt.opt -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -I bin/.main.eobjs/byte -I bin/.main.eobjs/native -I lib/.NicksLearning.objs/byte -I lib/.NicksLearning.objs/native -intf-suffix .ml -no-alias-deps -opaque -o bin/.main.eobjs/native/dune__exe__Main.cmx -c -impl bin/main.ml)
|
||||
$ (cd _build/default && /nix/store/9j24zr09jz1wgi8m306avyccwirbl229-ocaml-base-compiler-5.1.1_rc1/bin/ocamlopt.opt -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -o bin/main.exe lib/NicksLearning.cmxa bin/.main.eobjs/native/dune__exe__Main.cmx)
|
||||
$ (cd _build/default && /nix/store/9j24zr09jz1wgi8m306avyccwirbl229-ocaml-base-compiler-5.1.1_rc1/bin/ocamlopt.opt -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -I bin/.main.eobjs/byte -I bin/.main.eobjs/native -I lib/.NicksLearning.objs/byte -I lib/.NicksLearning.objs/native -intf-suffix .ml -no-alias-deps -opaque -o bin/.main.eobjs/native/dune__exe__Main.cmx -c -impl bin/main.ml)
|
||||
$ (cd _build/default && /nix/store/9j24zr09jz1wgi8m306avyccwirbl229-ocaml-base-compiler-5.1.1_rc1/bin/ocamlopt.opt -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -o bin/main.exe lib/NicksLearning.cmxa bin/.main.eobjs/native/dune__exe__Main.cmx)
|
4
NicksLearning/bin/dune
Normal file
4
NicksLearning/bin/dune
Normal file
|
@ -0,0 +1,4 @@
|
|||
(executable
|
||||
(public_name NicksLearning)
|
||||
(name main)
|
||||
(libraries NicksLearning))
|
5
NicksLearning/bin/main.ml
Normal file
5
NicksLearning/bin/main.ml
Normal file
|
@ -0,0 +1,5 @@
|
|||
let x = "hello world" in
|
||||
print_endline x
|
||||
|
||||
|
||||
let () = print_endline "Hello, World!"
|
26
NicksLearning/dune-project
Normal file
26
NicksLearning/dune-project
Normal file
|
@ -0,0 +1,26 @@
|
|||
(lang dune 3.12)
|
||||
|
||||
(name NicksLearning)
|
||||
|
||||
(generate_opam_files true)
|
||||
|
||||
(source
|
||||
(github username/reponame))
|
||||
|
||||
(authors "Author Name")
|
||||
|
||||
(maintainers "Maintainer Name")
|
||||
|
||||
(license LICENSE)
|
||||
|
||||
(documentation https://url/to/documentation)
|
||||
|
||||
(package
|
||||
(name NicksLearning)
|
||||
(synopsis "A short synopsis")
|
||||
(description "A longer description")
|
||||
(depends ocaml dune)
|
||||
(tags
|
||||
(topics "to describe" your project)))
|
||||
|
||||
; See the complete stanza docs at https://dune.readthedocs.io/en/stable/dune-files.html#dune-project
|
2
NicksLearning/lib/dune
Normal file
2
NicksLearning/lib/dune
Normal file
|
@ -0,0 +1,2 @@
|
|||
(library
|
||||
(name NicksLearning))
|
2
NicksLearning/test/dune
Normal file
2
NicksLearning/test/dune
Normal file
|
@ -0,0 +1,2 @@
|
|||
(test
|
||||
(name test_NicksLearning))
|
0
NicksLearning/test/test_NicksLearning.ml
Normal file
0
NicksLearning/test/test_NicksLearning.ml
Normal file
189
flake.lock
Normal file
189
flake.lock
Normal file
|
@ -0,0 +1,189 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1627913399,
|
||||
"narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1638122382,
|
||||
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mirage-opam-overlays": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1661959605,
|
||||
"narHash": "sha256-CPTuhYML3F4J58flfp3ZbMNhkRkVFKmBEYBZY5tnQwA=",
|
||||
"owner": "dune-universe",
|
||||
"repo": "mirage-opam-overlays",
|
||||
"rev": "05f1c1823d891ce4d8adab91f5db3ac51d86dc0b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "dune-universe",
|
||||
"repo": "mirage-opam-overlays",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1682362401,
|
||||
"narHash": "sha256-/UMUHtF2CyYNl4b60Z2y4wwTTdIWGKhj9H301EDcT9M=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "884ac294018409e0d1adc0cae185439a44bd6b0b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"opam-nix": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"mirage-opam-overlays": "mirage-opam-overlays",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"opam-overlays": "opam-overlays",
|
||||
"opam-repository": "opam-repository",
|
||||
"opam2json": "opam2json"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706878465,
|
||||
"narHash": "sha256-0k0KSkU7epRQshZZKsOpyE79lnwn/0q2VagzDhIeZpE=",
|
||||
"owner": "tweag",
|
||||
"repo": "opam-nix",
|
||||
"rev": "9f03f7e0664c369f25e614d3f3be74ea78b647fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tweag",
|
||||
"repo": "opam-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"opam-overlays": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1654162756,
|
||||
"narHash": "sha256-RV68fUK+O3zTx61iiHIoS0LvIk0E4voMp+0SwRg6G6c=",
|
||||
"owner": "dune-universe",
|
||||
"repo": "opam-overlays",
|
||||
"rev": "c8f6ef0fc5272f254df4a971a47de7848cc1c8a4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "dune-universe",
|
||||
"repo": "opam-overlays",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"opam-repository": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1705008664,
|
||||
"narHash": "sha256-TTjTal49QK2U0yVOmw6rJhTGYM7tnj3Kv9DiEEiLt7E=",
|
||||
"owner": "ocaml",
|
||||
"repo": "opam-repository",
|
||||
"rev": "fa77046c6497f8ca32926acdb7eb1e61777d4c17",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ocaml",
|
||||
"repo": "opam-repository",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"opam2json": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"opam-nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1671540003,
|
||||
"narHash": "sha256-5pXfbUfpVABtKbii6aaI2EdAZTjHJ2QntEf0QD2O5AM=",
|
||||
"owner": "tweag",
|
||||
"repo": "opam2json",
|
||||
"rev": "819d291ea95e271b0e6027679de6abb4d4f7f680",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tweag",
|
||||
"repo": "opam2json",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"opam-nix",
|
||||
"nixpkgs"
|
||||
],
|
||||
"opam-nix": "opam-nix"
|
||||
}
|
||||
},
|
||||
"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
|
||||
}
|
57
flake.nix
Normal file
57
flake.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
inputs = {
|
||||
opam-nix.url = "github:tweag/opam-nix";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.follows = "opam-nix/nixpkgs";
|
||||
};
|
||||
outputs = { self, flake-utils, opam-nix, nixpkgs }@inputs:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
on = opam-nix.lib.${system};
|
||||
localPackagesQuery = builtins.mapAttrs (_: pkgs.lib.last)
|
||||
(on.listRepo (on.makeOpamRepo ./.));
|
||||
devPackagesQuery = {
|
||||
# You can add "development" packages here. They will get added to the devShell automatically.
|
||||
ocaml-lsp-server = "*";
|
||||
merlin = "*";
|
||||
ocamlformat = "*";
|
||||
utop = "*";
|
||||
};
|
||||
query = devPackagesQuery // {
|
||||
## You can force versions of certain packages here, e.g:
|
||||
## - force the ocaml compiler to be taken from opam-repository:
|
||||
ocaml-base-compiler = "*";
|
||||
## - or force the compiler to be taken from nixpkgs and be a certain version:
|
||||
# ocaml-system = "4.14.0";
|
||||
## - or force ocamlfind to be a certain version:
|
||||
# ocamlfind = "1.9.2";
|
||||
};
|
||||
scope = on.buildOpamProject' { } ./. query;
|
||||
overlay = final: prev:
|
||||
{
|
||||
# You can add overrides here
|
||||
};
|
||||
scope' = scope.overrideScope' overlay;
|
||||
# Packages from devPackagesQuery
|
||||
devPackages = builtins.attrValues
|
||||
(pkgs.lib.getAttrs (builtins.attrNames devPackagesQuery) scope');
|
||||
# Packages in this workspace
|
||||
packages =
|
||||
pkgs.lib.getAttrs (builtins.attrNames localPackagesQuery) scope';
|
||||
in {
|
||||
legacyPackages = scope';
|
||||
|
||||
inherit packages;
|
||||
|
||||
## If you want to have a "default" package which will be built with just `nix build`, do this instead of `inherit packages;`:
|
||||
# packages = packages // { default = packages.<your default package>; };
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
inputsFrom = builtins.attrValues packages;
|
||||
buildInputs = devPackages ++ [
|
||||
# You can add packages from nixpkgs here
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
BIN
paint_usage.db
Normal file
BIN
paint_usage.db
Normal file
Binary file not shown.
Loading…
Reference in a new issue