2021-07-24 12:14:16 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dacite";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.8.1";
|
2022-01-19 23:45:15 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "konradhalas";
|
|
|
|
repo = pname;
|
2022-12-28 21:21:41 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-lvObQ+jyBH2s4GOwyDXEAYmG7ZGQN9WDqL8ftNItPCQ=";
|
2021-07-24 12:14:16 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "--benchmark-autosave --benchmark-json=benchmark.json" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2021-07-24 12:14:16 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"dacite"
|
|
|
|
];
|
2021-07-24 12:14:16 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/performance"
|
|
|
|
];
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python helper to create data classes from dictionaries";
|
|
|
|
homepage = "https://github.com/konradhalas/dacite";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/konradhalas/dacite/blob/v${version}/CHANGELOG.md";
|
2021-07-24 12:14:16 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|