use dune_site module to find inputs

this packages the inputs as part of the build and exposes the directory
to find them via a generated module. this way, inputs are a resource of
the library rather than an input.

this means that `dune exec aoc` and `dune utop` will always find the
file regardless of where they are invoked, which makes developing in
emacs simpler :)
This commit is contained in:
ryan committed 2023-09-21 21:40:21 -07:00
1 parent e1402bc17d
commit 89eb0c7a27
6 files changed
+24 -11

No files matched your search

+9 -1
View File
@@ -1,4 +1,12 @@
(library
(name aoc)
(libraries stdio re)
(libraries stdio re dune-site)
(preprocess (pps ppx_regexp)))
(install
(section (site (aoc inputs)))
(files (glob_files ../inputs/*)))
(generate_sites_module
(module inputs)
(sites aoc))