New comment by Barbaross93 on void-packages repository https://github.com/void-linux/void-packages/issues/35401#issuecomment-1131896310 Comment: So, I ended up finding a package that used `opam install` within it's template and applied that method to the wyrd package. The new template looks like this: ``` # Template file for 'wyrd' pkgname=wyrd version=1.5.3 revision=1 build_style=gnu-configure #configure_args="" #make_build_args="" #make_install_args="" hostmakedepends="ocaml camlp5 opam base-devel" makedepends="ncurses-devel" depends="remind" conf_files="/etc/wyrdrc" short_desc="Ncurses front-end to Remind" maintainer="Barbaross " license="GPL-2.0-or-later" homepage="https://gitlab.com/wyrd-calendar/wyrd" distfiles="${homepage}/-/archive/${version}/wyrd-${version}.tar.gz" checksum=1d7936dd10b795a17bbce06ae14079eb36120f26fd7bd27b522f8df5196790e7 pre_configure() { ./prep-devtree.sh } pre_build() { opam init -y --compiler=ocaml-system --disable-sandboxing eval $(opam env) opam install -y curses } ``` The issue now however is that during `opam install -y curses`, an error occurs in which one of the dependencies fails to get installed and therefore breaks the command. See [here](https://github.com/ocaml/opam-repository/issues/19600). There seems to be debate on whether the fix should come from either Void or the maintainer of the ocaml dependency. A Void maintainer has made a firm stance against fixing the issue in `pkg-config` ([source](https://github.com/void-linux/void-packages/pull/32988)), so it seems the fix needs to come from opam, where an [issue has already been reported](https://github.com/ocaml/opam-repository/issues/19600). So it seems I'm back to square one. An [AUR package](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ocaml-curses) managed to get it working through dune, but again, I'm unsure of how to approach this for Void's xbps packaging.