depot/third_party/nixpkgs/pkgs/by-name/st/steamguard-cli/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

37 lines
1.1 KiB
Nix

{ installShellFiles
, lib
, rustPlatform
, fetchFromGitHub
}:
rustPlatform.buildRustPackage rec {
pname = "steamguard-cli";
version = "0.14.0";
src = fetchFromGitHub {
owner = "dyc3";
repo = pname;
rev = "v${version}";
hash = "sha256-MTNp4LQtFUOvlcic+EgrMaJPq0aEa6YqwwdrKkpv87Q=";
};
cargoHash = "sha256-FBKHvkUJcjrUxuCDrra5VKBdK95IssVw7g9zzldX6jU=";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd steamguard \
--bash <($out/bin/steamguard completion --shell bash) \
--fish <($out/bin/steamguard completion --shell fish) \
--zsh <($out/bin/steamguard completion --shell zsh) \
'';
meta = with lib; {
changelog = "https://github.com/dyc3/steamguard-cli/releases/tag/v${version}";
description = "Linux utility for generating 2FA codes for Steam and managing Steam trade confirmations";
homepage = "https://github.com/dyc3/steamguard-cli";
license = with licenses; [ gpl3Only ];
mainProgram = "steamguard";
maintainers = with maintainers; [ surfaceflinger ];
platforms = platforms.linux;
};
}