Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
pkgs(geonixcli): disable search for packages in nixpkgs_ref and geoni…
Browse files Browse the repository at this point in the history
…x_ref versions
  • Loading branch information
imincik committed Jun 15, 2023
1 parent 7d28f16 commit ed2074d
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions pkgs/geonixcli/geonix.bash
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ function get_nixpkgs_metadata {
' \
)

# shellcheck disable=SC2034
nixpkgs_ref=$( \
nix "${NIX_FLAGS[@]}" flake metadata --json \
| jq --raw-output '.locks.nodes.nixpkgs.original.ref' \
Expand Down Expand Up @@ -162,6 +163,7 @@ function get_geonix_metadata {
)
fi

# shellcheck disable=SC2034
geonix_ref=$( \
nix "${NIX_FLAGS[@]}" flake metadata --json \
| jq --raw-output '.locks.nodes.geonix.original.ref' \
Expand Down Expand Up @@ -235,13 +237,13 @@ elif [ "${args[0]}" == "search" ]; then
nix_search "$nixpkgs_url/$nixpkgs_rev" "${args[@]:1}" | column -ts $'\t'
fi

if [ "$nixpkgs_ref" != "null" ]; then
echo -e "\n${BOLD}$nixpkgs_url/$nixpkgs_ref ${NOFORMAT}"
nix_search "$nixpkgs_url/$nixpkgs_ref" "${args[@]:1}" | column -ts $'\t'
else
echo -e "\n${BOLD}$nixpkgs_url ${NOFORMAT}"
nix_search "$nixpkgs_url" "${args[@]:1}" | column -ts $'\t'
fi
# if [ "$nixpkgs_ref" != "null" ]; then
# echo -e "\n${BOLD}$nixpkgs_url/$nixpkgs_ref ${NOFORMAT}"
# nix_search "$nixpkgs_url/$nixpkgs_ref" "${args[@]:1}" | column -ts $'\t'
# else
# echo -e "\n${BOLD}$nixpkgs_url ${NOFORMAT}"
# nix_search "$nixpkgs_url" "${args[@]:1}" | column -ts $'\t'
# fi
fi

if [ "$geonix_exists" != "null" ]; then
Expand All @@ -253,17 +255,17 @@ elif [ "${args[0]}" == "search" ]; then
| column -ts $'\t'
fi

if [ "$geonix_ref" != "null" ]; then
echo -e "\n${BOLD}$geonix_url/$geonix_ref ${NOFORMAT}"
geonix_search "$geonix_url/$geonix_ref" "${args[@]:1}" \
| grep -v "\-unwrapped\|\-all-packages" \
| column -ts $'\t'
else
echo -e "\n${BOLD}$geonix_url ${NOFORMAT}"
geonix_search "$geonix_url" "${args[@]:1}" \
| grep -v "\-unwrapped\|\-all-packages" \
| column -ts $'\t'
fi
# if [ "$geonix_ref" != "null" ]; then
# echo -e "\n${BOLD}$geonix_url/$geonix_ref ${NOFORMAT}"
# geonix_search "$geonix_url/$geonix_ref" "${args[@]:1}" \
# | grep -v "\-unwrapped\|\-all-packages" \
# | column -ts $'\t'
# else
# echo -e "\n${BOLD}$geonix_url ${NOFORMAT}"
# geonix_search "$geonix_url" "${args[@]:1}" \
# | grep -v "\-unwrapped\|\-all-packages" \
# | column -ts $'\t'
# fi
fi


Expand Down

0 comments on commit ed2074d

Please sign in to comment.