11 # To include additional plugins, pass them here as an overlay.
12 , packageOverrides ? self: super: { }
16 py = python3.override {
18 packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) (
21 # Due to flask > 2.3 the login will not work
23 werkzeug = super.werkzeug.overridePythonAttrs (oldAttrs: rec {
25 format = "setuptools";
29 hash = "sha256-LhzMlBfU2jWLnebxdOOsCUOR6h1PvvLWZ4ZdgZ39Cv4=";
32 flask = super.flask.overridePythonAttrs (oldAttrs: rec {
34 format = "setuptools";
38 hash = "sha256-7e6bCn/yZiG9WowQ/0hK4oc3okENmbC7mmhQx/uXeqA=";
47 octoprint-filecheck = self.buildPythonPackage rec {
48 pname = "OctoPrint-FileCheck";
49 version = "2021.2.23";
51 src = fetchFromGitHub {
53 repo = "OctoPrint-FileCheck";
55 sha256 = "sha256-e/QGEBa9+pjOdrZq3Zc6ifbSMClIyeTOi0Tji0YdVmI=";
65 octoprint-firmwarecheck = self.buildPythonPackage rec {
66 pname = "OctoPrint-FirmwareCheck";
67 version = "2021.10.11";
69 src = fetchFromGitHub {
71 repo = "OctoPrint-FirmwareCheck";
73 hash = "sha256-wqbD82bhJDrDawJ+X9kZkoA6eqGxqJc1Z5dA0EUwgEI=";
82 octoprint-pisupport = self.buildPythonPackage rec {
83 pname = "OctoPrint-PiSupport";
84 version = "2023.5.24";
85 format = "setuptools";
87 src = fetchFromGitHub {
89 repo = "OctoPrint-PiSupport";
91 hash = "sha256-KfkZXJ2f02G2ee+J1w+YQRKz+LSWwxVIIwmdevDGhew=";
94 # requires octoprint itself during tests
97 substituteInPlace octoprint_pi_support/__init__.py \
98 --replace /usr/bin/vcgencmd ${self.pkgs.libraspberrypi}/bin/vcgencmd
106 octoprint = self.buildPythonPackage rec {
110 src = fetchFromGitHub {
114 hash = "sha256-71uE8JvcS++xH8WSVWj5x0+9s3XIwf3A64c6YtxpSRc=";
117 propagatedBuildInputs = with self; [
141 octoprint-firmwarecheck
167 ] ++ lib.optionals stdenv.isDarwin [
169 ] ++ lib.optionals (!stdenv.isDarwin) [
173 nativeCheckInputs = with self; [
180 # substitute pip and let it find out, that it can't write anywhere
182 src = ./pip-path.patch;
183 pip = "${self.pip}/bin/pip";
186 # hardcore path to ffmpeg and hide related settings
188 src = ./ffmpeg-path.patch;
189 ffmpeg = "${pkgs.ffmpeg}/bin/ffmpeg";
195 ignoreVersionConstraints = [
215 ${lib.concatStringsSep "\n" (
218 ''-e 's@${e}[<>=]+.*@${e}",@g' \''
219 ) ignoreVersionConstraints
224 dontUseSetuptoolsCheck = true;
227 export HOME=$(mktemp -d)
232 "test_check_setup" # Why should it be able to call pip?
233 ] ++ lib.optionals stdenv.isDarwin [
234 "test_set_external_modification"
238 inherit (self) python;
239 updateScript = nix-update-script { };
241 plugins = (callPackage ./plugins.nix { }) super self;
242 inherit (nixosTests) octoprint;
247 homepage = "https://octoprint.org/";
248 description = "The snappy web interface for your 3D printer";
249 license = licenses.agpl3Only;
250 maintainers = with maintainers; [ abbradar gebner WhittlesJr gador ];
255 (callPackage ./plugins.nix { })
261 with py.pkgs; toPythonApplication octoprint