nixpkgs/pkgs/tools/security/keybase/default.nix
2022-02-01 13:54:25 +01:00

44 lines
1.2 KiB
Nix

{ stdenv, substituteAll, lib, buildGoModule, fetchFromGitHub
, AVFoundation, AudioToolbox, ImageIO, CoreMedia
, Foundation, CoreGraphics, MediaToolbox
, gnupg, ...
}:
buildGoModule rec {
pname = "keybase";
version = "5.9.1";
modRoot = "go";
subPackages = [ "kbnm" "keybase" ];
dontRenameImports = true;
src = fetchFromGitHub {
owner = "keybase";
repo = "client";
rev = "v${version}";
sha256 = "sha256-WAI/rl6awVLbXqdqYAq8fyABAO2qet+GYucuiwClylI=";
};
vendorSha256 = "sha256-ZZTM1s/kFHkCjnaDYuP7xCrkW2an3I6kvcMXMy63ySE=";
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" ];
ldflags = [ "-s" "-w" ];
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 shofius ];
license = licenses.bsd3;
};
}