-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: mattermost: split and build webapp from source #126629
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 build
does not output anything to dist, so I'm clearly doing something wrong.sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)