Unverified Commit a0a8d9fc authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

python3Packages.pdf-oxide: init at 0.3.32 (#510999)

parents 26c8dbf5 dbec80b5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
  fetchFromGitHub,
  rustPlatform,
  nix-update-script,
  python3Packages,
  versionCheckHook,
}:

@@ -28,7 +29,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
  nativeInstallCheckInputs = [ versionCheckHook ];
  doInstallCheck = true;

  passthru.updateScript = nix-update-script { };
  passthru = {
    python-bindings = python3Packages.pdf-oxide;
    updateScript = nix-update-script { };
  };

  meta = {
    description = "Fastest PDF library for text extraction, image extraction, and markdown conversion";
+46 −0
Original line number Diff line number Diff line
{
  lib,
  pkgs,
  fetchFromGitHub,
  buildPythonPackage,

  # build-system
  rustPlatform,

  # optional-dependencies
  onnxruntime,

  # tests
  pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
  inherit (pkgs.pdf-oxide)
    pname
    version
    src
    cargoDeps
    ;

  pyproject = true;

  nativeBuildInputs = with rustPlatform; [
    cargoSetupHook
    maturinBuildHook
  ];

  optional-dependencies = {
    ocr = [ onnxruntime ];
  };

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "pdf_oxide"
  ];

  meta = pkgs.pdf-oxide.meta // {
    description = "Python bindings for the pdf_oxide library";
  };
})
+2 −0
Original line number Diff line number Diff line
@@ -12253,6 +12253,8 @@ self: super: with self; {
  pdbfixer = callPackage ../development/python-modules/pdbfixer { };
  pdf-oxide = callPackage ../development/python-modules/pdf-oxide { };
  pdf2docx = callPackage ../development/python-modules/pdf2docx { };
  pdf2image = callPackage ../development/python-modules/pdf2image { };