mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-13 11:30:35 +08:00
libfdt: Rename the package to pylibfdt
The “canonical” name of the Python libfdt package, i.e. the one used on PyPI and, hence, the one that is listed in the requirements of the dependent modules is `pylibfdt`, but the upstream build system produced a package called `libfdt`. Given that, realistically, everyone will be using `pylibfdt`, as seen on PyPI, our choices are to either patch / jailbreak the requirement in all dependent packages, or follow PyPI and rename the package itself. Rename the package once and for all, since it is easier than modifying every single dependent one.
This commit is contained in:
@@ -69,6 +69,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs setup.py
|
||||
|
||||
# Align the name with pypi
|
||||
sed -i "s/name='libfdt',/name='pylibfdt',/" setup.py
|
||||
'';
|
||||
|
||||
# Required for installation of Python library and is innocuous otherwise.
|
||||
|
||||
@@ -26,7 +26,6 @@ python3Packages.buildPythonApplication rec {
|
||||
];
|
||||
|
||||
pythonRemoveDeps = [
|
||||
"pylibfdt"
|
||||
"swig"
|
||||
];
|
||||
|
||||
@@ -40,7 +39,7 @@ python3Packages.buildPythonApplication rec {
|
||||
pyserial
|
||||
tftpy
|
||||
crccheck
|
||||
# pylibfdt
|
||||
libfdt
|
||||
# swig
|
||||
packaging
|
||||
];
|
||||
|
||||
@@ -25,11 +25,6 @@ buildPythonPackage rec {
|
||||
sha256 = "sha256-UJU8b9BzuuUSHRjnA6hOd1bMPNOlk4LNtrQV5aZmGhI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Change name of pylibfdt to libfdt
|
||||
./fix_libfdt_name.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 2192a68..6a7ba95 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -27,7 +27,7 @@ dependencies = [
|
||||
"ruamel.yaml>0.15.69",
|
||||
"jsonschema>=4.1.2,<4.18",
|
||||
"rfc3987",
|
||||
- "pylibfdt",
|
||||
+ "libfdt",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
Reference in New Issue
Block a user