Change:
Kubeswitch requires both the binary and a script Steps to reproduce the behavior: kubeswitch to use Kubeconfig is set as intended only adds the binary, not the script itself. On the other hand, I'm not using nix directly but via fleek.
Hey happy first issue! About the kubeswitch, indeed, I did make this mistake as I am using it on my work machine which is not NixOS and I had done the standard installation in the past, so I got the binary from Nix, but not the script. Honestly, I need time and a little bit of searching on how to handle scripts, as I have only messed with Go or Python packages (which have a nice interface, BTW).
This will help fix it.
I did not test, but thanks. are you willing to do fix it?
Hi, sorry I want to but do not have much time recently.

Discussion:
./programs/kclock.nix ./programs/kdeconnect.nix ./programs/lazygit.nix <ins> ./programs/kubeswitch.nix </ins> ./programs/less.nix ./programs/liboping.nix ./programs/light.nix

<ins> { config, pkgs, lib, ... }: let cfg = config.programs.kubeswitch; in { options = { programs.kubeswitch = { enable = lib.mkEnableOption (lib.mdDoc "kubeswitch"); commandName = lib.mkOption { type = lib.types.str; default = "kswitch"; description = "The name of the command to use"; }; package = lib.mkOption { type = lib.types.package; default = pkgs.kubeswitch; defaultText = lib.literalExpression "pkgs.kubeswitch"; description = "The package to install for kubeswitch"; }; }; }; config = let shell_files = pkgs.stdenv.mkDerivation rec { name = "kubeswitch-shell-files"; phases = [ "installPhase" ]; installPhase = '' mkdir -p $out/share for shell in bash zsh; do ${cfg.package}/bin/switcher init $shell | sed 's/switch(/${cfg.commandName}(/' > $out/share/${cfg.commandName}_init.$shell ${cfg.package}/bin/switcher --cmd ${cfg.commandName} completion $shell > $out/share/${cfg.commandName}_completion.$shell done ''; }; in lib.mkIf cfg.enable { environment.systemPackages = [ cfg.package ]; programs.bash.interactiveShellInit = '' source ${shell_files}/share/${cfg.commandName}_init.bash source ${shell_files}/share/${cfg.commandName}_completion.bash ''; programs.zsh.interactiveShellInit = '' source ${shell_files}/share/${cfg.commandName}_init.zsh source ${shell_files}/share/${cfg.commandName}_completion.zsh ''; }; } </ins>

<del> { lib, buildGoModule, fetchFromGitHub, testers, kubeswitch }: </del> <ins> { lib, buildGoModule, fetchFromGitHub, testers, kubeswitch, installShellFiles, }: </ins> buildGoModule rec { pname = "kubeswitch";

src = fetchFromGitHub { owner = "danielfoehrKn"; <del> repo = pname; </del> <ins> repo = "kubeswitch"; </ins> rev = version; <del> sha256 = "sha256-zf7o41YYAppRge0EMXgIN8rI5Kco4/n7BJ90b/X6L1M="; </del> <ins> hash = "sha256-zf7o41YYAppRge0EMXgIN8rI5Kco4/n7BJ90b/X6L1M="; </ins> }; vendorHash = null;

subPackages = [ "cmd/main.go" ]; ldflags = [ <del> "-s" "-w" </del> <ins> "-s" "-w" </ins> "-X github.com/danielfoehrkn/kubeswitch/cmd/switcher.version=${version}" "-X github.com/danielfoehrkn/kubeswitch/cmd/switcher.buildDate=1970-01-01" ]; <del> passthru.tests.version = testers.testVersion { package = kubeswitch; }; </del> <ins> nativeBuildInputs = [ installShellFiles ]; </ins> postInstall = '' <del> mv $out/bin/main $out/bin/switch </del> <ins> mv $out/bin/main $out/bin/switcher for shell in bash zsh fish; do $out/bin/switcher --cmd switcher completion $shell > switcher.$shell installShellCompletion --$shell switcher.$shell done </ins> ''; <del> meta = with lib; { description = "The kubectx for operators"; license = licenses.asl20; </del> <ins> passthru.tests.version = testers.testVersion { package = kubeswitch; }; meta = { changelog = "https://github.com/danielfoehrKn/kubeswitch/releases/tag/${version}"; description = "The kubectx for operators, a drop-in replacement for kubectx"; license = lib.licenses.asl20; </ins> homepage = "https://github.com/danielfoehrKn/kubeswitch"; <del> maintainers = with maintainers; [ bryanasdev000 ]; mainProgram = "switch"; </del> <ins> maintainers = with lib.maintainers; [ bryanasdev000 ]; mainProgram = "switcher"; </ins> }; }