How to build a chain of two different packages where package 2 is a JS app unable to be used by yarn2nix properly?

During an installation of Package 1, which I’ll call foo, I need to run bar, Package 2, on a part of foo’s contents effectively mutating the package at that point.

Here are the problems I have run into:

  • I am unable to call my own bar during a modified call to foo.nix.
  • I am unable to make a bar.nix because yarn2nix doesn’t handle git:// dependencies properly.

Here’s the flow of what I’m trying to do:

  • Download foo’s tarball and extract it
  • Run bar $out/some/path/in/foo
  • Continue the installation of foo as normal

Special requirements:

  • bar pulls from data inside of the JS project directory
  • bar needs to be updated its package.json updates, but if none occurs foo in the new package should still update
  • foo is nonfree

How should I go about writing this? What parts of the nixpkg documentation should I be looking at?

Just so I know whether or not to bump again in the future, are the rules on thread bumping?

We don’t have any rules about it, because it hasn’t been a problem. In my opinion, you waited more than long enough to bump this.