The current setup-hook
for hare
only handles first level dependencies added to nativeBuildInputs
, that is, all hareThirdParty.<package>
added to it have their /<store-path>/src/hare/third-party
added to the HAREPATH
variable.
Second level dependencies β ones declared inside the buildInputs
of any hareThirdParty.<package>
; see the hare-png
PR, which depends on hare-compress
, for an example β are not handled, so the user would need to add them manually to the nativeBuildInputs
attribute of the package to be built.
How would one go about fixing this issue? In other words, how to add the dependencies of a Hare
third party libary declared on its buildInputs
to the HAREPATH
of a package the uses it as one of its nativeBuildInputs
?
Would hare
βs setup-hook be a suitable way to fix this issue? Or would it be time to start thinking on creating buildHarePackage
and buildHareThirdParty
derivations?
Hereβs an example with the dummy packages hare-foo
, hare-bar
, hare-foobar
and hareprog
.
hareprog
βs recipe:
{ hare-foobar, hare }:
stdenv.mkDerivation (finalAttrs: {
pname = "hareprog";
version = "<version>";
src = "<src>";
nativeBuildInputs = [ hare-foobar ];
})
hare-foobar
βs recipe:
{ hare-foo, hare-bar }:
stdenv.mkDerivation (finalAttrs: {
pname = "hare-foobar";
version = "<version>";
src = "<src>";
buildInputs = [ hare-foo hare-bar ];
})
How to make the HAREPATH
in hareprog
have not only /<store-path>/<hash>-hare-foobar-<version>/src/hare/third-party
β as is the current behavior β, but also /<store-path>/<hash>-hare-foo-<version>/src/hare/third-party
and /<store-path>/<hash>-hare-bar-<version>/src/hare/third-party
?