mealie: modernize

This commit is contained in:
Robert Schütz 2024-08-10 12:57:03 -07:00
parent bef98989a2
commit 9318bf784c

View File

@ -41,22 +41,21 @@ let
};
in
pythonpkgs.buildPythonPackage rec {
pythonpkgs.buildPythonApplication rec {
pname = "mealie";
inherit version src;
pyproject = true;
nativeBuildInputs = [
pythonpkgs.poetry-core
makeWrapper
];
build-system = with pythonpkgs; [ poetry-core ];
nativeBuildInputs = [ makeWrapper ];
dontWrapPythonPrograms = true;
doCheck = false;
pythonRelaxDeps = true;
propagatedBuildInputs = with pythonpkgs; [
dependencies = with pythonpkgs; [
aiofiles
alembic
aniso8601
@ -121,19 +120,17 @@ pythonpkgs.buildPythonPackage rec {
--replace-fail 'script_location = alembic' 'script_location = ${src}/alembic'
makeWrapper ${start_script} $out/bin/mealie \
--set PYTHONPATH "$out/${python.sitePackages}:${python.pkgs.makePythonPath propagatedBuildInputs}" \
--set PYTHONPATH "$out/${python.sitePackages}:${pythonpkgs.makePythonPath dependencies}" \
--set LD_LIBRARY_PATH "${crfpp}/lib" \
--set STATIC_FILES "${frontend}" \
--set PATH "${lib.makeBinPath [ crfpp ]}"
makeWrapper ${init_db} $out/libexec/init_db \
--set PYTHONPATH "$out/${python.sitePackages}:${python.pkgs.makePythonPath propagatedBuildInputs}" \
--set PYTHONPATH "$out/${python.sitePackages}:${pythonpkgs.makePythonPath dependencies}" \
--set OUT "$out"
'';
checkInputs = with python.pkgs; [
pytestCheckHook
];
nativeCheckInputs = with pythonpkgs; [ pytestCheckHook ];
passthru.tests = {
inherit (nixosTests) mealie;