2022-01-05 02:50:29 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
# build deps
|
|
|
|
, poetry-core
|
|
|
|
|
|
|
|
# propagates
|
2021-08-28 04:01:48 +03:00
|
|
|
, cbor2
|
|
|
|
, python-dateutil
|
|
|
|
, pyyaml
|
|
|
|
, tomlkit
|
|
|
|
, u-msgpack-python
|
2022-01-05 02:50:29 +01:00
|
|
|
|
|
|
|
# tested using
|
|
|
|
, pytestCheckHook
|
2021-08-28 04:01:48 +03:00
|
|
|
}:
|
2015-11-16 12:59:30 +01:00
|
|
|
|
2021-08-28 04:01:48 +03:00
|
|
|
buildPythonApplication rec {
|
2018-04-21 22:30:59 +08:00
|
|
|
pname = "remarshal";
|
2020-10-12 04:20:00 +00:00
|
|
|
version = "0.14.0";
|
2022-01-05 02:50:29 +01:00
|
|
|
format = "pyproject";
|
2015-11-16 12:59:30 +01:00
|
|
|
|
2022-01-05 02:50:29 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dbohdan";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256:nTM3jrPf0kGE15J+ZXBIt2+NGSW2a6VlZCKj70n5kHM=";
|
2015-11-16 12:59:30 +01:00
|
|
|
};
|
|
|
|
|
2022-01-05 02:50:29 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "poetry.masonry.api" "poetry.core.masonry.api" \
|
2022-02-11 09:16:45 +10:00
|
|
|
--replace 'PyYAML = "^5.3"' 'PyYAML = "*"' \
|
|
|
|
--replace 'tomlkit = "^0.7"' 'tomlkit = "*"'
|
2022-01-05 02:50:29 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-08-28 04:01:48 +03:00
|
|
|
propagatedBuildInputs = [
|
2022-01-05 02:50:29 +01:00
|
|
|
cbor2
|
|
|
|
python-dateutil
|
|
|
|
pyyaml
|
|
|
|
tomlkit
|
|
|
|
u-msgpack-python
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2016-12-30 19:03:47 +08:00
|
|
|
];
|
2015-11-16 12:59:30 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2015-11-16 12:59:30 +01:00
|
|
|
description = "Convert between TOML, YAML and JSON";
|
|
|
|
license = licenses.mit;
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://github.com/dbohdan/remarshal";
|
2015-11-16 12:59:30 +01:00
|
|
|
maintainers = with maintainers; [ offline ];
|
|
|
|
};
|
|
|
|
}
|