nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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 tomli,
17 tomlkit,
18 u-msgpack-python,
19
20 # tested using
21 pytestCheckHook,
22}:
23
24buildPythonPackage rec {
25 pname = "remarshal";
26 version = "1.3.0"; # test with `nix-build pkgs/pkgs-lib/format`
27 pyproject = true;
28
29 src = fetchFromGitHub {
30 owner = "dbohdan";
31 repo = "remarshal";
32 tag = "v${version}";
33 hash = "sha256-/K8x6ij23pk5O1+XJdFHaGbZ47nFMbXzp+4UMO5dGp4=";
34 };
35
36 build-system = [ poetry-core ];
37
38 dependencies = [
39 cbor2
40 colorama
41 python-dateutil
42 pyyaml
43 rich-argparse
44 ruamel-yaml
45 tomli
46 tomlkit
47 u-msgpack-python
48 ];
49
50 nativeCheckInputs = [ pytestCheckHook ];
51
52 meta = {
53 changelog = "https://github.com/remarshal-project/remarshal/releases/tag/${src.tag}";
54 description = "Convert between TOML, YAML and JSON";
55 license = lib.licenses.mit;
56 homepage = "https://github.com/dbohdan/remarshal";
57 maintainers = with lib.maintainers; [ offline ];
58 mainProgram = "remarshal";
59 };
60}