From 6146544f3ca96c1d8d27711ee1278d1973031df8 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Mon, 9 Sep 2024 16:43:09 +0100 Subject: [PATCH] allow search for multiple maintainers --- README.md | 2 +- flake.nix | 4 ++-- script.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fb59542..398cb7f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # Usage -`nix run github:callumio/nix-search-by-maintainer -- ` +`nix run github:callumio/nsbm -- ` diff --git a/flake.nix b/flake.nix index bc79614..8945be9 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "Flake for nix-search-by-maintainer"; + description = "Flake for nsbm"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; @@ -27,7 +27,7 @@ }: { packages = { default = pkgs.writeShellApplication { - name = "nix-search-by-maintainer"; + name = "nsbm"; runtimeInputs = [inputs'.sbomnix.packages.sbomnix pkgs.csvkit pkgs.gum]; text = builtins.readFile ./script.sh; }; diff --git a/script.sh b/script.sh index b9ec255..7109083 100755 --- a/script.sh +++ b/script.sh @@ -3,5 +3,5 @@ EMAIL="$1" URL=${2:-"github:NixOS/nixpkgs?ref=master"} 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