2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
2022-10-30 15:09:59 +00:00
|
|
|
, buildPythonPackage
|
2022-01-13 20:06:32 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
# build deps
|
|
|
|
, poetry-core
|
|
|
|
|
|
|
|
# propagates
|
2021-09-18 10:52:07 +00:00
|
|
|
, cbor2
|
|
|
|
, python-dateutil
|
|
|
|
, pyyaml
|
|
|
|
, tomlkit
|
|
|
|
, u-msgpack-python
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
# tested using
|
|
|
|
, pytestCheckHook
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "remarshal";
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "0.14.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dbohdan";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256:nTM3jrPf0kGE15J+ZXBIt2+NGSW2a6VlZCKj70n5kHM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "poetry.masonry.api" "poetry.core.masonry.api" \
|
2022-02-13 23:04:32 +00:00
|
|
|
--replace 'PyYAML = "^5.3"' 'PyYAML = "*"' \
|
|
|
|
--replace 'tomlkit = "^0.7"' 'tomlkit = "*"'
|
2022-01-13 20:06:32 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
cbor2
|
|
|
|
python-dateutil
|
|
|
|
pyyaml
|
|
|
|
tomlkit
|
|
|
|
u-msgpack-python
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Convert between TOML, YAML and JSON";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://github.com/dbohdan/remarshal";
|
|
|
|
maintainers = with maintainers; [ offline ];
|
|
|
|
};
|
|
|
|
}
|