Defining a ruby
bundlerApp package or a node package requires writing several files. For
bundlerApp you need a
Gemfile and a lockfile and a script that runs
bundix to generate the
gemset.nix. For a node package you need
node-packages.json and a script that runs
node2nix to spit out 3 other files. This can be tedious, especially the fact that you have to run the script up front, so you’re paying for the cost of e.g. generating the whole node package set even if you never use the node package.
In any case, I just had the passing thought, could I use Import From Derivation to have a package that runs e.g.
node2nix to spit out the files, which are then used from a wrapper derivation? I’m not sure what the limitations on IFD are (beyond the fact that Hydra disables it); can I give the imported derivation network access, since it would need that in order to generate the files? Has anyone ever done anything with this?