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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,61 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, poetry-core
, shapely
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "preprocess-cancellation";
version = "0.2.0";
disabled = pythonOlder "3.6"; # >= 3.6
format = "pyproject";
# No tests in PyPI
src = fetchFromGitHub {
owner = "kageurufu";
repo = "cancelobject-preprocessor";
rev = version;
hash = "sha256-mn3/etXA5dkL+IsyxwD4/XjU/t4/roYFVyqQxlLOoOI=";
};
patches = [
./pep-621.patch
];
postPatch = ''
sed -i "/^addopts/d" pyproject.toml
# setuptools 61 compatibility
# error: Multiple top-level packages discovered in a flat-layout: ['STLs', 'GCode'].
mkdir tests
mv GCode STLs test_* tests
substituteInPlace tests/test_preprocessor.py \
--replace "./GCode" "./tests/GCode"
substituteInPlace tests/test_preprocessor_with_shapely.py \
--replace "./GCode" "./tests/GCode"
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
shapely
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "preprocess_cancellation" ];
meta = with lib; {
description = "Klipper GCode Preprocessor for Object Cancellation";
homepage = "https://github.com/kageurufu/cancelobject-preprocessor";
license = licenses.gpl3Only;
maintainers = with maintainers; [ zhaofengli ];
};
}

View file

@ -0,0 +1,20 @@
diff --git a/pyproject.toml b/pyproject.toml
index da1376e..88298a7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,11 +1,11 @@
-[tool.poetry]
+[project]
name = "preprocess_cancellation"
version = "0.2.0"
description = "GCode processor to add klipper cancel-object markers"
readme = "README.md"
-authors = ["Franklyn Tackitt <im@frank.af>"]
-repository = "https://github.com/kageurufu/cancelobject-preprocessor"
-license = "GPL-3.0-only"
+authors = [ { name = "Franklyn Tackitt", email = "im@frank.af" } ]
+urls.repository = "https://github.com/kageurufu/cancelobject-preprocessor"
+license.text = "GPL-3.0-only"
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/kageurufu/cancelobject-preprocessor/issues"