From fc0b15b696152c5c5ef1573f3cdbfde74f009e30 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 8 Jul 2021 02:14:36 +0200 Subject: [PATCH] octoprint: update zeroconf override Required so it still works with the latest changes to the derivation. Does not make octoprint build, this would require further overrides around the flask/werkzeug ecosystem. --- pkgs/applications/misc/octoprint/default.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/misc/octoprint/default.nix b/pkgs/applications/misc/octoprint/default.nix index 750043d4a9e..d7393313c15 100644 --- a/pkgs/applications/misc/octoprint/default.nix +++ b/pkgs/applications/misc/octoprint/default.nix @@ -50,19 +50,25 @@ let } ) - # Octoprint needs zeroconf >=0.24 <0.25. While this should be done in - # the mkOverride aboves, this package also has broken tests, so we need - # a proper override. + # Octoprint needs zeroconf >=0.24 <0.25. This can't be done via mkOverride, because in zeroconf 0.32 + # the super package was migrated to fetchFromGitHub. ( self: super: { zeroconf = super.zeroconf.overrideAttrs (oldAttrs: rec { version = "0.24.5"; - src = oldAttrs.src.override { + src = super.fetchPypi { + inherit (oldAttrs) pname; inherit version; sha256 = "0jpgd0rk91si93857mjrizan5gc42kj1q4fi4160qgk68la88fl9"; }; - buildInputs = [ self.nose ]; - checkPhase = "nosetests"; + pythonImportsCheck = [ + "zeroconf" + ]; + buildInputs = with self; [ + pytestCheckHook + nose + ]; + pytestFlagsArray = [ "zeroconf/test.py" ]; }); } )