I am trying to package a fmdserver which is written its frontend with next.js (pnpm) and backend written in go.
This is my current workflow:
I use grep in nixpkgs to search for something similar, then I found memos as template.
I copy this file and change it accordingly to fit the project.
Then I use a basic flake package outputs and use pkgs.callPackage and point to that above derivation nix file, then run nix build .#package to build the package. If I am lucky, it can be build without significant changes.
However I am not lucky this time. During the process it just throw some error message about the pnpm configuring process (pnpmConfigHook) > ERROR packages field missing or empty. I think this is because of some missing configurations or maybe the project directory structure is not the same as memos. But I have no idea whats going on.
Sometimes I can package some software like this, but I think it is just highly depends on luck.
Can I go inside the shell of building process to see the file structure and manually apply those phases to see what actually happened (file or directories created) before and after those phases?
What it the proper way to do this? thanks!