python3Packages.remarhsal: fix build, enable tests, migrate to pyproject format
This commit is contained in:
parent
89a0a771b6
commit
e0a0f3be94
1 changed files with 36 additions and 5 deletions
|
@ -1,22 +1,53 @@
|
||||||
{ lib, buildPythonApplication, fetchPypi
|
{ lib
|
||||||
|
, buildPythonApplication
|
||||||
|
, fetchFromGitHub
|
||||||
|
|
||||||
|
# build deps
|
||||||
|
, poetry-core
|
||||||
|
|
||||||
|
# propagates
|
||||||
, cbor2
|
, cbor2
|
||||||
, python-dateutil
|
, python-dateutil
|
||||||
, pyyaml
|
, pyyaml
|
||||||
, tomlkit
|
, tomlkit
|
||||||
, u-msgpack-python
|
, u-msgpack-python
|
||||||
|
|
||||||
|
# tested using
|
||||||
|
, pytestCheckHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonApplication rec {
|
buildPythonApplication rec {
|
||||||
pname = "remarshal";
|
pname = "remarshal";
|
||||||
version = "0.14.0";
|
version = "0.14.0";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "dbohdan";
|
||||||
sha256 = "16425aa1575a271dd3705d812b06276eeedc3ac557e7fd28e06822ad14cd0667";
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256:nTM3jrPf0kGE15J+ZXBIt2+NGSW2a6VlZCKj70n5kHM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace pyproject.toml \
|
||||||
|
--replace "poetry.masonry.api" "poetry.core.masonry.api" \
|
||||||
|
--replace 'PyYAML = "^5.3"' 'PyYAML = "*"'
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
poetry-core
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
pyyaml cbor2 python-dateutil tomlkit u-msgpack-python
|
cbor2
|
||||||
|
python-dateutil
|
||||||
|
pyyaml
|
||||||
|
tomlkit
|
||||||
|
u-msgpack-python
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue