diodon: init at 1.13.0 (#369078)
[NixPkgs.git] / pkgs / by-name / pi / pizauth / package.nix
blob81c9aa0cdafe61ea30b0a49e44a5c9f0611bac9e
2   lib,
3   rustPlatform,
4   fetchFromGitHub,
5   installShellFiles,
6 }:
8 rustPlatform.buildRustPackage rec {
9   pname = "pizauth";
10   version = "1.0.6";
12   src = fetchFromGitHub {
13     owner = "ltratt";
14     repo = "pizauth";
15     tag = "pizauth-${version}";
16     hash = "sha256-x3LdutVrQFrkXvbGPVzBV7Y8P9okKgv2rh2YdnDXvsc=";
17   };
19   cargoHash = "sha256-moRr8usrFHE8YPQnsmeKoDZPAk94qRm9cHzHBLXtGFM=";
21   nativeBuildInputs = [ installShellFiles ];
23   postInstall = ''
24     installShellCompletion --cmd pizauth \
25       --bash share/bash/completion.bash
26   '';
28   meta = {
29     description = "Command-line OAuth2 authentication daemon";
30     homepage = "https://github.com/ltratt/pizauth";
31     changelog = "https://github.com/ltratt/pizauth/blob/${src.rev}/CHANGES.md";
32     license = with lib.licenses; [
33       asl20
34       mit
35     ];
36     maintainers = with lib.maintainers; [ moraxyc ];
37     mainProgram = "pizauth";
38   };