depot/third_party/nixpkgs/pkgs/development/python-modules/pybrowsers/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

49 lines
962 B
Nix

{ 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 ];
};
}