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