diff --git a/pkgs/development/python-modules/pypck/default.nix b/pkgs/development/python-modules/pypck/default.nix new file mode 100644 index 00000000000..f8e6cc96aff --- /dev/null +++ b/pkgs/development/python-modules/pypck/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytest-asyncio +, pytest-cov +, pytest-timeout +, pytestCheckHook +, pythonOlder +, stdenv +}: + +buildPythonPackage rec { + pname = "pypck"; + version = "0.7.8"; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "alengwenus"; + repo = pname; + rev = version; + sha256 = "06yqyqpzpypid27z31prvsp7nzpjqzn7gjlfqwjhhxl8fdgh8hkr"; + }; + + checkInputs = [ + pytest-asyncio + pytest-cov + pytest-timeout + pytestCheckHook + ]; + + disabledTests = lib.optionals stdenv.isDarwin [ + "test_connection_lost" + ]; + + __darwinAllowLocalNetworking = true; + + pythonImportsCheck = [ "pypck" ]; + + meta = with lib; { + description = "LCN-PCK library written in Python"; + homepage = "https://github.com/alengwenus/pypck"; + license = with licenses; [ epl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 374150d538d..d2b8aec6c0d 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -428,7 +428,7 @@ "lannouncer" = ps: with ps; [ ]; "lastfm" = ps: with ps; [ pylast ]; "launch_library" = ps: with ps; [ ]; # missing inputs: pylaunches - "lcn" = ps: with ps; [ ]; # missing inputs: pypck + "lcn" = ps: with ps; [ pypck ]; "lg_netcast" = ps: with ps; [ ]; # missing inputs: pylgnetcast-homeassistant "lg_soundbar" = ps: with ps; [ ]; # missing inputs: temescal "life360" = ps: with ps; [ ]; # missing inputs: life360 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ce7daebb872..aba2d3fc773 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5600,6 +5600,8 @@ in { pypcap = callPackage ../development/python-modules/pypcap { }; + pypck = callPackage ../development/python-modules/pypck { }; + pypdf2 = callPackage ../development/python-modules/pypdf2 { }; pyPdf = callPackage ../development/python-modules/pypdf { };