2021-07-22 15:39:51 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
2021-10-09 01:53:02 +00:00
|
|
|
, installShellFiles
|
2021-07-22 15:39:51 +00:00
|
|
|
, libxml2
|
|
|
|
, openssl
|
2022-11-07 14:44:48 +00:00
|
|
|
, stdenv
|
2021-10-08 06:35:54 +00:00
|
|
|
, curl
|
2021-07-22 15:39:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "hurl";
|
2023-01-25 14:20:18 +00:00
|
|
|
version = "2.0.0";
|
2021-07-22 15:39:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Orange-OpenSource";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-01-25 14:20:18 +00:00
|
|
|
sha256 = "sha256-CQDyIGUIijNphOVo+aYZ7SqkxE4md9+H3D/g7jdqV+M=";
|
2021-07-22 15:39:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2021-10-09 01:53:02 +00:00
|
|
|
installShellFiles
|
2021-07-22 15:39:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libxml2
|
|
|
|
openssl
|
2021-10-08 06:35:54 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
curl
|
2021-07-22 15:39:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Tests require network access to a test server
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-01-25 14:20:18 +00:00
|
|
|
cargoSha256 = "sha256-wNiEULv+0WlZruxibcKqsw4Ym3retwjoGKXxzACcEeA=";
|
2021-07-22 15:39:51 +00:00
|
|
|
|
2021-10-09 01:53:02 +00:00
|
|
|
postInstall = ''
|
2022-09-18 12:02:24 +00:00
|
|
|
installManPage docs/manual/hurl.1 docs/manual/hurlfmt.1
|
2021-10-09 01:53:02 +00:00
|
|
|
'';
|
|
|
|
|
2021-07-22 15:39:51 +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 01:53:02 +00:00
|
|
|
changelog = "https://github.com/Orange-OpenSource/hurl/raw/${version}/CHANGELOG.md";
|
2022-11-07 14:44:48 +00:00
|
|
|
maintainers = with maintainers; [ eonpatapon figsoda ];
|
2021-07-22 15:39:51 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|