replit / rippkgs

A CLI for indexing and searching packages in Nix expressions
MIT License
153 stars 2 forks source link

search: allow filtering by existence of store path #11

Closed cdmistman closed 8 months ago

cdmistman commented 8 months ago

Why

allows filtering results by whether the store path exists

What changed

Test plan

  1. nix eval github:replit/rippkgs/cad/filter-available#lib.genRegistry --refresh --apply 'f: f builtins.currentSystem (import <nixpkgs> { config = { allowUnsupportedSystem = true; }; })' --impure --json >nixpkgs.json
  2. nix run github:replit/rippkgs/cad/filter-available#rippkgs-index -- --output nixpkgs.sqlite --registry nixpkgs.json
  3. nix run github:replit/rippkgs/cad/filter-available#rippkgs -- --filter-built --index nixpkgs.sqlite <something>
    • if you put <something> that you've previously built from the specific nix channel, then the result should appear
    • if you put <something> you haven't built, then the result should not appear. but if you remove the --filter-built flag, then the result should appear!