Installing the Binary¶
You can use various package managers to install the nsv
binary. Take your pick.
Package Managers¶
Apt¶
To install using the apt package manager:
echo 'deb [trusted=yes] https://fury.purpleclay.dev/apt/ /' \
| sudo tee /etc/apt/sources.list.d/purpleclay.list
sudo apt update
sudo apt install -y nsv
You may need to install the ca-certificates
package if you encounter trust issues with regard to the Gemfury certificate:
Aur¶
To install from the aur using yay:
Homebrew¶
To use Homebrew:
Nix Flake¶
To use Nix Flakes (highlights illustrate flake changes):
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
nsv = {
url = "github:purpleclay/nsv-nix";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
};
outputs = { self, nixpkgs, flake-utils, nsv }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
with pkgs;
{
devShells.default = mkShell {
buildInputs = [
nsv.packages.${system}.nsv
];
};
}
);
}
Yum¶
To install using the yum package manager:
echo '[purpleclay]
name=purpleclay
baseurl=https://fury.purpleclay.dev/yum/
enabled=1
gpgcheck=0' | sudo tee /etc/yum.repos.d/purpleclay.repo
sudo yum install -y nsv
Linux Packages¶
Download and manually install one of the .deb
, .rpm
or .apk
packages from the Releases page.
Go Install¶
Bash Script¶
To install the latest version using a script:
Download a specific version using the -v
flag. The script uses sudo
by default but can be disabled through the --no-sudo
flag. You can also provide a different installation directory from the default /usr/local/bin
by using the -d
flag:
sh -c "$(curl https://raw.githubusercontent.com/purpleclay/nsv/main/scripts/install)" \
-- -v v0.3.0 --no-sudo -d ./bin
Manual download of binary¶
Head over to the Releases page on GitHub and download any release artefact. Unpack the nsv
binary and add it to your PATH
.
Verifying a binary with cosign¶
All binaries can be verified using the checksum file and cosign.
- Download the checksum file:
- Verify the signature of the file:
cosign verify-blob \
--certificate-identity 'https://github.com/purpleclay/nsv/.github/workflows/release.yml@refs/tags/v0.10.1' \
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
--cert 'https://github.com/purpleclay/nsv/releases/download/v0.10.1/checksums.txt.pem' \
--signature 'https://github.com/purpleclay/nsv/releases/download/v0.10.1/checksums.txt.sig' \
checksums.txt
- Download any release artifact and verify its SHA256 signature matches the entry within the checksum file: