nixpkgs/pkgs/tools/networking/hurl/default.nix

56 lines
1.2 KiB
Nix
Raw Normal View History

2021-07-22 18:39:51 +03:00
{ lib
, stdenv
2021-07-22 18:39:51 +03:00
, rustPlatform
, fetchFromGitHub
, pkg-config
2021-10-09 04:53:02 +03:00
, python3
, installShellFiles
2021-07-22 18:39:51 +03:00
, libxml2
, openssl
, curl
2021-07-22 18:39:51 +03:00
}:
rustPlatform.buildRustPackage rec {
pname = "hurl";
2022-02-12 03:19:24 +03:00
version = "1.6.0";
2021-07-22 18:39:51 +03:00
src = fetchFromGitHub {
owner = "Orange-OpenSource";
repo = pname;
rev = version;
2022-02-12 03:19:24 +03:00
sha256 = "sha256-87bzZxS1RAe2rY39/LF3kE7uOsEdlKDAnmuNc81YEYM=";
2021-07-22 18:39:51 +03:00
};
nativeBuildInputs = [
pkg-config
2021-10-09 04:53:02 +03:00
python3
installShellFiles
2021-07-22 18:39:51 +03:00
];
buildInputs = [
libxml2
openssl
] ++ lib.optionals stdenv.isDarwin [
curl
2021-07-22 18:39:51 +03:00
];
# Tests require network access to a test server
doCheck = false;
2022-02-12 03:19:24 +03:00
cargoSha256 = "sha256-GnpK4lC7aBMUM+E/dC+SEvG+s5ZlW4y1oI4crSDkblk=";
2021-07-22 18:39:51 +03:00
2021-10-09 04:53:02 +03: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 18:39:51 +03: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 04:53:02 +03:00
changelog = "https://github.com/Orange-OpenSource/hurl/raw/${version}/CHANGELOG.md";
2021-07-22 18:39:51 +03:00
maintainers = with maintainers; [ eonpatapon ];
license = licenses.asl20;
};
}