What is the community’s preference in general – handwritten packages over derivation generated from a *2nix tool, or vice versa? Would auto-generated derivations be accepted into nixpkgs
?
My context is to build OCaml packages. The options are buildDunePackage
and opam2nix
which uses buildDunePackage
. While the latter’s documentation is sparse, after jumping through a few hoops, I was able to use it to build packages successfully.
Using opam2nix
has been a breeze (with the caveat that I simply may not have encountered any nuanced problems yet). But I also wish to contribute these packages to upstream. Would anyone be willing to guide me whether such a generated derivation is fit to be accepted upstream? dream is a moderately complex example. opam2nix
generates a single opam-selection.nix
for an opam package, which describes the package itself, along with all its dependencies.
A few issues which might come up with opam2nix
could be:
-
sharing dependencies with other packages. Stealing a quote from Re-using nixpkgs derivations for different package versions - #2 by SergeK :
In particular, if there are two python packages that both depend on
pytorch=1.6.0
(let’s assume hey are also locked to exact same revisions), I am not sure if, withpoetry2nix
ormach-nix
, that huge pytorch binary distribution would be re-used between them. My expectation instead is thatpoetry2nix
would produce two derivations, each with its own copy ofpytorch
. I’m still yet to check it. -
cross-compilation
-
handling external dependencies (not in opam)