python312Packages.pdf2docx: fix build
The icon file was removed in https://github.com/ArtifexSoftware/pdf2docx/commit/fae9965645182fa93fe496a617d4a26a746e42de.
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
python,
|
||||
buildPythonPackage,
|
||||
imagemagick,
|
||||
pip,
|
||||
pytestCheckHook,
|
||||
pymupdf,
|
||||
@@ -32,7 +30,6 @@ buildPythonPackage {
|
||||
|
||||
nativeBuildInputs = [
|
||||
pip
|
||||
imagemagick
|
||||
];
|
||||
|
||||
pythonRemoveDeps = [ "opencv-python" ];
|
||||
@@ -49,15 +46,6 @@ buildPythonPackage {
|
||||
python-docx
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
# on linux the icon file can only be xbm format
|
||||
convert $out/${python.sitePackages}/pdf2docx/gui/icon.ico \
|
||||
$out/${python.sitePackages}/pdf2docx/gui/icon.xbm
|
||||
substituteInPlace $out/${python.sitePackages}/pdf2docx/gui/App.py \
|
||||
--replace 'icon.ico' 'icon.xbm' \
|
||||
--replace 'iconbitmap(icon_path)' "iconbitmap(f'@{icon_path}')"
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
pytestFlagsArray = [
|
||||
|
||||
Reference in New Issue
Block a user