stephank / yarn-plugin-nixify

Yarn v3/v4 plugin to help with Nix packaging

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to skip-build

manveru opened this issue · comments

While trying to package https://backstage.io/ I ran into a lot of issues related to dependencies that fail to build, most importantly ssh2 requires /usr/bin/env.
The package itself isn't really needed by anything I'm using right now afaict, but it requires that I either:

  • switch to nodeLinker: pnp, separate ssh2 in its own build and patch it (this doesn't work, because for some reason the typescript stuff goes insane with pnp).
  • Set --mode=skip-build on the yarn install step, but there's no clean way to modify options without replacing the whole configurePhase, in which case i lose references to mkCacheBuilderForDrvs, cacheDrvs, yarnPath, and cacheFolder.
  • Manually patch the yarn-project.nix after every yarn execution.

So I think the best option would be to offer some way to augment the yarn invocation with additional flags.

Sorry for the late response on this, but as a work around, maybe the following works for you in package.json?

"dependenciesMeta": {
  "ssh2": {
    "built": false
  }
}