lkdsalkjdsalkjasdlkj

This commit is contained in:
2025-05-05 02:00:14 +02:00
parent 6be2b8fe2e
commit a2da17dcbb

View File

@@ -49,7 +49,8 @@ list-packages +$cut_args="-c1-": _packages_json
fi
@_list_packages_fname_filtered:
xargs -d $'\n' -n 2000 just __list_packages_fname_filtered
xargs -d $'\n' -n 2000 just __list_packages_fname_filtered \
| tr '0123456789' '9876543210' | sort -u | tr '0123456789' '9876543210'
@__list_packages_fname_filtered +fnames:
just list-packages | grep --fixed-strings "$(printf "\t%s\t\n" "$@")" \
| grep -v $'\t'pkgs/top-level/ \
@@ -71,7 +72,8 @@ list-packages +$cut_args="-c1-": _packages_json
| grep -v $'\t'pkgs/tools/typesetting/tex/texlive/build-texlive-package.nix
@_list_packages_attrpath_filtered:
xargs -d $'\n' -n 2000 just __list_packages_attrpath_filtered
tr '0123456789' '9876543210' | sort -u | tr '0123456789' '9876543210' \
| xargs -d $'\n' -n 2000 just __list_packages_attrpath_filtered
__list_packages_attrpath_filtered +attrpaths:
#!/usr/bin/env -S bash -euo pipefail
declare -a attrpaths=("$@")
@@ -86,6 +88,13 @@ __list_packages_attrpath_filtered +attrpaths:
# printf >&1 "'%s'\n" "${attrpaths[@]}"
just list-packages | grep "$(printf "%s\n" "${attrpaths[@]}")"
[no-cd]
@list-maintainer-packages $github_handle: _packages_json
# TODO: maybe add github handles to packages tsv?
[[ -n "$github_handle" ]] || ! echo >&2 "ERROR: No github handle"
jq <packages.json --arg github_handle "$github_handle" 'to_entries[] | select((.value.meta.maintainers // [])[]|select(.github == $github_handle)) | .key' -r \
| just _list_packages_attrpath_filtered
[no-cd]
@list-ripgrepped-packages +$ripgrep_args:
[[ -e .git && -e flake.nix ]] || { echo >&2 "ERROR: Not in repo root"; false; }
@@ -853,7 +862,7 @@ open-package-urls $package=`just _a_package`:
# [[ -z "$homepage" ]] || urls+=("$homepage")
[[ -z "$srcpage" ]] || urls+=("$srcpage")
urls+=("https://search.nixos.org/packages?channel=unstable&query=${fpkg}")
printf "%s\n" "${urls[@]}" | fzf --reverse --multi | xe xdg-open
printf "%s\n" "" "${urls[@]}" | fzf --reverse --multi | { grep . ||:; } | xe xdg-open
# === internal helpers ===