about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2018-12-06 13:05:27 +0800
committerPeter Hoeg <peter@hoeg.com>2018-12-06 13:05:27 +0800
commitf9fc51c5533a4c9e0d99d6abedff86ea702acca9 (patch)
treeca4109e0f6dbdb8d73cb66bd0980b066dbce87c4 /pkgs/applications
parent547cd5bfd4fe47ce868394bdbf2e2020169d60dd (diff)
downloadnixlib-f9fc51c5533a4c9e0d99d6abedff86ea702acca9.tar
nixlib-f9fc51c5533a4c9e0d99d6abedff86ea702acca9.tar.gz
nixlib-f9fc51c5533a4c9e0d99d6abedff86ea702acca9.tar.bz2
nixlib-f9fc51c5533a4c9e0d99d6abedff86ea702acca9.tar.lz
nixlib-f9fc51c5533a4c9e0d99d6abedff86ea702acca9.tar.xz
nixlib-f9fc51c5533a4c9e0d99d6abedff86ea702acca9.tar.zst
nixlib-f9fc51c5533a4c9e0d99d6abedff86ea702acca9.zip
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
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/octoprint/plugins.nix30
1 files changed, 27 insertions, 3 deletions
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";