diff --git a/pkgs/applications/editors/vscode/extensions/anweber.vscode-httpyac/default.nix b/pkgs/applications/editors/vscode/extensions/anweber.vscode-httpyac/default.nix new file mode 100644 index 000000000000..f508c192214a --- /dev/null +++ b/pkgs/applications/editors/vscode/extensions/anweber.vscode-httpyac/default.nix @@ -0,0 +1,28 @@ +{ + lib, + vscode-utils, + httpyac, +}: + +let + version = "6.16.6"; +in +vscode-utils.buildVscodeMarketplaceExtension { + mktplcRef = { + name = "vscode-httpyac"; + publisher = "anweber"; + inherit version; + hash = "sha256-GR1DX6td/a75STpfIU0UtOxpNBWCkyzecEZdDMZTy1M="; + }; + + buildInputs = [ httpyac ]; + + meta = { + changelog = "https://github.com/AnWeber/vscode-httpyac/releases/tag/${version}"; + description = "Quickly and easily send REST, Soap, GraphQL, GRPC, MQTT, RabbitMQ and WebSocket requests directly within Visual Studio Code"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=anweber.vscode-httpyac"; + homepage = "https://github.com/AnWeber/vscode-httpyac/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 36a9195b9967..75ff861d9b98 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -309,6 +309,8 @@ let }; }; + anweber.vscode-httpyac = callPackage ./anweber.vscode-httpyac { }; + apollographql.vscode-apollo = buildVscodeMarketplaceExtension { mktplcRef = { name = "vscode-apollo"; diff --git a/pkgs/by-name/ht/httpyac/package.nix b/pkgs/by-name/ht/httpyac/package.nix new file mode 100644 index 000000000000..55bc9b0ab6be --- /dev/null +++ b/pkgs/by-name/ht/httpyac/package.nix @@ -0,0 +1,40 @@ +{ + lib, + buildNpmPackage, + fetchFromGitHub, + versionCheckHook, + nix-update-script, +}: + +buildNpmPackage rec { + pname = "httpyac"; + version = "6.16.6"; + + src = fetchFromGitHub { + owner = "anweber"; + repo = "httpyac"; + tag = version; + hash = "sha256-JsrGoUZKo5/qjH+GKm5FBY19NE6KN7NhLpPvM8Cw97U="; + }; + + npmDepsHash = "sha256-08RJ1lLIaTXi3JHGIFR44GbEqOGez7+VFQGlejZqgAI="; + + nativeInstallCheckInputs = [ + versionCheckHook + ]; + versionCheckProgramArg = [ "--version" ]; + doInstallCheck = true; + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + changelog = "https://github.com/anweber/httpyac/blob/${src.rev}/CHANGELOG.md"; + description = "Command Line Interface for *.http and *.rest files. Connect with http, gRPC, WebSocket and MQTT"; + homepage = "https://github.com/anweber/httpyac"; + license = lib.licenses.mit; + mainProgram = "httpyac"; + maintainers = with lib.maintainers; [ drupol ]; + platforms = lib.platforms.all; + }; +}