Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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 13}: 14 15buildPythonPackage rec { 16 pname = "pycookiecheat"; 17 version = "0.5.0"; 18 format = "pyproject"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = "n8henrie"; 24 repo = "pycookiecheat"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-3I7iw/dwF4lRqmVM3OR402InZCFoV9gzKpRQrx4F9KA="; 27 }; 28 29 pythonRelaxDeps = [ 30 "cryptography" 31 "keyring" 32 ]; 33 34 nativeBuildInputs = [ 35 pythonRelaxDepsHook 36 setuptools 37 setuptools-scm 38 ]; 39 40 propagatedBuildInputs = [ 41 cryptography 42 keyring 43 ]; 44 45 nativeCheckInputs = [ 46 playwright 47 pytestCheckHook 48 ]; 49 50 pythonImportsCheck = [ 51 "pycookiecheat" 52 ]; 53 54 disabledTests = [ 55 # Tests want to use playwright executable 56 "test_no_cookies" 57 "test_fake_cookie" 58 ] ++ lib.optionals stdenv.isDarwin [ 59 "test_slack_config" 60 ]; 61 62 meta = with lib; { 63 description = "Borrow cookies from your browser's authenticated session for use in Python scripts"; 64 homepage = "https://github.com/n8henrie/pycookiecheat"; 65 changelog = "https://github.com/n8henrie/pycookiecheat/blob/v${version}/CHANGELOG.md"; 66 license = licenses.mit; 67 maintainers = with maintainers; [ fab ]; 68 }; 69}