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