{ stdenv, lib, buildGoModule, fetchFromGitHub, pkg-config, pcsclite, softhsm, opensc, yubihsm-shell, }: buildGoModule rec { pname = "step-kms-plugin"; version = "0.14.0"; src = fetchFromGitHub { owner = "smallstep"; repo = "step-kms-plugin"; rev = "v${version}"; hash = "sha256-GP4ztKTkHIxBCK9Wx9oT8jehIFYCj3lnAt+RGgTMpHo="; }; vendorHash = "sha256-beRLkYLAe3wx0CmCXcn5flWeg+qOK1JPYjAD/bhPkTc="; proxyVendor = true; nativeBuildInputs = [ pkg-config ]; buildInputs = [ opensc pcsclite softhsm yubihsm-shell ]; ldflags = [ "-w" "-s" "-X github.com/smallstep/step-kms-plugin/cmd.Version=${version}" ]; meta = with lib; { description = "step plugin to manage keys and certificates on cloud KMSs and HSMs"; homepage = "https://smallstep.com/cli/"; license = licenses.asl20; maintainers = with maintainers; [ qbit ]; mainProgram = "step-kms-plugin"; # can't find pcsclite header files broken = stdenv.hostPlatform.isDarwin; }; }