Skip to content

Commit

Permalink
remove nix support (#47)
Browse files Browse the repository at this point in the history
Nix is not supposed to be used on NixOS the way that cpm implements it,
and it's (to the best of my knowledge) not the best way on other
platforms as well. We also do not support non-platform-specific package
managers, so the precedent says we should remove this one.
  • Loading branch information
willeccles authored Oct 22, 2021
1 parent 3a4ab6d commit 57710f0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ $ cpm [i|r|l|u|U|s|S|I|F|f|c|h] [pkg]...
- dnf (Fedora)
- lunar (Lunar Linux)
- MacPorts (MacOS)
- nix (Global/NixOS)
- guix (non-system-wide Guix)
- pacman (Arch)
- slackpkg (Slackware)
Expand All @@ -43,6 +42,7 @@ $ cpm [i|r|l|u|U|s|S|I|F|f|c|h] [pkg]...
- Cargo
- Flatpak
- Homebrew
- Nix
- NPM
- Pip
- Snap
Expand Down
18 changes: 0 additions & 18 deletions cpm
Original file line number Diff line number Diff line change
Expand Up @@ -400,21 +400,6 @@ _guix() {
esac
}

_nix() {
case "$OP" in
install) nix-env -iA "$@";;
remove) niv-env -e "$@";;
list) nix-env -q "$@";;
count) nix-env -q | tot;;
update) nix-channel --update;;
upgrade) nix-env -u;;
search) nix-env -qa "$@";;
show) nix-env -qa --description "$@";;
f*) pem "unsupported: this feature is functionally useless in this PM";;
clean) nix-collect-garbage -d;;
esac
}

# Use pm=PKG_MANAGER cpm COMMAND to force a specific cpm function
# ie.: pm=portage cpm list
if [ "$pm" ] && has "_$pm"; then
Expand Down Expand Up @@ -455,9 +440,6 @@ elif has sorcery; then
elif has lunar; then
# lunar linux
_lunar "$@"
elif has nix; then
# global/nixos
_nix "$@"
elif has guix; then
# local (non-system-wide) guix
_guix "$@"
Expand Down

0 comments on commit 57710f0

Please sign in to comment.