-
Notifications
You must be signed in to change notification settings - Fork 18
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
Flarum #10
Comments
@ngi-nix/moss is claiming this |
We used composer2nix on the output of We need to find a way to include |
Not sure why you would need to merge sources for that. What you may want instead – but I could be completely wrong – is a helper script in the devshell that checks out the source into a tempdir, runs |
@fricklerhandwerk I opened a PR with our WIP branch so far. The line in particular that is making us think we need to merge sources is #23 (comment)
Sorry if I'm misunderstanding, but is the helper script you're suggesting something we'd run manually when we need to update |
@fricklerhandwerk Oh also, do you have a contact at the flarum project in case we have additional questions or do you recommend just opening an issue on their repo? No one in our mob is that familiar with the php ecosystem and their best practices, so being able to get more context would be helpful. |
Yes, it would have to be run manually. As said, it will be IFD if you make it part of the build, because you'll first have to realise the derivation with the source definitions before you can continue evaluating the actual package definition. I just assume we don't want IFD in a monorepo, as the repo's expression may grow arbitrarily large and we'd quickly run into issues with evaluation time. Right, @cleeyv?
No. I suggest getting in touch with developers directly and only then open issues. We don't know if they are interested in collaboration and don't want to force Nix on them if they don't care. I did not manage to contact everyone, but I'll continue collecting contextual information for you when I get to it. |
Disclaimer: braindump for @ngi-nix/moss , please ignore if you're not in @ngi-nix/moss Notes from July 24 mob session:
|
Yes, my work on the CI is quickly surfacing problems with IFDs since there is already one there for mach-nix in the liberaforms package. There are evaluation-time performance impacts, as you say, but also other problems (explained in #24). I understand why nixpkgs doesn't allow them and I think it could be prudent to consider this rule for ngipkgs as well. @albertchae while you're considering options for packaging Flarum, you may want to check out this PR on nixpkgs for a new builder for PHP Composer-based applications: NixOS/nixpkgs#225401 It is marked as a draft, but reading the comments it sounds like it is pretty late in the process, and ready to be tested. It would be cool if you could use Flarum to do a test of this the builder and give feedback for the PR review process. And even if you don't test it out, the comments on the PR seem like they could provide relevant background info for your work on the Flarum packaging. |
@cleeyv Thanks! Coincidentally we also came across NixOS/nixpkgs#225401 right after we wrote our brain dump, so trying that out will probably be the focus of our remaining mob sessions this week. |
Disclaimer: braindump for https://github.com/orgs/ngi-nix/teams/moss , please ignore if you're not in https://github.com/orgs/ngi-nix/teams/moss After realising that composer2nix doesn't work without a composer.lock file, we decided upon the builder from this PR. We created a second branch We followed the pattern of |
Cross-posted from a parallel conversation over in issue #24:
Based on a quick look through the flarum documentation, I get the impression that in theory it could be run on MacOS but since that server hardware is relatively rare/expensive, practically it is much more likely to be run in production on linux. However, since MacOS is way more common for dev machines, they do mention in their section on Development Tools the use of tools like Laravel Valet to do local dev on Flarum. Based on this, I can imagine the usefulness of a dev shell / local deployment config of some kind for darwin. Though it also sounds like you've already been supporting that use case on x86_64-linux with lima which maybe is simpler. I'm curious to hear if you have further thoughts on this (I'm going to cross-post this over to the flarum issue as well). |
Disclaimer: braindump for https://github.com/orgs/ngi-nix/teams/moss , please ignore if you're not in https://github.com/orgs/ngi-nix/teams/moss Moss mob status update for 2023-07-27
|
Yes, seeing if we can get NixOS tests working on our hydra instance is one of the top priorities for further improvement to ngipkgs. The timing is unfortunate that I'm going to be away for the next two weeks so won't be able to work on it soon, but there should be progress on this later in August.
When I was a Summer of Nix participant in past years, we did this kind of flake deployment to digital ocean using deploy-rs and it worked pretty well. The main difference is that at that time each project had its own repo and flake, so a similar use of deploy-rs would still need to be tested on ngipkgs. I created an issue for work on this: #22.
When it was in its own liberaforms-flake repo, we deployed liberaforms in two ways: with deploy-rs to digital ocean, and with nixos-container to a local container. On the old repo, these two methods are documented here: https://github.com/ngi-nix/liberaforms-flake/tree/main/docs Since the migration to ngipkgs, so far we have only implemented deployment with nixos-container, and that is confirmed to be working. Well, there is currently some error with liberaforms when deployed to a local container (the web app doesn't properly load in the browser), but it is an error page that is generated by liberaforms so we know the build and deployment and system configuration aspects are all working at least. An advantage of trying to do the same kind of nixos-container deployment with flarum as well is that you could more directly model it on the currently working liberaforms example in ngipkgs.
A separate repository for each project was the old way things were organized for nix packaging at NGI, and for Summer of Nix. This year it was decided to consolidate all of the packaging work into a single monorepo, ngipkgs. Your use of it here for flarum is experimental, and we're all learning along the way. As the the program progresses, these questions of how to use ngipkgs will become more clear. |
Yes, seeing if we can get NixOS tests working on our hydra instance is one of the top priorities for further improvement to ngipkgs. The timing is unfortunate that I'm going to be away for the next two weeks so won't be able to work on it soon, but there should be progress on this later in August.
awesome!
When I was a Summer of Nix participant in past years, we did this kind of flake deployment to digital ocean using deploy-rs and it worked pretty well. The main difference is that at that time each project had its own repo and flake, so a similar use of deploy-rs would still need to be tested on ngipkgs. I created an issue for work on this: #22.
thanks for the pointer; based on https://github.com/ngi-nix/deploy-liberaforms
i've migrated our shared DO deployment to use `deploy-rs` rather than the
flakes-incompatible `morph`. this live system should be enough if we
eventually run a non-containerized instance of Flarum.
When it was in its own liberaforms-flake repo, we deployed liberaforms in two ways: with deploy-rs to digital ocean, and with nixos-container to a local container. On the old repo, these two methods are documented here: https://github.com/ngi-nix/liberaforms-flake/tree/main/docs
Since the migration to ngipkgs, so far we have only implemented deployment with nixos-container, and that is confirmed to be working. Well, there is currently some error with liberaforms when deployed to a local container (the web app doesn't properly load in the browser), but it is an error page that is generated by liberaforms so we know the build and deployment and system configuration aspects are all working at least.
An advantage of trying to do the same kind of nixos-container deployment with flarum as well is that you could more directly model it on the currently working liberaforms example in ngipkgs.
ah yeah, the nixos-container documentation in the README should be a
starting point for a similar smoke test with Flarum. RTFM :)
A separate repository for each project was the old way things were organized for nix packaging at NGI, and for Summer of Nix. This year it was decided to consolidate all of the packaging work into a single monorepo, ngipkgs. Your use of it here for flarum is experimental, and we're all learning along the way. As the the program progresses, these questions of how to use ngipkgs will become more clear.
we found #12 shortly after which
provided more historical context to the in-progress monorepo migration.
we'll document our progress with the module development for others
packaging modules here.
|
Closes #10 Uses buildComposerProject from currently unmerged NixOS/nixpkgs#225401 Co-authored-by: Jason Odoom <[email protected]> Co-authored-by: Anish Lakhwara <[email protected]> Co-authored-by: Dominic Mills <[email protected]> Co-authored-by: Albert Chae <[email protected]> Co-authored-by: Jack Leightcap <>
Closes #10 Uses buildComposerProject from currently unmerged NixOS/nixpkgs#225401 Co-authored-by: Jason Odoom <[email protected]> Co-authored-by: Anish Lakhwara <[email protected]> Co-authored-by: Dominic Mills <[email protected]> Co-authored-by: Albert Chae <[email protected]> Co-authored-by: Jack Leightcap <>
Closes #10 Uses buildComposerProject from currently unmerged NixOS/nixpkgs#225401 Co-authored-by: Jason Odoom <[email protected]> Co-authored-by: Anish Lakhwara <[email protected]> Co-authored-by: Dominic Mills <[email protected]> Co-authored-by: Albert Chae <[email protected]> Co-authored-by: Jack Leightcap <[email protected]>
Closes #10 Uses buildComposerProject from currently unmerged NixOS/nixpkgs#225401 Co-authored-by: Jason Odoom <[email protected]> Co-authored-by: Anish Lakhwara <[email protected]> Co-authored-by: Dominic Mills <[email protected]> Co-authored-by: Albert Chae <[email protected]> Co-authored-by: Jack Leightcap <[email protected]>
Closes #10 Uses buildComposerProject from currently unmerged NixOS/nixpkgs#225401 Co-authored-by: Jason Odoom <[email protected]> Co-authored-by: Anish Lakhwara <[email protected]> Co-authored-by: Dominic Mills <[email protected]> Co-authored-by: Albert Chae <[email protected]> Co-authored-by: Jack Leightcap <[email protected]> Signed-off-by: Jack Leightcap <[email protected]>
Closes #10 Uses buildComposerProject from currently unmerged NixOS/nixpkgs#225401 Co-authored-by: Jason Odoom <[email protected]> Co-authored-by: Anish Lakhwara <[email protected]> Co-authored-by: Dominic Mills <[email protected]> Co-authored-by: Albert Chae <[email protected]> Co-authored-by: Jack Leightcap <[email protected]> Signed-off-by: Jack Leightcap <[email protected]>
Closes #10 Uses buildComposerProject from currently unmerged NixOS/nixpkgs#225401 Co-authored-by: Jason Odoom <[email protected]> Co-authored-by: Anish Lakhwara <[email protected]> Co-authored-by: Dominic Mills <[email protected]> Co-authored-by: Albert Chae <[email protected]> Co-authored-by: Jack Leightcap <[email protected]> Signed-off-by: Jack Leightcap <[email protected]>
Closes #10 Uses buildComposerProject from currently unmerged NixOS/nixpkgs#225401 Co-authored-by: Jason Odoom <[email protected]> Co-authored-by: Anish Lakhwara <[email protected]> Co-authored-by: Dominic Mills <[email protected]> Co-authored-by: Albert Chae <[email protected]> Co-authored-by: Jack Leightcap <[email protected]> Signed-off-by: Jack Leightcap <[email protected]>
Note: the Flarum module seems to revolve around a root but for the moment we're attempting to get working Flarum instance using a raw string. |
Putting this on pause for the moment, with the package finished we're waiting for direction on module definitions and testing. |
I see that moss is working on this again in https://github.com/ngi-nix/ngipkgs/tree/moss-flarum-module-rebased-on-pretalx , that you were previously trying to do testing with a deploy-rs to a cloud instance (as discussed in #22), and that algae has shared their local testing approach using nixos-test (#28). I will just add that nixos-container is another option that can be used for a similar kind of local testing and the |
We're working on getting the Flarum module running. |
FWIW, instead of fiddling around with permissions explicitly, consider the following options: |
Turns out #10 (comment) was a red herring due to the install oneshot service running multiple times due to downstream services failing and retrying |
flarum has been upstreamed to nixpkgs in NixOS/nixpkgs#311608 so it should also be a candidate for #76 |
Flarum is a technically advanced, open and extensible discussion platform. Flarum aims to bring people interaction to a new level by how it is designed and engineered.
This project is very much alive, with a large user base, and not packaged anywhere. Providing a turnkey service module for self-hosting is a high-value target.
The text was updated successfully, but these errors were encountered: