diff --git a/pkgs/by-name/kp/kpx/package.nix b/pkgs/by-name/kp/kpx/package.nix new file mode 100644 index 000000000000..fdada6f07c57 --- /dev/null +++ b/pkgs/by-name/kp/kpx/package.nix @@ -0,0 +1,52 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + nix-update-script, + versionCheckHook, +}: + +buildGoModule (finalAttrs: { + pname = "kpx"; + version = "1.13.0"; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "momiji"; + repo = "kpx"; + tag = "v${finalAttrs.version}"; + hash = "sha256-D5SfWE/58L9G2miwx+hmcGCTCq6kHMOEnZ/4z0bMVzs="; + }; + + vendorHash = null; + + subPackages = [ "cli" ]; + + ldflags = [ + "-s" + "-X=github.com/momiji/kpx.AppVersion=${finalAttrs.version}" + ]; + + nativeInstallCheckInputs = [ versionCheckHook ]; + + doInstallCheck = true; + + # Tests are container-based + doCheck = false; + + postInstall = '' + mv $out/bin/cli $out/bin/kpx + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Kerberos proxy with dynamic proxy selection"; + homepage = "https://github.com/momiji/kpx"; + changelog = "https://github.com/momiji/kpx/blob/${finalAttrs.src.rev}/CHANGELOG_old.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "kpx"; + }; +})