diff options
Diffstat (limited to '')
| -rwxr-xr-x | scripts/why-depends | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/why-depends b/scripts/why-depends index 01471ce2..1afe9150 100755 --- a/scripts/why-depends +++ b/scripts/why-depends @@ -1,8 +1,13 @@ #! /usr/bin/env sh -package="$1" -version="$2" -shift 2 +search_string="$1-" +shift 1 + +if [ "$1" != "" ]; then + # Add the version + search_string="${search_string}${1}$" + shift 1 +fi if [ "$1" = "--running" ]; then shift 1 @@ -12,6 +17,7 @@ else base=".#nixosConfigurations.$host.config.system.build.toplevel" fi -fd "$package-$version$" /nix/store --type directory --threads 1 --exec nix why-depends "$@" "$base" + +fd "$search_string" /nix/store --type directory --threads 1 --exec nix why-depends "$@" "$base" # vim: ft=sh |
