Skip to content

flox/scrape-flake-pkgs

Repository files navigation

Scrape Metadata from Flake Packages

This provides a nix plugin which adds the command nix scrape <URI>.

This package also provides a wrapper executable around nix which can be invoked as shown below:

$ nix run github:flox/scrape-flake-pkgs -- nixpkgs       \
    |jq '.legacyPackages["x86_64-linux"]|keys[]'|wc -l;
19008

Feel free to extend the metadata collection routines in scrape.cc to suit your purposes.

TODO: Group by name to avoid multiple declarations per system.

Systems

By default the tool will search {x86_64,aarch64}-{linux,darwin}.

The flag --all-systems may be used to scrape every defined system.

The option --systems system-list may be used to scrape systems named in a space separated list.

The --all-systems flag will supersede the --systems option.

Ex:

$ nix run github:flox/scrape-flake-pkgs --                              \
    --systems 'x86_64-linux aarch64-linux' github:NixOS/nixpkgs/22.11;

About

Scrape package metadata from a flake

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published