From 030bdd2e03c1062c4e58a648da905da946944c20 Mon Sep 17 00:00:00 2001 From: Florian Brandes Date: Tue, 30 May 2023 19:41:52 +0200 Subject: [PATCH] octoprint: 1.8.7 -> 1.9.0 Signed-off-by: Florian Brandes --- pkgs/applications/misc/octoprint/default.nix | 49 +++---------------- .../misc/octoprint/ffmpeg-path.patch | 25 ++-------- 2 files changed, 10 insertions(+), 64 deletions(-) diff --git a/pkgs/applications/misc/octoprint/default.nix b/pkgs/applications/misc/octoprint/default.nix index 1af2571e48a2..6c631ad3130f 100644 --- a/pkgs/applications/misc/octoprint/default.nix +++ b/pkgs/applications/misc/octoprint/default.nix @@ -4,7 +4,6 @@ , lib , fetchFromGitHub , python3 -, fetchPypi , substituteAll , nix-update-script , nixosTests @@ -17,43 +16,6 @@ let self = py; packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ( [ - ( - # with version 3 of flask-limiter octoprint 1.8.7 fails to start with - # TypeError: Limiter.__init__() got multiple values for argument 'key_func' - self: super: { - flask-limiter = super.flask-limiter.overridePythonAttrs (oldAttrs: rec { - version = "2.6.2"; - src = fetchFromGitHub { - owner = "alisaifee"; - repo = "flask-limiter"; - rev = version; - sha256 = "sha256-eWOdJ7m3cY08ASN/X+7ILJK99iLJJwCY8294fwJiDew="; - }; - }); - flask-babel = super.flask-babel.overridePythonAttrs (oldAttrs: rec { - version = "2.0.0"; - src = fetchPypi { - pname = "Flask-Babel"; - inherit version; - sha256 = "sha256-+fr0XNsuGjLqLsFEA1h9QpUQjzUBenghorGsuM/ZJX0="; - }; - nativeBuildInputs = [ ]; - format = "setuptools"; - outputs = [ "out" ]; - patches = [ ]; - }); - # downgrade needed for flask-babel 2.0.0 - babel = super.babel.overridePythonAttrs (oldAttrs: rec { - version = "2.11.0"; - src = fetchPypi { - pname = "Babel"; - inherit version; - hash = "sha256-XvSzImsBgN7d7UIpZRyLDho6aig31FoHMnLzE+TPl/Y="; - }; - propagatedBuildInputs = [ self.pytz ]; - }); - } - ) # Built-in dependency ( self: super: { @@ -94,14 +56,14 @@ let self: super: { octoprint-pisupport = self.buildPythonPackage rec { pname = "OctoPrint-PiSupport"; - version = "2022.6.13"; + version = "2023.5.24"; format = "setuptools"; src = fetchFromGitHub { owner = "OctoPrint"; repo = "OctoPrint-PiSupport"; rev = version; - hash = "sha256-3z5Btl287W3j+L+MQG8FOWt21smML0vpmu9BP48B9A0="; + hash = "sha256-KfkZXJ2f02G2ee+J1w+YQRKz+LSWwxVIIwmdevDGhew="; }; # requires octoprint itself during tests @@ -118,13 +80,13 @@ let self: super: { octoprint = self.buildPythonPackage rec { pname = "OctoPrint"; - version = "1.8.7"; + version = "1.9.0"; src = fetchFromGitHub { owner = "OctoPrint"; repo = "OctoPrint"; rev = version; - hash = "sha256-g4PYB9YbkX0almRPgMFlb8D633Y5fc3H+Boa541suqc="; + hash = "sha256-gTWQSqgksZMxdaZ7V3hmnqXlZ+OMI86RX0lC8z1AEzI="; }; propagatedBuildInputs = with self; [ @@ -176,6 +138,8 @@ let wrapt zeroconf zipstream-ng + class-doc + pydantic ] ++ lib.optionals stdenv.isDarwin [ py.pkgs.appdirs ]; @@ -217,6 +181,7 @@ let "werkzeug" "flask" "Flask-Limiter" + "blinker" ]; in '' diff --git a/pkgs/applications/misc/octoprint/ffmpeg-path.patch b/pkgs/applications/misc/octoprint/ffmpeg-path.patch index 7ba468ae1a3f..2e7c7dbe0642 100644 --- a/pkgs/applications/misc/octoprint/ffmpeg-path.patch +++ b/pkgs/applications/misc/octoprint/ffmpeg-path.patch @@ -1,30 +1,11 @@ -diff --git a/src/octoprint/plugins/corewizard/templates/corewizard_webcam_wizard.jinja2 b/src/octoprint/plugins/corewizard/templates/corewizard_webcam_wizard.jinja2 -index 79342dcd7..6165a4119 100644 ---- a/src/octoprint/plugins/corewizard/templates/corewizard_webcam_wizard.jinja2 -+++ b/src/octoprint/plugins/corewizard/templates/corewizard_webcam_wizard.jinja2 -@@ -29,14 +29,3 @@ - {% include "snippets/settings/webcam/webcamStreamUrl.jinja2" %} - {% include "snippets/settings/webcam/webcamSnapshotUrl.jinja2" %} - -- --

{{ _('Timelapse Recordings') }}

-- --{% trans %}

-- To render the snapshots into timelapse recordings, OctoPrint also needs to -- know the correct path to FFMPEG. --

{% endtrans %} -- --
-- {% include "snippets/settings/webcam/ffmpegPath.jinja2" %} --
diff --git a/src/octoprint/server/api/settings.py b/src/octoprint/server/api/settings.py index c3e6cea10..ced2f8fa0 100644 --- a/src/octoprint/server/api/settings.py +++ b/src/octoprint/server/api/settings.py -@@ -130,7 +130,7 @@ def getSettings(): - "snapshotUrl": s.get(["webcam", "snapshot"]), +@@ -130,7 +130,7 @@ data["webcam"] = { + "webcamEnabled": s.getBoolean(["webcam", "webcamEnabled"]), "snapshotTimeout": s.getInt(["webcam", "snapshotTimeout"]), - "snapshotSslValidation": s.getBoolean(["webcam", "snapshotSslValidation"]), + "timelapseEnabled": s.getBoolean(["webcam", "timelapseEnabled"]), - "ffmpegPath": s.get(["webcam", "ffmpeg"]), + "ffmpegPath": "@ffmpeg@", "ffmpegCommandline": s.get(["webcam", "ffmpegCommandline"]),