pizauth: init at 1.0.4

This commit is contained in:
Moraxyc 2024-06-03 23:09:32 +08:00
parent c5b6c986b3
commit 10fbc5b29b
No known key found for this signature in database

View File

@ -0,0 +1,43 @@
{
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
stdenv,
darwin,
}:
rustPlatform.buildRustPackage rec {
pname = "pizauth";
version = "1.0.4";
src = fetchFromGitHub {
owner = "ltratt";
repo = "pizauth";
rev = "pizauth-${version}";
hash = "sha256-Du+MVdYVQgH2V7928kpur+Xp/0y7HXgB8ZC0qciiQvs=";
};
cargoHash = "sha256-DrpYMVGvu7UnzQToVgVptURqp7XyoR1iYUfRSLZaqXw=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
postInstall = ''
installShellCompletion --cmd pizauth \
--bash share/bash/completion.bash
'';
meta = {
description = "Command-line OAuth2 authentication daemon";
homepage = "https://github.com/ltratt/pizauth";
changelog = "https://github.com/ltratt/pizauth/blob/${src.rev}/CHANGES.md";
license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [ moraxyc ];
mainProgram = "pizauth";
};
}