I am trying to “nixify” some 3rd-party react web project but not coming far. The root issue seems to be that filesystem layout is different than if I just run “yarn” and then "yarn build"in the checked-out version and I am trying to figure out how exactly all this happens. I’ve tried reading https://github.com/mayflower/yarn2nix-moretea/blob/2ecd70bef182cd1ad5f9ee0d9004b5bd1cbbd023/default.nix but don’t really understand the details.
First of all why is it called “yarn2nix-moretea”? The moretea fork is not compatible with stock yarn2nix?
The layout seems to be:
- /build/app/node_modules with a lot of node_modules (seems about right)
- /build/app/deps/myapp/ with the code
- /build/app/deps/myapp/node_modules with a few modules and most of .bin is symlinked to files inside of the first node_modules
How exactly does this happen? Is it a matter of devDependencies vs. others (doesn’t seem to be like that judging from package.json, but since there are lots of transitive dependencies who knows)?
The symlinks makes everything “look” ok but eslint fails since it doesn’t find .eslintrc in the proper location and various complications like that. Is there any good documentation for this beside Node.js - NixOS Wiki ? Thanks.