From f9fc51c5533a4c9e0d99d6abedff86ea702acca9 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 6 Dec 2018 13:05:27 +0800 Subject: octoprint-mqtt: init at 0.8.0 At the same time: - build plugins against python2 as that is what octoprint uses - do not run checks are there aren't any - use buildPythonPackage as these are not applications --- pkgs/applications/misc/octoprint/plugins.nix | 30 +++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'pkgs/applications') diff --git a/pkgs/applications/misc/octoprint/plugins.nix b/pkgs/applications/misc/octoprint/plugins.nix index bd65acf5e5e9..2e3bc058280a 100644 --- a/pkgs/applications/misc/octoprint/plugins.nix +++ b/pkgs/applications/misc/octoprint/plugins.nix @@ -1,8 +1,10 @@ -{ stdenv, fetchFromGitHub, octoprint, pythonPackages }: +{ stdenv, fetchFromGitHub, octoprint, python2Packages }: let - buildPlugin = args: pythonPackages.buildPythonApplication (args // { - buildInputs = (args.buildInputs or []) ++ [ octoprint ]; + buildPlugin = args: python2Packages.buildPythonPackage (args // { + propagatedBuildInputs = (args.propagatedBuildInputs or []) ++ [ octoprint ]; + # none of the following have tests + doCheck = false; }); self = { @@ -42,6 +44,28 @@ let }; }; + mqtt = buildPlugin rec { + name = "OctoPrint-MQTT-${version}"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "OctoPrint"; + repo = "OctoPrint-MQTT"; + rev = version; + sha256 = "1318pgwy39gkdqgll3q5lwm7avslgdwyiwb5v8m23cgyh5w8cjq7"; + }; + + propagatedBuildInputs = with python2Packages; [ paho-mqtt ]; + + meta = with stdenv.lib; { + homepage = https://github.com/OctoPrint/OctoPrint-MQTT; + description = "Publish printer status MQTT"; + platforms = platforms.all; + license = licenses.agpl3; + maintainers = with maintainers; [ peterhoeg ]; + }; + }; + titlestatus = buildPlugin rec { name = "OctoPrint-TitleStatus-${version}"; version = "0.0.4"; -- cgit 1.4.1