1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build deps
7 poetry-core,
8
9 # propagates
10 cbor2,
11 colorama,
12 python-dateutil,
13 pyyaml,
14 rich-argparse,
15 ruamel-yaml,
16 tomlkit,
17 u-msgpack-python,
18
19 # tested using
20 pytestCheckHook,
21}:
22
23buildPythonPackage rec {
24 pname = "remarshal";
25 version = "1.2.0"; # test with `nix-build pkgs/pkgs-lib/format`
26 pyproject = true;
27
28 src = fetchFromGitHub {
29 owner = "dbohdan";
30 repo = "remarshal";
31 tag = "v${version}";
32 hash = "sha256-y/odWWFJ7KDehYzUKSM/cprcCd+UaArEZFoYbtyW0Ok=";
33 };
34
35 build-system = [ poetry-core ];
36
37 dependencies = [
38 cbor2
39 colorama
40 python-dateutil
41 pyyaml
42 rich-argparse
43 ruamel-yaml
44 tomlkit
45 u-msgpack-python
46 ];
47
48 nativeCheckInputs = [ pytestCheckHook ];
49
50 meta = with lib; {
51 changelog = "https://github.com/remarshal-project/remarshal/releases/tag/v${version}";
52 description = "Convert between TOML, YAML and JSON";
53 license = licenses.mit;
54 homepage = "https://github.com/dbohdan/remarshal";
55 maintainers = with maintainers; [ offline ];
56 mainProgram = "remarshal";
57 };
58}