1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch2,
6 requests,
7 setuptools,
8 pytestCheckHook,
9}:
10
11buildPythonPackage {
12 pname = "yarg";
13 version = "0.1.9-unstable-2022-02-06";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "kura";
18 repo = "yarg";
19 # Latest commit to yarg, which is more up-to-date than the latest release.
20 rev = "46e2371906bde6e19116664d4841abab414c54fd";
21 hash = "sha256-N/NDc9GqqwqU9vD1BU6udthzewBMDji9Np/HKRffLxI=";
22 };
23
24 patches = [
25 # Python 3.12 compatibility patch
26 (fetchpatch2 {
27 url = "https://github.com/kura/yarg/commit/8d5532e4da11ab0e9a4453658cf0591dcf80a616.patch?full_index=1";
28 hash = "sha256-2lbOzEfWTtoZYuRjCQJAFeYUsJoQhhEohflvYOwLXnI=";
29 })
30 ];
31
32 dependencies = [ requests ];
33
34 build-system = [ setuptools ];
35
36 nativeCheckInputs = [ pytestCheckHook ];
37
38 meta = {
39 description = "Easy to use PyPI client";
40 homepage = "https://yarg.readthedocs.io";
41 license = lib.licenses.mit;
42 maintainers = with lib.maintainers; [ psyanticy ];
43 };
44}