This repository contains a very basic Nix Flake providing the Giantswarm Kubectl plugin as a package. It is intended to be added to dev shells.
To reference this flake use the following format: github:swoehrl-mw/nix-kubectl-gs/v<version>
. If you just want the latest version and don't care about version pinning, remove the /v<version>
part.
Example: github:swoehrl-mw/nix-kubectl-gs/v4.6.0
To use the package with devbox, simply add the reference to your devbox.json
packages
:
{
"packages": [
"kubectl@latest",
"github:swoehrl-mw/nix-kubectl-gs/v4.6.0"
]
}
To add the package to a classic nix-shell, use the following snippet in your shell.nix
:
pkgs.mkShellNoCC {
packages = [
pkgs.kubectl
(builtins.getFlake "github:swoehrl-mw/nix-kubectl-gs/v4.6.0").packages.${builtins.currentSystem}.kubectl-gs
];
}
Steps to update the Flake to a new version:
- Change the version in
calc_hashes.sh
and run the script - Edit
flake.nix
:- Paste the output of the script into the
source_hashes
block - Change the
pkg_version
- Paste the output of the script into the
- Commit and push the changes
- Tag the commit with the new version