jwt-cli: 4.0.0 -> 5.0.0

Also expand install check with a JWT decode call.
This commit is contained in:
Robert Helgesson 2021-11-21 22:22:03 +01:00
parent 06e83482be
commit 68f226aedb

View file

@ -2,21 +2,25 @@
rustPlatform.buildRustPackage rec {
pname = "jwt-cli";
version = "4.0.0";
version = "5.0.0";
src = fetchFromGitHub {
owner = "mike-engel";
repo = pname;
rev = version;
sha256 = "sha256-82Le0kdt/fnSQwsRRYHy4Jv9rsCPGf5dIWmoZE2cPxY=";
sha256 = "0za4mpzry6i5gki524kp4by0n74pbc96cvzrkq286v8w033wj01i";
};
cargoSha256 = "sha256-sCauVxc6JPJ4dBi5LOt+v9bdlRW+oF4cd/sfG5Xdv70=";
cargoSha256 = "1l5fhr5c2ygdlnpwsx62fm8di8li0wf15nvvcnnivjcic7f9b5j0";
buildInputs = lib.optional stdenv.isDarwin Security;
doInstallCheck = true;
installCheckPhase = "$out/bin/jwt --version";
installCheckPhase = ''
$out/bin/jwt --version > /dev/null
$out/bin/jwt decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c \
| grep -q 'John Doe'
'';
meta = with lib; {
description = "Super fast CLI tool to decode and encode JWTs";