diff --git a/pkgs/tools/security/jwt-cli/default.nix b/pkgs/by-name/jw/jwt-cli/package.nix similarity index 75% rename from pkgs/tools/security/jwt-cli/default.nix rename to pkgs/by-name/jw/jwt-cli/package.nix index 561dc0b50f2d..0b73b4485d27 100644 --- a/pkgs/tools/security/jwt-cli/default.nix +++ b/pkgs/by-name/jw/jwt-cli/package.nix @@ -2,9 +2,9 @@ lib, stdenv, fetchFromGitHub, + gitUpdater, installShellFiles, rustPlatform, - Security, }: rustPlatform.buildRustPackage rec { @@ -13,17 +13,15 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "mike-engel"; - repo = pname; - rev = version; - sha256 = "sha256-2pYCNLopvIHcKiN4qewQCdkGWHYQ6vQVCaApxGsRG9E="; + repo = "jwt-cli"; + tag = version; + hash = "sha256-2pYCNLopvIHcKiN4qewQCdkGWHYQ6vQVCaApxGsRG9E="; }; cargoHash = "sha256-M/9b+iPufq0S7P2PdPYIDS1to5WAtJbS3O/+NfO3sbY="; nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; - postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd jwt \ --bash <($out/bin/jwt completion bash) \ @@ -32,17 +30,21 @@ rustPlatform.buildRustPackage rec { ''; doInstallCheck = true; + installCheckPhase = '' $out/bin/jwt --version > /dev/null $out/bin/jwt decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c \ | grep -q 'John Doe' ''; - meta = with lib; { + passthru.updateScript = gitUpdater { }; + + meta = { description = "Super fast CLI tool to decode and encode JWTs"; homepage = "https://github.com/mike-engel/jwt-cli"; - license = with licenses; [ mit ]; - maintainers = with maintainers; [ rycee ]; + changelog = "https://github.com/mike-engel/jwt-cli/releases/tag/${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ rycee ]; mainProgram = "jwt"; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 00bcd30d93cc..a73f126419bc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2391,10 +2391,6 @@ with pkgs; stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; }; - jwt-cli = callPackage ../tools/security/jwt-cli { - inherit (darwin.apple_sdk.frameworks) Security; - }; - kaldi = callPackage ../tools/audio/kaldi { inherit (darwin.apple_sdk.frameworks) Accelerate; };