depot/third_party/nixpkgs/pkgs/by-name/hu/hurl/package.nix

66 lines
1.5 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
installShellFiles,
libxml2,
openssl,
curl,
versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "hurl";
version = "6.1.1";
src = fetchFromGitHub {
owner = "Orange-OpenSource";
repo = "hurl";
tag = version;
hash = "sha256-NtvBw8Nb2eZN0rjVL/LPyIdY5hBJGnz/cDun6VvwYZE=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-WyNActmsHpr5fgN1a3X9ApEACWFVJMVoi4fBvKhGgZ0=";
nativeBuildInputs = [
pkg-config
installShellFiles
];
buildInputs = [
libxml2
openssl
curl
];
nativeInstallCheckInputs = [ versionCheckHook ];
# The actual tests require network access to a test server, but we can run an install check
doCheck = false;
doInstallCheck = true;
postInstall = ''
installManPage docs/manual/hurl.1 docs/manual/hurlfmt.1
installShellCompletion --cmd hurl \
--bash completions/hurl.bash \
--zsh completions/_hurl \
--fish completions/hurl.fish
installShellCompletion --cmd hurlfmt \
--zsh completions/_hurlfmt
'';
meta = with lib; {
description = "Command line tool that performs HTTP requests defined in a simple plain text format";
homepage = "https://hurl.dev/";
changelog = "https://github.com/Orange-OpenSource/hurl/blob/${version}/CHANGELOG.md";
maintainers = with maintainers; [
eonpatapon
figsoda
];
license = licenses.asl20;
mainProgram = "hurl";
};
}