From c916ab72363cc6f19763def5da948530f22f8881 Mon Sep 17 00:00:00 2001 From: Ethan Carter Edwards Date: Sun, 28 Dec 2025 13:59:28 -0500 Subject: [PATCH] python3Packages.helium: init at 5.1.2 From ngipkgs Signed-off-by: Ethan Carter Edwards --- .../python-modules/helium/default.nix | 73 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 75 insertions(+) create mode 100644 pkgs/development/python-modules/helium/default.nix diff --git a/pkgs/development/python-modules/helium/default.nix b/pkgs/development/python-modules/helium/default.nix new file mode 100644 index 000000000000..2c73e9c642e3 --- /dev/null +++ b/pkgs/development/python-modules/helium/default.nix @@ -0,0 +1,73 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + selenium, + firefox, + geckodriver, + psutil, + pytestCheckHook, + which, + writableTmpDirAsHomeHook, + stdenv, +}: + +buildPythonPackage rec { + pname = "helium"; + version = "5.1.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "mherrmann"; + repo = "helium"; + tag = "v${version}"; + hash = "sha256-0XpXG4G9iANHZ5YPhHFtgQmCnug6PlmAdErCYgBLOgs="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + selenium + ]; + + nativeCheckInputs = [ + firefox + geckodriver + psutil + pytestCheckHook + which + writableTmpDirAsHomeHook + ]; + + # helium doesn't support testing on all platforms + doCheck = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64); + + # Selenium setup + preCheck = '' + export TEST_BROWSER=firefox + export SE_OFFLINE=true + ''; + + disabledTestPaths = [ + # All of the tests here fail, maybe because we force a driver to be found via envvars? + "tests/api/test_no_driver.py" + + # New tests, not sure why they fail. Maybe due to forced firefox? + "tests/api/test_write.py" + ]; + + pythonImportsCheck = [ + "helium" + ]; + + meta = { + description = "Lighter web automation with Python"; + homepage = "https://github.com/mherrmann/helium"; + changelog = "https://github.com/mherrmann/helium/releases/tag/v${version}"; + license = lib.licenses.mit; + teams = with lib.teams; [ ngi ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a2bbbc404c6b..e5d26f3c868e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6827,6 +6827,8 @@ self: super: with self; { helion = callPackage ../development/python-modules/helion { }; + helium = callPackage ../development/python-modules/helium { }; + help2man = callPackage ../development/python-modules/help2man { }; helpdev = callPackage ../development/python-modules/helpdev { };