depot/third_party/nixpkgs/pkgs/development/python-modules/pybrowsers/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

44 lines
967 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pythonOlder,
pyxdg,
}:
buildPythonPackage rec {
pname = "pybrowsers";
version = "0.6.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "roniemartinez";
repo = "browsers";
rev = "refs/tags/${version}";
hash = "sha256-hjaQUfH7pNwC6+6liOUQQZU6NdhxLmtabvDD7JnQ3GU=";
};
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 ];
};
}