1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 pythonOlder,
6 pytestCheckHook,
7}:
8
9buildPythonPackage rec {
10 pname = "dacite";
11 version = "1.9.2";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.6";
15
16 src = fetchFromGitHub {
17 owner = "konradhalas";
18 repo = "dacite";
19 tag = "v${version}";
20 hash = "sha256-mAPqWvBpkTbtzHpwtCSDXMNkoc8/hbRH3OIEeK2yStU=";
21 };
22
23 postPatch = ''
24 substituteInPlace pyproject.toml \
25 --replace "--benchmark-autosave --benchmark-json=benchmark.json" ""
26 '';
27
28 nativeCheckInputs = [ pytestCheckHook ];
29
30 pythonImportsCheck = [ "dacite" ];
31
32 disabledTestPaths = [ "tests/performance" ];
33
34 meta = with lib; {
35 description = "Python helper to create data classes from dictionaries";
36 homepage = "https://github.com/konradhalas/dacite";
37 changelog = "https://github.com/konradhalas/dacite/blob/v${version}/CHANGELOG.md";
38 license = licenses.mit;
39 maintainers = with maintainers; [ fab ];
40 };
41}