2021-07-22 17:39:51 +02:00
|
|
|
{ lib
|
2021-10-08 08:35:54 +02:00
|
|
|
, stdenv
|
2021-07-22 17:39:51 +02:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
2021-10-09 03:53:02 +02:00
|
|
|
, python3
|
|
|
|
, installShellFiles
|
2021-07-22 17:39:51 +02:00
|
|
|
, libxml2
|
|
|
|
, openssl
|
2021-10-08 08:35:54 +02:00
|
|
|
, curl
|
2021-07-22 17:39:51 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "hurl";
|
2021-12-21 04:47:41 +01:00
|
|
|
version = "1.5.0";
|
2021-07-22 17:39:51 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Orange-OpenSource";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-12-21 04:47:41 +01:00
|
|
|
sha256 = "sha256-avgi3Y5PRI/RZLYw10ifYV6eKKEBi349NYtYs07GS2k=";
|
2021-07-22 17:39:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2021-10-09 03:53:02 +02:00
|
|
|
python3
|
|
|
|
installShellFiles
|
2021-07-22 17:39:51 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libxml2
|
|
|
|
openssl
|
2021-10-08 08:35:54 +02:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
curl
|
2021-07-22 17:39:51 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
# Tests require network access to a test server
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-12-21 04:47:41 +01:00
|
|
|
cargoSha256 = "sha256-GB+MnvWkXcdlJvaxtSItm3nGRyr8zWhxSq58smPk/aY=";
|
2021-07-22 17:39:51 +02:00
|
|
|
|
2021-10-09 03:53:02 +02: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-07-22 17:39:51 +02: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 03:53:02 +02:00
|
|
|
changelog = "https://github.com/Orange-OpenSource/hurl/raw/${version}/CHANGELOG.md";
|
2021-07-22 17:39:51 +02:00
|
|
|
maintainers = with maintainers; [ eonpatapon ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|