diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pybrowsers/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pybrowsers/default.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pybrowsers/default.nix b/nixpkgs/pkgs/development/python-modules/pybrowsers/default.nix new file mode 100644 index 000000000000..07b686d2df69 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pybrowsers/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pythonOlder +, pyxdg +}: + +buildPythonPackage rec { + pname = "pybrowsers"; + version = "0.5.2"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "roniemartinez"; + repo = "browsers"; + rev = version; + hash = "sha256-bsmOUa33VzqWCv2jhu6oukdRhWfpkeAM3FBjiBBwjSQ="; + }; + + postPatch = '' + sed -i "/--cov/d" pyproject.toml + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + pyxdg + ]; + + # Tests want to interact with actual browsers + doCheck = false; + + pythonImportsCheck = [ + "browsers" + ]; + + meta = with lib; { + description = "Python library for detecting and launching browsers"; + homepage = "https://github.com/roniemartinez/browsers"; + changelog = "https://github.com/roniemartinez/browsers/releases/tag/${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} |