WIP: mattermost: split and build webapp from source#126629
WIP: mattermost: split and build webapp from source#126629ryantm wants to merge 1 commit intoNixOS:masterfrom
Conversation
|
Just a little bit more context. The build failure is most likely a dependency problem. (yarn2nix not translating the dependencies just like they are in the package-lock.json). Unfortunately I tried to use node2nix to generate the dependencies. It seems to work fine, up until I try to build it, then I get a segfault (from nix). Maybe it's just on my system. Here are things that can be tried.
You can try disabling the source-map, but if there really is an error in the dependencies generated then you have no idea what you will get after building. |
|
I have a branch here, just adding one commit to show what the build process with node2nix would be like For me running this results in a segfault. If it works on your machine, then you should be able to continue with it. |
|
Just a small update on this. It seems to me the only way here would be to go FOD. |
| # buildFlagsArray = '' | ||
| # -ldflags= | ||
| # -X ${goPackagePath}/model.BuildNumber=nixpkgs-${version} | ||
| # ''; |
There was a problem hiding this comment.
| # buildFlagsArray = '' | |
| # -ldflags= | |
| # -X ${goPackagePath}/model.BuildNumber=nixpkgs-${version} | |
| # ''; | |
| # ldflags = [ | |
| # "-X ${goPackagePath}/model.BuildNumber=nixpkgs-${version}" | |
| # ]; |
| platforms = platforms.unix; | ||
| }; | ||
|
|
||
| } |
There was a problem hiding this comment.
| platforms = platforms.unix; | |
| }; | |
| } | |
| }; | |
| } |
|
Ok, last update, I gave a shot to the FOD with the following expression the output hash changes, it's not reproducible. I think this should just be retried on future updates of mattermost, if the yarn vs npm behavior difference persists, perhaps something like npmlock2nix will solve it. |
|
@happysalada do you know what was the source of the hash changes? If you have two different builds and compare them, maybe it turns out that it's something simple to patch? |
|
I don't unfortunately, I never investigated further. |
Motivation for this change
I want to build mattermost webapp from source so I can patch it.
Things done
Trying to split mattermost up into server and webapp and build the webapp from source. Unfortunately, when I do this, the
npm run builddoes not output anything to dist, so I'm clearly doing something wrong.sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)