1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 versioneer,
7 pyyaml,
8 cloudpickle,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "donfig";
14 version = "0.8.1.post1";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "pytroll";
19 repo = "donfig";
20 rev = "v${version}";
21 hash = "sha256-hF4hzI1MTLgUexRIqwBEEEMV7Az2oDkp5GQQ5282vwE=";
22 };
23
24 postPatch = ''
25 substituteInPlace pyproject.toml \
26 --replace-fail "versioneer[toml]==0.28" versioneer
27 '';
28
29 build-system = [
30 setuptools
31 versioneer
32 ];
33
34 dependencies = [
35 pyyaml
36 ];
37
38 nativeCheckInputs = [
39 cloudpickle
40 pytestCheckHook
41 ];
42
43 pythonImportsCheck = [
44 "donfig"
45 ];
46
47 meta = {
48 description = "Python library for configuring a package including defaults, env variable loading, and yaml loading";
49 homepage = "https://github.com/pytroll/donfig";
50 changelog = "https://github.com/pytroll/donfig/blob/${src.rev}/CHANGELOG.md";
51 license = lib.licenses.mit;
52 maintainers = with lib.maintainers; [ ];
53 };
54}