Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ripgrep-all: add missing dependencies #75874

Merged
merged 2 commits into from Dec 19, 2019
Merged

Conversation

emmanuelrosa
Copy link
Contributor

Motivation for this change

This change adds additional dependencies so that the program's full functionality is available by simply installing this package.

In addition, a second commit adds a checkInstallPhase which runs a couple of queries to smoke-test the ripgrep-all adapters. The queries are intended to ensure that the dependencies needed by the adapters are included in the package's dependencies.

Closes #75735

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after):
    Before: 2,620,416,224
    After: 3,792,946,536
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @zaninime

This change adds additional dependencies so that the program's full
functionality is available by simply installing this package.

Closes NixOS#75735
This change adds a checkInstallPhase which runs a couple of queries
to smoke-test the ripgrep-all adapters. The queries are intended to
ensure that the dependencies needed by the adapters are included in
the package's dependencies.
@zaninime
Copy link
Contributor

This way there's no opt-out from tesseract or imagemagick, right? We could merge this and I could open another PR where we also add support for (en/dis)abling those.

@emmanuelrosa
Copy link
Contributor Author

Yes, that's correct. This change makes tesseract and imagemagick required dependencies.

I noticed that the Rust development environment is quite large (~500 MB download) and that the Rust dependencies are built in a temporary environment, meaning they are not cached in the Nix store. Thus I think using only optional parameters for tesseract and imagemagick would cause the user to have to download the Rust dev environment and built all of the dependencies; It takes a while ;)

One approach is to have a separate package, and another is to follow in the footsteps of, say, the firefox package, and provide an unwrapped version of the package. That way, the bulk of the work would be done by Hydra and users would only end up installing a wrapper, which would build quickly by comparison.

Either way, when tesseract and imagemagick are excluded, the installCheckPhase I added needs to be disabled.

@Ma27 Ma27 merged commit b7d46b9 into NixOS:master Dec 19, 2019
@emmanuelrosa emmanuelrosa deleted the ripgrep-all-deps branch December 19, 2019 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ripgrep-all: Doesn't explicitly reference dependencies such as zip/unzip and tesseract
3 participants