Commit 78d90e4d authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm: add some nix support

parent d4cba42d
......@@ -496,6 +496,9 @@ case $PMTYPE in
winget)
sudocmd winget source add "$repo"
;;
nix)
sudocmd nix-channel --add "$repo"
;;
termux-pkg)
sudocmd pkg install "$repo"
;;
......
......@@ -173,6 +173,10 @@ epm_install_names()
xbps)
sudocmd xbps-install $@
return ;;
nix)
info "When you ask Nix to install a package, it will first try to get it in pre-compiled form from a binary cache. By default, Nix will use the binary cache https://cache.nixos.org; it contains binaries for most packages in Nixpkgs. Only if no binary is available in the binary cache, Nix will build the package from source."
sudocmd nix-env -iA $@
return ;;
appget|winget)
sudocmd $PMTYPE install $@
return ;;
......
......@@ -111,6 +111,9 @@ case $PMTYPE in
apk)
CMD="apk list --available"
;;
nix)
CMD="nix-env -qaP"
;;
appget)
CMD="appget search"
;;
......
......@@ -149,6 +149,9 @@ case $PMTYPE in
apk)
CMD="apk list --installed"
;;
nix)
CMD="nix-env -q"
;;
tce)
CMD="ls -1 /usr/local/tce.installed"
;;
......
......@@ -113,6 +113,9 @@ case $PMTYPE in
apk)
sudocmd apk update
;;
nix)
sudocmd nix-channel --update
;;
pkgsrc)
# portsnap extract for the first time?
sudocmd portsnap fetch update
......
......@@ -178,6 +178,9 @@ epm_upgrade()
xbps)
CMD="xbps-install -Su"
;;
nix)
CMD="nix-env -u $dryrun"
;;
termux-pkg)
CMD="pkg upgrade"
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment