Skip to content

Commit

Permalink
mealie: use pydantic_2
Browse files Browse the repository at this point in the history
In mealie v1.3.0, the dependency on pydantic was bumped from v1 to v2:
mealie-recipes/mealie#3134

Thus the workaround for using pydantic v1 can be removed.
  • Loading branch information
anoadragon453 committed May 6, 2024
1 parent 39d9c79 commit 202a100
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions pkgs/by-name/me/mealie/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ let

frontend = callPackage (import ./mealie-frontend.nix src version) { };

pythonpkgs = python3Packages.override {
overrides = self: super: {
pydantic = python3Packages.pydantic_1;
};
};
python = pythonpkgs.python;
python = python3Packages.python;

crfpp = stdenv.mkDerivation {
pname = "mealie-crfpp";
Expand All @@ -37,14 +32,14 @@ let
};
};

in pythonpkgs.buildPythonPackage rec {
in python3Packages.buildPythonPackage rec {
pname = "mealie";
inherit version src;
pyproject = true;

nativeBuildInputs = [
pythonpkgs.poetry-core
pythonpkgs.pythonRelaxDepsHook
python3Packages.poetry-core
python3Packages.pythonRelaxDepsHook
makeWrapper
];

Expand All @@ -53,7 +48,7 @@ in pythonpkgs.buildPythonPackage rec {
doCheck = false;
pythonRelaxDeps = true;

propagatedBuildInputs = with pythonpkgs; [
propagatedBuildInputs = with python3Packages; [
aiofiles
alembic
aniso8601
Expand Down Expand Up @@ -94,7 +89,7 @@ in pythonpkgs.buildPythonPackage rec {

postInstall = let
start_script = writeShellScript "start-mealie" ''
${lib.getExe pythonpkgs.gunicorn} "$@" -k uvicorn.workers.UvicornWorker mealie.app:app;
${lib.getExe python3Packages.gunicorn} "$@" -k uvicorn.workers.UvicornWorker mealie.app:app;
'';
init_db = writeShellScript "init-mealie-db" ''
${python.interpreter} $OUT/${python.sitePackages}/mealie/scripts/install_model.py
Expand Down

0 comments on commit 202a100

Please sign in to comment.