nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 pythonOlder,
7 setuptools,
8 aiohttp,
9 click,
10 construct,
11 pycryptodomex,
12 pytestCheckHook,
13 pytest-asyncio,
14 asynctest,
15}:
16
17buildPythonPackage rec {
18 pname = "pyps4-2ndscreen";
19 version = "1.3.1";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "ktnrg45";
24 repo = "pyps4-2ndscreen";
25 tag = version;
26 hash = "sha256-AXU9WJ7kT/0ev1Cn+CYhEieR7IM5VXebxQYWUS8bdds=";
27 };
28
29 patches = [
30 # https://github.com/ktnrg45/pyps4-2ndscreen/pull/61
31 (fetchpatch {
32 name = "replace-async-timeout-with-asyncio.timeout.patch";
33 url = "https://github.com/ktnrg45/pyps4-2ndscreen/commit/c3c89f9cce09d91e2b325474d28d7f1b3ccdf0f4.patch";
34 hash = "sha256-igLa+DUvQWUZtrHiq9UXTSG2h7cktElaXbTsxYPEeLM=";
35 })
36 ];
37
38 build-system = [ setuptools ];
39
40 dependencies = [
41 aiohttp
42 click
43 construct
44 pycryptodomex
45 ];
46
47 nativeCheckInputs = [
48 pytest-asyncio
49 pytestCheckHook
50 asynctest
51 ];
52
53 # Disable tests for Python 3.11+ since they all require asynctest
54 doCheck = pythonOlder "3.11";
55
56 pythonImportsCheck = [ "pyps4_2ndscreen" ];
57
58 meta = {
59 description = "PS4 2nd Screen Python Library";
60 homepage = "https://github.com/ktnrg45/pyps4-2ndscreen";
61 changelog = "https://github.com/ktnrg45/pyps4-2ndscreen/releases/tag/${version}";
62 license = lib.licenses.lgpl2Plus;
63 maintainers = [ lib.maintainers.jamiemagee ];
64 };
65}