Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, rustPlatform, fetchFromGitHub, installShellFiles, Security }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "kubie"; 5 version = "0.19.3"; 6 7 src = fetchFromGitHub { 8 rev = "v${version}"; 9 owner = "sbstp"; 10 repo = "kubie"; 11 sha256 = "sha256-c4+ebl/tWPxAlgt/N5/xalZQZGSizKp/pDcgojbjy7A="; 12 }; 13 14 cargoHash = "sha256-D3RjlYMD/UHfYxUMvZVSiRHOPmcLVGgsRVghoaMn9AM="; 15 16 nativeBuildInputs = [ installShellFiles ]; 17 18 buildInputs = lib.optionals stdenv.isDarwin [ Security ]; 19 20 postInstall = '' 21 installShellCompletion completion/kubie.bash 22 ''; 23 24 meta = with lib; { 25 description = "Shell independent context and namespace switcher for kubectl"; 26 homepage = "https://github.com/sbstp/kubie"; 27 license = with licenses; [ zlib ]; 28 maintainers = with maintainers; [ illiusdope ]; 29 }; 30}