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

gripgen: init at 0.8 #72893

Closed
wants to merge 1 commit into from
Closed

gripgen: init at 0.8 #72893

wants to merge 1 commit into from

Conversation

Azulinho
Copy link
Contributor

@Azulinho Azulinho commented Nov 6, 2019

Motivation for this change

grip (gripgen) was missing in nixpkgs,
http://sc0ty.pl/2016/12/grip-indexed-grep/

grip allows me to grep through a 120GB source codebase in less than 10 secs

 >>> du -sm .
121056	.

 >>> time /home/azul/tmp/grip-on-nixpkgs/azulinho-nixpkgs/result/bin/grip 'stuff'  >/dev/null

real	0m9.658s
user	0m8.131s
sys	0m0.778s

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 via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • (not-applicable - new pkg) 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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@JohnAZoidberg JohnAZoidberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Works, tried to "grip" through nixpkgs.

owner = "sc0ty";
repo = "grip";
rev = "v${version}";
sha256 = "sha256:0bkqarylgzhis6fpj48qbifcd6a26cgnq8784hgnm707rq9kb0rx";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sha256 = "sha256:0bkqarylgzhis6fpj48qbifcd6a26cgnq8784hgnm707rq9kb0rx";
sha256 = "0bkqarylgzhis6fpj48qbifcd6a26cgnq8784hgnm707rq9kb0rx";

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do in a wee bit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 125615b

{ boost, catch2, cmake, fetchFromGitHub, stdenv }:

stdenv.mkDerivation rec {
pname = "gripgen";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pname = "gripgen";
pname = "grip";

gripgen is only the tool to generate the database. (Also change commit and all-packages.nix)

Copy link
Contributor Author

@Azulinho Azulinho Nov 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grip is already taken,
Its some gui app, that's why I used gripgen

Ideally, we should have all our pkgs namespaced,

`tools.text.grip

but that's another battle

@aanderse
Copy link
Member

aanderse commented Nov 7, 2019

#60182

@aanderse
Copy link
Member

aanderse commented Nov 8, 2019

@Azulinho please collaborate with @tex so there is only one PR to merge.

@Azulinho
Copy link
Contributor Author

Azulinho commented Nov 8, 2019

@tex has the thing sorted, so I can close this one

@Azulinho Azulinho closed this Nov 8, 2019
@Azulinho Azulinho deleted the gripgen branch November 8, 2019 11:49
@JohnAZoidberg JohnAZoidberg mentioned this pull request Nov 11, 2019
10 tasks
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.

None yet

3 participants