This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,34 @@
Templates
---------
$ cat > dune-project <<EOF
> (lang dune 2.0)
> (name foo)
> (generate_opam_files true)
> (package (name foo) (depends bar))
> EOF
Test various fields in the template file. Fields coming from the
template are always put at the end. Fields generated by Dune are
sorted in a way that pleases "opam lint".
$ cat > foo.opam.template <<EOF
> x-foo: "blah"
> EOF
$ dune build @install
$ tail -n 1 foo.opam
x-foo: "blah"
$ cat > foo.opam.template <<EOF
> libraries: [ "blah" ]
> EOF
$ dune build @install
$ tail -n 1 foo.opam
libraries: [ "blah" ]
$ cat > foo.opam.template <<EOF
> depends: [ "overridden" ]
> EOF
$ dune build @install
$ tail -n 1 foo.opam
depends: [ "overridden" ]