1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 fetchpatch2,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "jsonable";
12 version = "0.3.1";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "halfak";
17 repo = "python-jsonable";
18 tag = version;
19 hash = "sha256-3FIzG2djSZOPDdoYeKqs3obQjgHrFtyp0sdBwZakkHA=";
20 };
21
22 patches = [
23 # https://github.com/halfak/python-jsonable/pull/2
24 (fetchpatch2 {
25 name = "eq-to-assert.patch";
26 url = "https://github.com/halfak/python-jsonable/pull/2/commits/335e61bb4926e644aef983f7313793bf506d2463.patch";
27 hash = "sha256-tCVA0wG+UMyB6oaNf4nbZ2BPWkNumaGPcjP5VJKegBo=";
28 })
29 ];
30
31 build-system = [ setuptools ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 pythonImportsCheck = [ "jsonable" ];
36
37 meta = {
38 description = "Provides an abstract base class and utilities for defining trivially JSONable python objects";
39 homepage = "https://github.com/halfak/python-jsonable";
40 license = lib.licenses.mit;
41 maintainers = with lib.maintainers; [ GaetanLepage ];
42 };
43}