Merge pull request #1245 from konimex/guix-nix
Packages [Guix/Nix]: Switch to commands instead of using directories
This commit is contained in:
commit
2069854082
19
neofetch
19
neofetch
|
@ -1330,8 +1330,6 @@ get_packages() {
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
{
|
{
|
||||||
has "emerge" && dir ${br_prefix}/var/db/pkg/*/*/
|
has "emerge" && dir ${br_prefix}/var/db/pkg/*/*/
|
||||||
has "nix-env" && dir ${br_prefix}/nix/store/*/
|
|
||||||
has "guix" && dir ${br_prefix}/gnu/store/*/
|
|
||||||
has "Compile" && dir ${br_prefix}/Programs/*/
|
has "Compile" && dir ${br_prefix}/Programs/*/
|
||||||
has "eopkg" && dir ${br_prefix}/var/lib/eopkg/package/*
|
has "eopkg" && dir ${br_prefix}/var/lib/eopkg/package/*
|
||||||
has "crew" && dir ${br_prefix}/usr/local/etc/crew/meta/*.filelist
|
has "crew" && dir ${br_prefix}/usr/local/etc/crew/meta/*.filelist
|
||||||
|
@ -1343,6 +1341,16 @@ get_packages() {
|
||||||
# Other (Needs complex command)
|
# Other (Needs complex command)
|
||||||
has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)"))
|
has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)"))
|
||||||
|
|
||||||
|
if has "guix"; then
|
||||||
|
manager="guix-system" && tot guix package -p "/run/current-system/profile" -I
|
||||||
|
manager="guix-user" && tot guix package -I
|
||||||
|
fi
|
||||||
|
|
||||||
|
if has "nix-store"; then
|
||||||
|
manager="nix-system" && tot nix-store -q --requisites "/run/current-system/sw"
|
||||||
|
manager="nix-user" && tot nix-store -q --requisites "$HOME/.nix-profile"
|
||||||
|
fi
|
||||||
|
|
||||||
# pkginfo is also the name of a python package manager which is painfully slow.
|
# pkginfo is also the name of a python package manager which is painfully slow.
|
||||||
# TODO: Fix this somehow.
|
# TODO: Fix this somehow.
|
||||||
has pkginfo && tot pkginfo -i
|
has pkginfo && tot pkginfo -i
|
||||||
|
@ -1371,7 +1379,11 @@ get_packages() {
|
||||||
has "port" && tot port installed && ((packages-=1))
|
has "port" && tot port installed && ((packages-=1))
|
||||||
has "brew" && dir /usr/local/Cellar/*
|
has "brew" && dir /usr/local/Cellar/*
|
||||||
has "pkgin" && tot pkgin list
|
has "pkgin" && tot pkgin list
|
||||||
has "nix-env" && dir /nix/store/*/
|
|
||||||
|
if has "nix-store"; then
|
||||||
|
manager="nix-system" && tot nix-store -q --requisites "/run/current-system/sw"
|
||||||
|
manager="nix-user" && tot nix-store -q --requisites "$HOME/.nix-profile"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"AIX"| "FreeMiNT")
|
"AIX"| "FreeMiNT")
|
||||||
|
@ -1415,7 +1427,6 @@ get_packages() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
packages="${packages/pacman-key/pacman}"
|
packages="${packages/pacman-key/pacman}"
|
||||||
packages="${packages/nix-env/nix}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get_shell() {
|
get_shell() {
|
||||||
|
|
Reference in New Issue