2021-08-05 21:33:18 +00:00
|
|
|
{ lib
|
2021-10-08 15:17:17 +00:00
|
|
|
, stdenv
|
2021-08-05 21:33:18 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
2021-10-09 14:59:57 +00:00
|
|
|
, python3
|
|
|
|
, installShellFiles
|
2021-08-05 21:33:18 +00:00
|
|
|
, libxml2
|
|
|
|
, openssl
|
2021-10-08 15:17:17 +00:00
|
|
|
, curl
|
2021-08-05 21:33:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "hurl";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "1.6.1";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Orange-OpenSource";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-ud4ARpiyMcYwPKsLbeK4MMBLzkD/tecF1L1vWyYpKmY=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2021-10-09 14:59:57 +00:00
|
|
|
python3
|
|
|
|
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;
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
cargoSha256 = "sha256-tmHP7xwVce/hh8nX1LO/zwPIlDZkICPMlBjZjuv37xU=";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2021-10-09 14:59:57 +00:00
|
|
|
postInstall = ''
|
|
|
|
python ci/gen_manpage.py docs/hurl.md > hurl.1
|
|
|
|
python ci/gen_manpage.py docs/hurlfmt.md > hurlfmt.1
|
|
|
|
installManPage hurl.1 hurlfmt.1
|
|
|
|
'';
|
|
|
|
|
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";
|
2021-08-05 21:33:18 +00:00
|
|
|
maintainers = with maintainers; [ eonpatapon ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|