Open
Description
Describe the bug
We have a repo with 2 packages a
and b
, where b
depends transitively on a
via an intermediary package foo
.
We don't manage to provide a Nix shell with opam.nix
.
To Reproduce
- in repo
bar
, have 2 opam files:a.opam
b.opam
which depends onfoo
- in repo
foo
, have 1 opam filefoo.opam
which depends ona
- use
opam-nix
to provide a Nix shell in repobar
for botha
andb
I tried to add this overlay:
final: prev: {
a = prev.a.overrideAttrs
(a: {
src = builtins.fetchGit ./.;
doCheck = false;
});
}
This makes the Nix shell succeed to evaluate, however dune build
fails with something like
Error: Conflict between the following libraries:
- "a" in _build/default/a/lib
- "a" in
/nix/store/q1c4vacvhql0vc3ry9gvr3xjnqrzml2f-a-0.19.6/lib/ocaml/5.2.0/site-lib/a
-> required by library "foo" in
/nix/store/1i05pbq3j8swqz5s9pxhkzs4yf03dlqd-foo-1.1.6/lib/ocaml/5.2.0/site-lib/foo
-> required by library "b" in
_build/default/b/lib
-> required by _build/default/b/tests/b.exe
-> required by alias b/tests/all
-> required by alias b/default
-> required by alias default in dune:20
Expected behavior
Some way to get a nix-shell for both a
and b
Metadata
Metadata
Assignees
Labels
No labels