Closed mimoo closed 2 years ago
for example, I'm getting the following error when trying to use buildOpamProject
:
error: attribute 'buildOpamProject' missing
at /nix/store/r5xh1fpj8f12rh4xf1hp87cb2ivsxr1b-source/flake.nix:50:24:
49| # Executed by `nix build .#byexample`
50| byexample = (opam-nix.buildOpamProject { } "byexample" ./tools { }).byexample;
| ^
You probably want opam-nix.lib.${system}.buildOpamProject
. You can look at examples to find your way around: https://github.com/tweag/opam-nix/tree/main/examples . A very simple usage of buildOpamProject can be found here: https://github.com/tweag/opam-nix/blob/main/examples/opam2json/flake.nix
Hopefully should be resolved with new, better templates from f4b388ddae8db9ac2ac452eb77bd5870ef6b3d7f
I've been reading the excellent example here: https://github.com/brendanzab/ocaml-flake-example (from this thread: https://discourse.nixos.org/t/ocaml-example-project-using-flakes/16892)
It would be nice to have something similar for opam-nix, I admit that I'm a bit lost with the README :)