Forked from Brandonshire/fish-build-install.sh
Last active
February 23, 2024 20:35
-
-
Save m8rge/95ab0e397ed34a663274669bd9074a2a to your computer and use it in GitHub Desktop.
Install Fish Shell 3+ on Raspberry Pi using nix-shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env nix-shell | |
#! nix-shell -i bash | |
#! nix-shell -p cmake gettext ncurses5 pcre2 | |
# This script uses [nix-shell package manager](https://nixos.org/download) | |
# to install fish clearly without any useless packages aftewards | |
set -e | |
FISH_VERSION="3.7.0" | |
cd /tmp | |
# Create a build directory | |
mkdir fish-install | |
cd fish-install | |
# Download and extract the latest build (could clone from git but that's less stable) | |
wget https://github.com/fish-shell/fish-shell/releases/download/$FISH_VERSION/fish-$FISH_VERSION.tar.xz | |
tar -xvf fish-$FISH_VERSION.tar.xz | |
cd fish-$FISH_VERSION | |
# Build and install | |
cmake -DCMAKE_INSTALL_PREFIX=/usr/local . | |
make | |
sudo make install | |
file /usr/local/bin/fish | |
# Add to shells | |
echo /usr/local/bin/fish | sudo tee -a /etc/shells | |
# Set as user's shell | |
sudo chsh -s /usr/local/bin/fish $(whoami) | |
# Delete build directory | |
cd ../../ | |
rm -rf fish-install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sh <(curl -L https://nixos.org/nix/install) --daemon
sh <(curl -L https://gist.githubusercontent.com/m8rge/95ab0e397ed34a663274669bd9074a2a/raw/062ea79e2a42afb72f3fb691021a7e947b091e96/fish-build-install.sh)
PS nix-shell video intro https://www.youtube.com/watch?v=0ulldVwZiKA