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,42 @@
Test that dune can fetch local sources.
$ . ./helpers.sh
$ mkrepo
Make a local source archive:
$ mkdir src
$ echo hello > src/a.txt
$ echo world > src/b.txt
$ tar -czf src.tar.gz src
Build a package that uses the archive as its source:
$ mkpkg foo <<EOF
> url {
> src: "$PWD/src.tar.gz"
> }
> EOF
$ add_mock_repo_if_needed
$ solve foo
Solution for dune.lock:
- foo.0.0.1
$ build_pkg foo
$ cat _build/_private/default/.pkg/foo/source/*
hello
world
$ dune clean
Build a package that uses the src directory as its source:
$ mkpkg foo <<EOF
> url {
> src: "$PWD/src"
> }
> EOF
$ add_mock_repo_if_needed
$ solve foo
Solution for dune.lock:
- foo.0.0.1
$ build_pkg foo
$ cat _build/_private/default/.pkg/foo/source/*
hello
world