uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,66 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, more-properties
|
||||
, typing-inspect
|
||||
, toolz
|
||||
, toposort
|
||||
, bson
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dataclasses-serialization";
|
||||
version = "1.3.1";
|
||||
|
||||
# upstream requires >= 3.6 but only 3.7 includes dataclasses
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "madman-bob";
|
||||
repo = "python-dataclasses-serialization";
|
||||
rev = version;
|
||||
hash = "sha256-jLMR2D01KgzHHRP0zduMBJt8xgBmIquWLCjZYLo2/AA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
mv pypi_upload/setup.py .
|
||||
substituteInPlace setup.py \
|
||||
--replace "project_root = Path(__file__).parents[1]" "project_root = Path(__file__).parents[0]"
|
||||
|
||||
# dataclasses is included in Python 3.7
|
||||
substituteInPlace requirements.txt \
|
||||
--replace dataclasses ""
|
||||
|
||||
# https://github.com/madman-bob/python-dataclasses-serialization/issues/16
|
||||
sed -i '/(\(Dict\|List\)/d' tests/test_json.py tests/test_bson.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
more-properties
|
||||
typing-inspect
|
||||
toolz
|
||||
toposort
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
bson
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"dataclasses_serialization.bson"
|
||||
"dataclasses_serialization.json"
|
||||
"dataclasses_serialization.serializer_base"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Serialize/deserialize Python dataclasses to various other data formats";
|
||||
homepage = "https://github.com/madman-bob/python-dataclasses-serialization";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue