Loading pkgs/development/python-modules/pdf2docx/default.nix +9 −20 Original line number Diff line number Diff line Loading @@ -2,9 +2,7 @@ stdenv, lib, fetchFromGitHub, python, buildPythonPackage, imagemagick, pip, pytestCheckHook, pymupdf, Loading @@ -14,6 +12,7 @@ opencv4, tkinter, python-docx, setuptools, }: let version = "0.5.8"; Loading @@ -21,26 +20,25 @@ in buildPythonPackage { pname = "pdf2docx"; inherit version; format = "setuptools"; pyproject = true; src = fetchFromGitHub { owner = "dothinking"; owner = "ArtifexSoftware"; repo = "pdf2docx"; rev = "refs/tags/v${version}"; hash = "sha256-tMITDm2NkxWS+H/hhd2LlaPbyuI86ZKaALqqHJqb8V0="; }; nativeBuildInputs = [ build-system = [ pip imagemagick setuptools ]; pythonRemoveDeps = [ "opencv-python" ]; preBuild = "echo '${version}' > version.txt"; propagatedBuildInputs = [ tkinter dependencies = [ pymupdf fire fonttools Loading @@ -49,15 +47,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 = [ Loading @@ -71,9 +60,9 @@ buildPythonPackage { meta = with lib; { description = "Convert PDF to DOCX"; mainProgram = "pdf2docx"; homepage = "https://github.com/dothinking/pdf2docx"; changelog = "https://github.com/dothinking/pdf2docx/releases/tag/v${version}"; license = licenses.gpl3Only; homepage = "https://github.com/ArtifexSoftware/pdf2docx"; changelog = "https://github.com/ArtifexSoftware/pdf2docx/releases/tag/v${version}"; license = licenses.agpl3Only; maintainers = with maintainers; [ happysalada ]; }; } Loading
pkgs/development/python-modules/pdf2docx/default.nix +9 −20 Original line number Diff line number Diff line Loading @@ -2,9 +2,7 @@ stdenv, lib, fetchFromGitHub, python, buildPythonPackage, imagemagick, pip, pytestCheckHook, pymupdf, Loading @@ -14,6 +12,7 @@ opencv4, tkinter, python-docx, setuptools, }: let version = "0.5.8"; Loading @@ -21,26 +20,25 @@ in buildPythonPackage { pname = "pdf2docx"; inherit version; format = "setuptools"; pyproject = true; src = fetchFromGitHub { owner = "dothinking"; owner = "ArtifexSoftware"; repo = "pdf2docx"; rev = "refs/tags/v${version}"; hash = "sha256-tMITDm2NkxWS+H/hhd2LlaPbyuI86ZKaALqqHJqb8V0="; }; nativeBuildInputs = [ build-system = [ pip imagemagick setuptools ]; pythonRemoveDeps = [ "opencv-python" ]; preBuild = "echo '${version}' > version.txt"; propagatedBuildInputs = [ tkinter dependencies = [ pymupdf fire fonttools Loading @@ -49,15 +47,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 = [ Loading @@ -71,9 +60,9 @@ buildPythonPackage { meta = with lib; { description = "Convert PDF to DOCX"; mainProgram = "pdf2docx"; homepage = "https://github.com/dothinking/pdf2docx"; changelog = "https://github.com/dothinking/pdf2docx/releases/tag/v${version}"; license = licenses.gpl3Only; homepage = "https://github.com/ArtifexSoftware/pdf2docx"; changelog = "https://github.com/ArtifexSoftware/pdf2docx/releases/tag/v${version}"; license = licenses.agpl3Only; maintainers = with maintainers; [ happysalada ]; }; }