Unverified Commit ec68439b authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #257230 from fabaff/ha-mqtt-discoverable-cli

ha-mqtt-discoverable-cli: init at 0.2.1
parents 3c969a76 436e6e81
Loading
Loading
Loading
Loading
+41 −0
Original line number Diff line number Diff line
{ lib
, python3
, fetchFromGitHub
}:

python3.pkgs.buildPythonApplication rec {
  pname = "ha-mqtt-discoverable-cli";
  version = "0.2.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "unixorn";
    repo = "ha-mqtt-discoverable-cli";
    rev = "refs/tags/v${version}";
    hash = "sha256-miFlrBmxVuIJjpsyYnbQt+QAGSrS4sHlJpCmxouM2Wc=";
  };

  nativeBuildInputs = with python3.pkgs; [
    poetry-core
  ];

  propagatedBuildInputs = with python3.pkgs; [
    ha-mqtt-discoverable
  ];

  # Project has no real tests
  doCheck = false;

  pythonImportsCheck = [
    "ha_mqtt_discoverable_cli"
  ];

  meta = with lib; {
    description = "CLI for creating Home Assistant compatible MQTT entities that will be automatically discovered";
    homepage = "https://github.com/unixorn/ha-mqtt-discoverable-cli";
    changelog = "https://github.com/unixorn/ha-mqtt-discoverable-cli/releases/tag/v0.2.1";
    license = licenses.asl20;
    maintainers = with maintainers; [ fab ];
    mainProgram = "hmd";
  };
}
+40 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pythonOlder
}:

buildPythonPackage rec {
  pname = "gitlike-commands";
  version = "0.2.1";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "unixorn";
    repo = "gitlike-commands";
    rev = "refs/tags/v${version}";
    hash = "sha256-VjweN4gigzCNvg6TccZx2Xw1p7SusKplxUTZjItTQc0=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  # Module has no real tests
  doCheck = false;

  pythonImportsCheck = [
    "gitlike_commands"
  ];

  meta = with lib; {
    description = "Easy python module for creating git-style subcommand handling";
    homepage = "https://github.com/unixorn/gitlike-commands";
    changelog = "https://github.com/unixorn/gitlike-commands/releases/tag/v${version}";
    license = licenses.asl20;
    maintainers = with maintainers; [ fab ];
  };
}
+53 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, gitlike-commands
, paho-mqtt
, poetry-core
, pyaml
, pydantic
, pythonOlder
, thelogrus
}:

buildPythonPackage rec {
  pname = "ha-mqtt-discoverable";
  version = "0.10.0";
  pyproject = true;

  disabled = pythonOlder "3.10";

  src = fetchFromGitHub {
    owner = "unixorn";
    repo = "ha-mqtt-discoverable";
    rev = "refs/tags/v${version}";
    hash = "sha256-0a39KTLZw3Y2D0TXlKCmvVeNoXAN/uLXQGDlA9iM9J0=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    gitlike-commands
    paho-mqtt
    pyaml
    pydantic
    thelogrus
  ];

  # Test require a running Mosquitto instance
  doCheck = false;

  pythonImportsCheck = [
    "ha_mqtt_discoverable"
  ];

  meta = with lib; {
    description = "Python module to create MQTT entities that are automatically discovered by Home Assistant";
    homepage = "https://github.com/unixorn/ha-mqtt-discoverable";
    changelog = "https://github.com/unixorn/ha-mqtt-discoverable/releases/tag/v${version}";
    license = licenses.asl20;
    maintainers = with maintainers; [ fab ];
  };
}
+47 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, dateutils
, fetchFromGitHub
, poetry-core
, pyaml
, pythonOlder
}:

buildPythonPackage rec {
  pname = "thelogrus";
  version = "0.7.0";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "unixorn";
    repo = "thelogrus";
    rev = "refs/tags/v${version}";
    hash = "sha256-96/EjDh5XcTsfUcTnsltsT6LMYbyKuM/eNyeq2Pukfo=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    dateutils
    pyaml
  ];

  # Module has no unit tests
  doCheck = false;

  pythonImportsCheck = [
    "thelogrus"
  ];

  meta = with lib; {
    description = "Python 3 version of logrus";
    homepage = "https://github.com/unixorn/thelogrus";
    changelog = "https://github.com/unixorn/thelogrus/blob/${version}/ChangeLog.md";
    license = licenses.asl20;
    maintainers = with maintainers; [ fab ];
  };
}
+6 −0
Original line number Diff line number Diff line
@@ -4382,6 +4382,8 @@ self: super: with self; {
  gitignore-parser = callPackage ../development/python-modules/gitignore-parser { };
  gitlike-commands = callPackage ../development/python-modules/gitlike-commands { };
  gitpython = callPackage ../development/python-modules/gitpython { };
  glad =  callPackage ../development/python-modules/glad { };
@@ -4803,6 +4805,8 @@ self: super: with self; {
  ha-ffmpeg = callPackage ../development/python-modules/ha-ffmpeg { };
  ha-mqtt-discoverable = callPackage ../development/python-modules/ha-mqtt-discoverable { };
  ha-philipsjs = callPackage ../development/python-modules/ha-philipsjs{ };
  hahomematic = callPackage ../development/python-modules/hahomematic { };
@@ -12904,6 +12908,8 @@ self: super: with self; {
  thefuzz = callPackage ../development/python-modules/thefuzz { };
  thelogrus = callPackage ../development/python-modules/thelogrus { };
  thermobeacon-ble = callPackage ../development/python-modules/thermobeacon-ble { };
  thermopro-ble = callPackage ../development/python-modules/thermopro-ble { };