mirror of
https://github.com/callumio/nsbm.git
synced 2025-12-17 03:29:21 +00:00
allow search for multiple maintainers
This commit is contained in:
parent
f3c284646c
commit
6146544f3c
3 changed files with 4 additions and 4 deletions
|
|
@ -1,3 +1,3 @@
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
`nix run github:callumio/nix-search-by-maintainer -- <email to search for> <optional: nixpkgs url to search in>`
|
`nix run github:callumio/nsbm -- <email to search for> <optional: nixpkgs url to search in>`
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
description = "Flake for nix-search-by-maintainer";
|
description = "Flake for nsbm";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
}: {
|
}: {
|
||||||
packages = {
|
packages = {
|
||||||
default = pkgs.writeShellApplication {
|
default = pkgs.writeShellApplication {
|
||||||
name = "nix-search-by-maintainer";
|
name = "nsbm";
|
||||||
runtimeInputs = [inputs'.sbomnix.packages.sbomnix pkgs.csvkit pkgs.gum];
|
runtimeInputs = [inputs'.sbomnix.packages.sbomnix pkgs.csvkit pkgs.gum];
|
||||||
text = builtins.readFile ./script.sh;
|
text = builtins.readFile ./script.sh;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,5 @@
|
||||||
EMAIL="$1"
|
EMAIL="$1"
|
||||||
URL=${2:-"github:NixOS/nixpkgs?ref=master"}
|
URL=${2:-"github:NixOS/nixpkgs?ref=master"}
|
||||||
gum spin --spinner dot --title "Querying $URL..." -- nixmeta --flakeref="$URL" -o /tmp/nixmeta.csv
|
gum spin --spinner dot --title "Querying $URL..." -- nixmeta --flakeref="$URL" -o /tmp/nixmeta.csv
|
||||||
csvsql /tmp/nixmeta.csv --query "select * from nixmeta where meta_maintainers_email==\"$EMAIL\"" | gum table -p
|
csvsql /tmp/nixmeta.csv --query "select * from nixmeta where meta_maintainers_email LIKE '%$EMAIL%'" | gum table -p
|
||||||
rm /tmp/nixmeta.csv
|
rm /tmp/nixmeta.csv
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue