depot/third_party/nixpkgs/pkgs/development/python-modules/pycookiecheat/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

77 lines
1.5 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
cryptography,
fetchFromGitHub,
keyring,
pytestCheckHook,
pythonOlder,
playwright,
setuptools,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "pycookiecheat";
version = "0.7.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "n8henrie";
repo = "pycookiecheat";
rev = "refs/tags/v${version}";
hash = "sha256-x568e4M7fz93hq0y06Grz9GlrjGV38GxWd+PhNiAyBY=";
};
pythonRelaxDeps = [
"cryptography"
"keyring"
];
build-system = [
setuptools
setuptools-scm
];
dependencies = [
cryptography
keyring
];
nativeCheckInputs = [
playwright
pytestCheckHook
];
pythonImportsCheck = [ "pycookiecheat" ];
preCheck = ''
export HOME=$(mktemp -d)
'';
disabledTests = [
# Tests want to use playwright executable
"test_fake_cookie"
"test_firefox_cookies"
"test_firefox_get_default_profile"
"test_firefox_no_cookies"
"test_load_firefox_cookie_db"
"test_no_cookies"
"test_warns_for_string_browser"
] ++ lib.optionals stdenv.isDarwin [ "test_slack_config" ];
meta = with lib; {
description = "Borrow cookies from your browser's authenticated session for use in Python scripts";
homepage = "https://github.com/n8henrie/pycookiecheat";
changelog = "https://github.com/n8henrie/pycookiecheat/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [
fab
n8henrie
];
};
}