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
This commit is contained in:
Peter Hoeg 2018-12-06 13:05:27 +08:00
parent 547cd5bfd4
commit f9fc51c553

View File

@ -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";