Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pycookiecheat / default.nix
blob4a539f5ee191c4acf1e4e677d12cbfe6857b8e8f
1 { stdenv
2 , lib
3 , buildPythonPackage
4 , cryptography
5 , fetchFromGitHub
6 , keyring
7 , pytestCheckHook
8 , pythonOlder
9 , pythonRelaxDepsHook
10 , playwright
11 , setuptools
12 , setuptools-scm
15 buildPythonPackage rec {
16   pname = "pycookiecheat";
17   version = "0.6.0";
18   format = "pyproject";
20   disabled = pythonOlder "3.7";
22   src = fetchFromGitHub {
23     owner = "n8henrie";
24     repo = "pycookiecheat";
25     rev = "refs/tags/v${version}";
26     hash = "sha256-mSc5FqMM8BICVEdSdsIny9Bnk6qCRekPk4RkBusDoVA=";
27   };
29   pythonRelaxDeps = [
30     "cryptography"
31     "keyring"
32   ];
34   nativeBuildInputs = [
35     pythonRelaxDepsHook
36     setuptools
37     setuptools-scm
38   ];
40   propagatedBuildInputs = [
41     cryptography
42     keyring
43   ];
45   nativeCheckInputs = [
46     playwright
47     pytestCheckHook
48   ];
50   pythonImportsCheck = [
51     "pycookiecheat"
52   ];
54   preCheck = ''
55     export HOME=$(mktemp -d)
56   '';
58   disabledTests = [
59     # Tests want to use playwright executable
60     "test_no_cookies"
61     "test_fake_cookie"
62     "test_firefox_cookies"
63     "test_load_firefox_cookie_db"
64     "test_firefox_no_cookies"
65     "test_firefox_get_default_profile"
66   ] ++ lib.optionals stdenv.isDarwin [
67     "test_slack_config"
68   ];
70   meta = with lib; {
71     description = "Borrow cookies from your browser's authenticated session for use in Python scripts";
72     homepage = "https://github.com/n8henrie/pycookiecheat";
73     changelog = "https://github.com/n8henrie/pycookiecheat/blob/v${version}/CHANGELOG.md";
74     license = licenses.mit;
75     maintainers = with maintainers; [ fab ];
76   };