2021-08-05 21:33:18 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
2021-10-09 14:59:57 +00:00
|
|
|
, installShellFiles
|
2021-08-05 21:33:18 +00:00
|
|
|
, libxml2
|
|
|
|
, openssl
|
2022-11-21 17:40:18 +00:00
|
|
|
, stdenv
|
2021-10-08 15:17:17 +00:00
|
|
|
, curl
|
2021-08-05 21:33:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "hurl";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "4.3.0";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Orange-OpenSource";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-gSkiNwRR47CZ1YjVa5o8EByCzWBAYPfsMRXydTwFwp0=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
cargoHash = "sha256-dY00xcMnOCWhdRzC+3mTHSIqeYEPUDBJeYd/GiLM/38=";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2021-10-09 14:59:57 +00:00
|
|
|
installShellFiles
|
2021-08-05 21:33:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libxml2
|
|
|
|
openssl
|
2021-10-08 15:17:17 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
curl
|
2021-08-05 21:33:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Tests require network access to a test server
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-10-09 14:59:57 +00:00
|
|
|
postInstall = ''
|
2022-09-22 12:36:57 +00:00
|
|
|
installManPage docs/manual/hurl.1 docs/manual/hurlfmt.1
|
2021-10-09 14:59:57 +00:00
|
|
|
'';
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
description = "Command line tool that performs HTTP requests defined in a simple plain text format";
|
2021-08-05 21:33:18 +00:00
|
|
|
homepage = "https://hurl.dev/";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/Orange-OpenSource/hurl/blob/${version}/CHANGELOG.md";
|
2022-11-21 17:40:18 +00:00
|
|
|
maintainers = with maintainers; [ eonpatapon figsoda ];
|
2021-08-05 21:33:18 +00:00
|
|
|
license = licenses.asl20;
|
2023-11-16 04:20:00 +00:00
|
|
|
mainProgram = "hurl";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
}
|