{ stdenv, substituteAll, lib, buildGoPackage, fetchFromGitHub , AVFoundation, AudioToolbox, ImageIO, CoreMedia , Foundation, CoreGraphics, MediaToolbox , gnupg }: buildGoPackage rec { pname = "keybase"; version = "5.7.1"; goPackagePath = "github.com/keybase/client"; subPackages = [ "go/kbnm" "go/keybase" ]; dontRenameImports = true; src = fetchFromGitHub { owner = "keybase"; repo = "client"; rev = "v${version}"; sha256 = "sha256-72rVk8pYIQFESQqBu4bmFBPpAOB0oG2Iu36TbAdecBw="; }; patches = [ (substituteAll { src = ./fix-paths-keybase.patch; gpg = "${gnupg}/bin/gpg"; gpg2 = "${gnupg}/bin/gpg2"; }) ]; buildInputs = lib.optionals stdenv.isDarwin [ AVFoundation AudioToolbox ImageIO CoreMedia Foundation CoreGraphics MediaToolbox ]; tags = [ "production" ]; meta = with lib; { homepage = "https://www.keybase.io/"; description = "The Keybase official command-line utility and service"; platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ avaq carlsverre np rvolosatovs Br1ght0ne ]; license = licenses.bsd3; }; }