-
-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
mealie: init at 1.2.0 #278454
mealie: init at 1.2.0 #278454
Conversation
@ambroisie Can't add you as a reviewer, but here's the PR for mealie. Tried to fit Contributing, let me know if you see anything. Also: the package wasn't tested outside a systemd service, I don't really know yet if that would work directly from the |
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.
Took a first look at the module and package.
@ambroisie Thank you for the detailed review, tried to address it the best I could. |
I keep getting the error
when putting the package inside the |
@litchipi if you move it from The point of |
@ambroisie Made all the changes, CI is green, ready for a new round of review ! 🙂 |
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.
It's starting to look very good, please bear with me for some additional changes :-)
ExecStart = "${pkg.pythonPkg.gunicorn}/bin/gunicorn -b ${cfg.host}:${builtins.toString cfg.port} -k uvicorn.workers.UvicornWorker mealie.app:app"; | ||
StateDirectory = "mealie"; | ||
LogsDirectory = "mealie"; | ||
}; |
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.
One thing which is missing is a credentialsFile
option, I will refer you to my pyload PR as an example, but there should be plenty more in various modules.
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.
This seems unresolved. Is this needed?
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.
A credentialsFile
option was added in 4ebf2b5
(#278454).
Thank you @litchipi for putting so much more work into this than I had! 🚀 And also a big thanks to @ambroisie for the detailed review! 🙏🏻 I will take the code and deploy it on one of my servers on the weekend, and try to spot any problems with it. |
maintainers entry lgtm; @ambroisie feel free to ping me for a merger once this is ready. |
@ambroisie Thanks for the review, the coded looks so much cleaner now ! |
Just deployed this on my server and can confirm it's working as expected 👍🏻
|
Change was trivial, updated to latest |
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.
Small nits.
@@ -28,7 +28,7 @@ let | |||
|
|||
crfpp = stdenv.mkDerivation { | |||
pname = "mealie-crfpp"; | |||
version = "master"; | |||
version = "unstable-2024-02-12"; |
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.
The date should be the commit date.
version = "unstable-2024-02-12"; | |
version = "unstable-2021-10-10"; |
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.
Ah yes sorry, good catch
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.
You accidentally reverted this.
The changes proposed upstream has been merged. Squashed fixups into clean commits, ready to merge if you think it's good |
Yup, that's the way to go. |
@mweinelt Does this PR looks good for you ? 😃 |
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.
Only small stuff, thanks for asking.
@@ -0,0 +1,51 @@ | |||
src: version: | |||
{ lib, fetchYarnDeps, nodejs_18, prefetch-yarn-deps, stdenv }: stdenv.mkDerivation { |
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.
Is pinning the nodejs version necessary?
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.
Yes, on the unpinned version I got Expected version "^14.18.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0". Got "20.11.0"
pkgs/by-name/me/mealie/package.nix
Outdated
, fetchFromGitHub | ||
, fetchpatch | ||
, makeWrapper | ||
, python3 |
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.
Use python3Packages
instead. Apparently it works better for cross compilation. It maps to python3.pkgs
.
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.
I do not only need python3.pkgs
, I also require python3.sitePackages
, to do an override of packageOverrides
for pydantic, and call python3.interpreter
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.
Then use python3Packages.python.sitePackages
and python3Packages.python.interpreter
.
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.
Thanks, fixed it
pkgs/by-name/me/mealie/package.nix
Outdated
owner = "mealie-recipes"; | ||
repo = "crfpp"; | ||
rev = "c56dd9f29469c8a9f34456b8c0d6ae0476110516"; | ||
sha256 = "sha256-XNps3ZApU8m07bfPEnvip1w+3hLajdn9+L5+IpEaP0c="; |
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.
Generally, prefer hash over sha256, especially with SRI hashes.
ExecStart = "${pkg.pythonPkg.gunicorn}/bin/gunicorn -b ${cfg.host}:${builtins.toString cfg.port} -k uvicorn.workers.UvicornWorker mealie.app:app"; | ||
StateDirectory = "mealie"; | ||
LogsDirectory = "mealie"; | ||
}; |
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.
This seems unresolved. Is this needed?
@@ -81,6 +81,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m | |||
|
|||
- [systemd-lock-handler](https://git.sr.ht/~whynothugo/systemd-lock-handler/), a bridge between logind D-Bus events and systemd targets. Available as [services.systemd-lock-handler.enable](#opt-services.systemd-lock-handler.enable). | |||
|
|||
- [Mealie](https://nightly.mealie.io/), a self-hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in NuxtJS for a pleasant user experience for the whole family. Available as [services.mealie](#opt-services.mealie.enable) |
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.
REST is a fixed term. So you can say "REST API" instead of "RestAPI backend".
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.
Copy-pasted from the website, so I should maybe tell this to the creator as well 😅
@mweinelt Regarding #278454 (comment) The |
Made the changes and created clean commits |
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
I think we're now at the point where all major issues have been ironed out. Any further improvements can come in follow-up PRs. Thank you so much for sticking with us and pulling through @litchipi. Not everyone contributes such a high quality PR as their first contribution. |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-23.11
git worktree add -d .worktree/backport-278454-to-release-23.11 origin/release-23.11
cd .worktree/backport-278454-to-release-23.11
git switch --create backport-278454-to-release-23.11
git cherry-pick -x be1320f4285720b694ebb176b3d1c7d408de3b60 c1373dd3abaa278382a45b35b9bd42d38e963707 4ebf2b54b09589e35eccb1a565bfb124cb7d09ba ba9431edf8c436efebe139ebb7aa5182952078da aeb79caaf67e8aa73ac7b4b0a477f38b4d0cab09 |
Description of changes
Package request: #254260
Adds a new package
mealie
, with its NixOS module.Work mostly inspired from the work previously made by @fleaz, and tested on a Qemu VM setup before being ported here.
Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend
application built with NuxtJS for a pleasant user experience for the whole family.
Easily add recipes into your database by providing the URL and Mealie will automatically import the relevant data or add a family recipe with the UI editor.
(See more in homepage)
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)