diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2022-05-28 04:20:00 +0000 |
---|---|---|
committer | Robert Schütz <github@dotlambda.de> | 2022-05-28 18:11:52 -0700 |
commit | ab71980f5ce9dfae2004cd1b320fcb0166febfd5 (patch) | |
tree | 39a3a9ac71cf4395b2e978a8de36390a15d7b1d9 | |
parent | e2bdf4958019e2716a74cb96ae7a6a404a1afe9f (diff) | |
download | nixpkgs-ab71980f5ce9dfae2004cd1b320fcb0166febfd5.tar nixpkgs-ab71980f5ce9dfae2004cd1b320fcb0166febfd5.tar.gz nixpkgs-ab71980f5ce9dfae2004cd1b320fcb0166febfd5.tar.bz2 nixpkgs-ab71980f5ce9dfae2004cd1b320fcb0166febfd5.tar.lz nixpkgs-ab71980f5ce9dfae2004cd1b320fcb0166febfd5.tar.xz nixpkgs-ab71980f5ce9dfae2004cd1b320fcb0166febfd5.tar.zst nixpkgs-ab71980f5ce9dfae2004cd1b320fcb0166febfd5.zip |
ocrmypdf: install completions
-rw-r--r-- | pkgs/development/python-modules/ocrmypdf/default.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/ocrmypdf/default.nix b/pkgs/development/python-modules/ocrmypdf/default.nix index 1a427dc379f..3e75bb7fb8e 100644 --- a/pkgs/development/python-modules/ocrmypdf/default.nix +++ b/pkgs/development/python-modules/ocrmypdf/default.nix @@ -18,11 +18,11 @@ , reportlab , setuptools-scm , setuptools-scm-git-archive -, stdenv , substituteAll , tesseract4 , tqdm , unpaper +, installShellFiles }: buildPythonPackage rec { @@ -35,7 +35,7 @@ buildPythonPackage rec { rev = "v${version}"; # The content of .git_archival.txt is substituted upon tarball creation, # which creates indeterminism if master no longer points to the tag. - # See https://github.com/jbarlow83/OCRmyPDF/issues/841 + # See https://github.com/ocrmypdf/OCRmyPDF/issues/841 postFetch = '' rm "$out/.git_archival.txt" ''; @@ -58,6 +58,7 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools-scm-git-archive setuptools-scm + installShellFiles ]; propagatedBuildInputs = [ @@ -84,6 +85,12 @@ buildPythonPackage rec { "ocrmypdf" ]; + postInstall = '' + installShellCompletion --cmd ocrmypdf \ + --bash misc/completion/ocrmypdf.bash \ + --fish misc/completion/ocrmypdf.fish + ''; + meta = with lib; { homepage = "https://github.com/ocrmypdf/OCRmyPDF"; description = "Adds an OCR text layer to scanned PDF files, allowing them to be searched"; |