1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4 5# build deps 6, poetry-core 7 8# propagates 9, cbor2 10, python-dateutil 11, pyyaml 12, tomlkit 13, u-msgpack-python 14 15# tested using 16, pytestCheckHook 17}: 18 19buildPythonPackage rec { 20 pname = "remarshal"; 21 version = "0.14.0"; 22 format = "pyproject"; 23 24 src = fetchFromGitHub { 25 owner = "dbohdan"; 26 repo = pname; 27 rev = "v${version}"; 28 hash = "sha256:nTM3jrPf0kGE15J+ZXBIt2+NGSW2a6VlZCKj70n5kHM="; 29 }; 30 31 postPatch = '' 32 substituteInPlace pyproject.toml \ 33 --replace "poetry.masonry.api" "poetry.core.masonry.api" \ 34 --replace 'PyYAML = "^5.3"' 'PyYAML = "*"' \ 35 --replace 'tomlkit = "^0.7"' 'tomlkit = "*"' 36 ''; 37 38 nativeBuildInputs = [ 39 poetry-core 40 ]; 41 42 propagatedBuildInputs = [ 43 cbor2 44 python-dateutil 45 pyyaml 46 tomlkit 47 u-msgpack-python 48 ]; 49 50 checkInputs = [ 51 pytestCheckHook 52 ]; 53 54 meta = with lib; { 55 description = "Convert between TOML, YAML and JSON"; 56 license = licenses.mit; 57 homepage = "https://github.com/dbohdan/remarshal"; 58 maintainers = with maintainers; [ offline ]; 59 }; 60}