2023-10-24 15:57:46 +00:00
|
|
|
{ installShellFiles
|
|
|
|
, lib
|
2023-08-23 21:58:26 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2024-07-10 11:52:28 +00:00
|
|
|
, stdenv
|
2023-08-23 21:58:26 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "steamguard-cli";
|
2024-08-05 16:36:48 +00:00
|
|
|
version = "0.14.2";
|
2023-08-23 21:58:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dyc3";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-08-05 16:36:48 +00:00
|
|
|
hash = "sha256-SrMg/4bTAvk+2fLck8SJBMQ3bELu1OBB7pDZmk+rCbA=";
|
2023-08-23 21:58:26 +00:00
|
|
|
};
|
|
|
|
|
2024-08-05 16:36:48 +00:00
|
|
|
cargoHash = "sha256-MSN0xQj6IfOjI0qQqVBaGhh0BQJa4z24El2rGLlFBSM=";
|
2023-08-23 21:58:26 +00:00
|
|
|
|
2023-10-24 15:57:46 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2024-07-10 11:52:28 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
2023-10-24 15:57:46 +00:00
|
|
|
installShellCompletion --cmd steamguard \
|
|
|
|
--bash <($out/bin/steamguard completion --shell bash) \
|
|
|
|
--fish <($out/bin/steamguard completion --shell fish) \
|
|
|
|
--zsh <($out/bin/steamguard completion --shell zsh) \
|
|
|
|
'';
|
|
|
|
|
2023-08-23 21:58:26 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|