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";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "2.0.1";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Orange-OpenSource";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-02-09 11:40:11 +00:00
|
|
|
sha256 = "sha256-sY2bSCcC+mMuYqLmh+oH76nqg/ybh/nyz3trNH2xPQM=";
|
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;
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
cargoSha256 = "sha256-Zv7TTQw4UcuQBhEdjD5nwcE1LonUHLUFf9BVhRWWuDo=";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
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; {
|
|
|
|
description = "Command line tool that performs HTTP requests defined in a simple plain text format.";
|
|
|
|
homepage = "https://hurl.dev/";
|
2021-10-09 14:59:57 +00:00
|
|
|
changelog = "https://github.com/Orange-OpenSource/hurl/raw/${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;
|
|
|
|
};
|
|
|
|
}
|